mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-01 13:19:39 +00:00
Keep the "new object" drop down open when the + sign was clicked (#15880).
For touch displays where :hover does not exist. Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@15504 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
5adc6a5c9f
commit
3da6062d7e
@ -226,7 +226,8 @@ Redmine::MenuManager.map :admin_menu do |menu|
|
||||
end
|
||||
|
||||
Redmine::MenuManager.map :project_menu do |menu|
|
||||
menu.push :new_object, nil, :caption => ' + '
|
||||
menu.push :new_object, nil, :caption => ' + ',
|
||||
:html => { :id => 'new-object', :onclick => 'toggleNewObjectDropdown(); return false;' }
|
||||
menu.push :new_issue_category, {:controller => 'issue_categories', :action => 'new'}, :param => :project_id, :caption => :label_issue_category_new,
|
||||
:parent => :new_object
|
||||
menu.push :new_version, {:controller => 'versions', :action => 'new'}, :param => :project_id, :caption => :label_version_new,
|
||||
|
||||
@ -725,6 +725,15 @@ function toggleDisabledInit() {
|
||||
$('input[data-disables], input[data-enables], input[data-shows]').each(toggleDisabledOnChange);
|
||||
}
|
||||
|
||||
function toggleNewObjectDropdown() {
|
||||
var dropdown = $('#new-object + ul.menu-children');
|
||||
if(dropdown.hasClass('visible')){
|
||||
dropdown.removeClass('visible');
|
||||
}else{
|
||||
dropdown.addClass('visible');
|
||||
}
|
||||
}
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
// detect if native date input is supported
|
||||
|
||||
@ -51,7 +51,7 @@ pre, code {font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace;}
|
||||
padding: 4px 10px 4px 10px;
|
||||
}
|
||||
#main-menu li a:hover {background:#759FCF; color:#fff;}
|
||||
#main-menu li:hover ul.menu-children {display: block;}
|
||||
#main-menu li:hover ul.menu-children, #main-menu li ul.menu-children.visible {display: block;}
|
||||
#main-menu li a.selected, #main-menu li a.selected:hover {background:#fff; color:#555;}
|
||||
#main-menu li a.new-object { background-color:#759FCF; }
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user