Do not hide context menu when clicking on a folder menu item.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8829 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-02-09 20:25:01 +00:00
parent e1072a3c4f
commit daacea11dc
2 changed files with 5 additions and 1 deletions

View File

@ -11,7 +11,7 @@
<% if @allowed_statuses.present? %> <% if @allowed_statuses.present? %>
<li class="folder"> <li class="folder">
<a href="#" class="submenu" onclick="return false;"><%= l(:field_status) %></a> <a href="#" class="submenu"><%= l(:field_status) %></a>
<ul> <ul>
<% @allowed_statuses.each do |s| -%> <% @allowed_statuses.each do |s| -%>
<li><%= context_menu_link h(s.name), {:controller => 'issues', :action => 'bulk_update', :ids => @issues.collect(&:id), :issue => {:status_id => s}, :back_url => @back}, :method => :post, <li><%= context_menu_link h(s.name), {:controller => 'issues', :action => 'bulk_update', :ids => @issues.collect(&:id), :issue => {:status_id => s}, :back_url => @back}, :method => :post,

View File

@ -35,6 +35,10 @@ ContextMenu.prototype = {
}, },
Click: function(e) { Click: function(e) {
if (Event.element(e).tagName == 'A' && Event.element(e).hasClassName('submenu')) {
Event.stop(e)
return;
}
this.hideMenu(); this.hideMenu();
if (Event.element(e).tagName == 'A' || Event.element(e).tagName == 'IMG') { return; } if (Event.element(e).tagName == 'A' || Event.element(e).tagName == 'IMG') { return; }
if (Event.isLeftClick(e) || (navigator.appVersion.match(/\bMSIE\b/))) { if (Event.isLeftClick(e) || (navigator.appVersion.match(/\bMSIE\b/))) {