mirror of
https://github.com/meineerde/redmine.git
synced 2026-02-10 12:45:24 +00:00
Patch by Katsuya HIDAKA (user:hidakatsuya). git-svn-id: https://svn.redmine.org/redmine/trunk@23224 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
8438deb8a6
commit
162c356b23
@ -48,11 +48,12 @@
|
||||
#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; }
|
||||
|
||||
@ -19,10 +19,12 @@
|
||||
|
||||
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)
|
||||
@ -31,7 +33,7 @@ module ContextMenusHelper
|
||||
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)
|
||||
|
||||
@ -221,7 +221,7 @@ class ContextMenusControllerTest < Redmine::ControllerTest
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user