partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit afa945f4cb0546a5334b762e01c1606dfb9fba5c
parent b106193ca2c2beee0f3dcd3e0409c2bb9438447b
Author: Felicitus <felicitus@felicitus.org>
Date:   Tue,  5 Jul 2011 07:31:29 +0200

Prevent default browser context menu by default to avoid confusion with our own context menus

Diffstat:
Mfrontend/js/PartKeepr.js | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/frontend/js/PartKeepr.js b/frontend/js/PartKeepr.js @@ -27,7 +27,11 @@ Ext.application({ new PartKeepr.LoginDialog().show(); - Ext.QuickTips.init(); + + Ext.fly(document.body).on('contextmenu', this.onContextMenu, this); + }, + onContextMenu: function (e, target) { + e.preventDefault(); }, login: function () { this.createGlobalStores(); @@ -408,4 +412,4 @@ PartKeepr.serializeRecords = function (records) { PartKeepr.setAutoLogin = function (username, password) { PartKeepr.autoLoginUsername = username; PartKeepr.autoLoginPassword = password; -};- \ No newline at end of file +}; + \ No newline at end of file