GitLab ist wegen Wartungsarbeiten am Montag, den 10. Mai, zwischen 17:00 und 19:00 Uhr nicht erreichbar.

Commit fcc0cdda authored by jplang's avatar jplang

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: https://svn.redmine.org/redmine/trunk@15504 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent a4ead278
......@@ -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; }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment