@@ -226,7 +226,8 Redmine::MenuManager.map :admin_menu do |menu| | |||||
226 | end |
|
226 | end | |
227 |
|
227 | |||
228 | Redmine::MenuManager.map :project_menu do |menu| |
|
228 | Redmine::MenuManager.map :project_menu do |menu| | |
229 | menu.push :new_object, nil, :caption => ' + ' |
|
229 | menu.push :new_object, nil, :caption => ' + ', | |
|
230 | :html => { :id => 'new-object', :onclick => 'toggleNewObjectDropdown(); return false;' } | |||
230 | menu.push :new_issue_category, {:controller => 'issue_categories', :action => 'new'}, :param => :project_id, :caption => :label_issue_category_new, |
|
231 | menu.push :new_issue_category, {:controller => 'issue_categories', :action => 'new'}, :param => :project_id, :caption => :label_issue_category_new, | |
231 | :parent => :new_object |
|
232 | :parent => :new_object | |
232 | menu.push :new_version, {:controller => 'versions', :action => 'new'}, :param => :project_id, :caption => :label_version_new, |
|
233 | menu.push :new_version, {:controller => 'versions', :action => 'new'}, :param => :project_id, :caption => :label_version_new, |
@@ -725,6 +725,15 function toggleDisabledInit() { | |||||
725 | $('input[data-disables], input[data-enables], input[data-shows]').each(toggleDisabledOnChange); |
|
725 | $('input[data-disables], input[data-enables], input[data-shows]').each(toggleDisabledOnChange); | |
726 | } |
|
726 | } | |
727 |
|
727 | |||
|
728 | function toggleNewObjectDropdown() { | |||
|
729 | var dropdown = $('#new-object + ul.menu-children'); | |||
|
730 | if(dropdown.hasClass('visible')){ | |||
|
731 | dropdown.removeClass('visible'); | |||
|
732 | }else{ | |||
|
733 | dropdown.addClass('visible'); | |||
|
734 | } | |||
|
735 | } | |||
|
736 | ||||
728 | (function ( $ ) { |
|
737 | (function ( $ ) { | |
729 |
|
738 | |||
730 | // detect if native date input is supported |
|
739 | // detect if native date input is supported |
@@ -51,7 +51,7 pre, code {font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace;} | |||||
51 | padding: 4px 10px 4px 10px; |
|
51 | padding: 4px 10px 4px 10px; | |
52 | } |
|
52 | } | |
53 | #main-menu li a:hover {background:#759FCF; color:#fff;} |
|
53 | #main-menu li a:hover {background:#759FCF; color:#fff;} | |
54 | #main-menu li:hover ul.menu-children {display: block;} |
|
54 | #main-menu li:hover ul.menu-children, #main-menu li ul.menu-children.visible {display: block;} | |
55 | #main-menu li a.selected, #main-menu li a.selected:hover {background:#fff; color:#555;} |
|
55 | #main-menu li a.selected, #main-menu li a.selected:hover {background:#fff; color:#555;} | |
56 | #main-menu li a.new-object { background-color:#759FCF; } |
|
56 | #main-menu li a.new-object { background-color:#759FCF; } | |
57 |
|
57 |
General Comments 0
You need to be logged in to leave comments.
Login now