#context-menu li a.submenu { padding-right:16px; background:url("/arrow_right.png") right no-repeat; padding-left: 28px;}
#context-menu li:hover { border:1px solid #628db6; background-color:#eef5fd; border-radius:3px; }
#context-menu a:hover {color:#2A5685;}
-#context-menu li.folder ul li a {padding-left: 20px;}
+#context-menu li.folder ul li a:not(.icon) {
+ padding-left: 28px;
+}
#context-menu li.folder:hover { z-index:40; }
#context-menu ul ul, #context-menu li:hover ul ul { display:none; }
#context-menu li:hover ul, #context-menu li:hover li:hover ul { display:block; }
-#context-menu a.icon-checked {background-position: 3px 40%;}
/* selected element */
.context-menu-selection { background-color:#507AAA !important; color:#f8f8f8 !important; }
module ContextMenusHelper
def context_menu_link(name, url, options={})
+ label = name
options[:class] ||= ''
if options.delete(:selected)
- options[:class] += ' icon icon-checked disabled'
+ options[:class] += ' icon disabled'
options[:disabled] = true
+ label = sprite_icon('checked', name)
end
if options.delete(:disabled)
options.delete(:method)
options[:class] += ' disabled'
url = '#'
end
- link_to h(name), url, options
+ link_to label, url, options
end
def bulk_update_custom_field_context_menu_link(field, text, value)
assert_select 'a[href="#"]', :text => 'List'
assert_select 'ul' do
assert_select 'a', 3
- assert_select 'a.icon.icon-checked', :text => 'Bar'
+ assert_select 'a.icon', :text => 'Bar'
end
end
end