From 5f3e6fdd9e6aeba8c68ce8b96bb8a50cb01132d8 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Wed, 11 Jan 2012 15:02:22 +0100 Subject: [IMP] Disable right click on m2o button bzr revid: fme@openerp.com-20120111140222-cirxtmubrma6qj9b --- .../static/lib/jquery.contextmenu/jquery.contextmenu.r2.packed.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'addons/web/static/lib/jquery.contextmenu/jquery.contextmenu.r2.packed.js') diff --git a/addons/web/static/lib/jquery.contextmenu/jquery.contextmenu.r2.packed.js b/addons/web/static/lib/jquery.contextmenu/jquery.contextmenu.r2.packed.js index 2356f3b606b..47f542e5d39 100644 --- a/addons/web/static/lib/jquery.contextmenu/jquery.contextmenu.r2.packed.js +++ b/addons/web/static/lib/jquery.contextmenu/jquery.contextmenu.r2.packed.js @@ -65,8 +65,10 @@ display(index,this,e,options); return false; }; - $(this).bind('contextmenu', callback); - if(options.leftClickToo) { + if (!options.noRightClick) { + $(this).bind('contextmenu', callback); + } + if (options.leftClickToo || options.noRightClick) { $(this).click(callback); } return this @@ -123,4 +125,4 @@ })(jQuery); $( function() { $('div.contextMenu').hide() -}); \ No newline at end of file +}); -- cgit v1.2.3