mirror of
https://github.com/redmine/redmine.git
synced 2025-11-08 14:26:04 +01:00
Use button as additional option for contextmenu (#26655).
Patch by Felix Gliesche. git-svn-id: http://svn.redmine.org/redmine/trunk@17298 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -5,7 +5,7 @@ var contextMenuObserving;
|
||||
|
||||
function contextMenuRightClick(event) {
|
||||
var target = $(event.target);
|
||||
if (target.is('a')) {return;}
|
||||
if (target.is('a:not(.js-contextmenu)')) {return;}
|
||||
var tr = target.closest('.hascontextmenu').first();
|
||||
if (tr.length < 1) {return;}
|
||||
event.preventDefault();
|
||||
@@ -218,6 +218,7 @@ function contextMenuInit() {
|
||||
if (!contextMenuObserving) {
|
||||
$(document).click(contextMenuClick);
|
||||
$(document).contextmenu(contextMenuRightClick);
|
||||
$(document).on('click', '.js-contextmenu', contextMenuRightClick);
|
||||
contextMenuObserving = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user