Skip to content
This repository
Browse code

fixed optional show/hide on titled/open

  • Loading branch information...
commit f7fcb42e154c8da20d78b9683b1a8bddd5c64d32 1 parent 5aca0c2
ethn authored December 20, 2012

Showing 1 changed file with 8 additions and 2 deletions. Show diff stats Hide diff stats

  1. 10  lib/wagn/set/all/rich_html.rb
10  lib/wagn/set/all/rich_html.rb
@@ -32,7 +32,10 @@ module Set::All::RichHtml
32 32
     end
33 33
 
34 34
     define_view :titled do |args|
35  
-      args[:hide] ||= ['menu_link']
  35
+      unless args[:show] and args[:show].member? 'menu_link'  #need to simplify this pattern
  36
+        args[:hide] ||= ['menu_link']
  37
+      end
  38
+      
36 39
       wrap :titled, args do
37 40
         _render_header( args ) +
38 41
         wrap_content( :titled ) do
@@ -48,7 +51,10 @@ module Set::All::RichHtml
48 51
     end
49 52
 
50 53
     define_view :open do |args|
51  
-      args[:show] ||= ['closer']
  54
+      unless args[:hide] and args[:hide].member? 'closer'
  55
+        args[:show] ||= ['closer']
  56
+      end
  57
+      
52 58
       wrap :open, args.merge(:frame=>true) do
53 59
         %{
54 60
            #{ _render_header args }

0 notes on commit f7fcb42

Please sign in to comment.
Something went wrong with that request. Please try again.