Browse Source

WebUI: Don't show several context menus at the same time

adaptive-webui-19844
buinsky 9 years ago
parent
commit
fc077257d0
  1. 4
      src/webui/www/public/scripts/contextmenu.js

4
src/webui/www/public/scripts/contextmenu.js

@ -1,3 +1,4 @@ @@ -1,3 +1,4 @@
var lastShownContexMenu = null;
var ContextMenu = new Class({
//implements
Implements: [Options, Events],
@ -170,9 +171,12 @@ var ContextMenu = new Class({ @@ -170,9 +171,12 @@ var ContextMenu = new Class({
//show menu
show: function (trigger) {
if (lastShownContexMenu && lastShownContexMenu != this)
lastShownContexMenu.hide();
this.fx.start(1);
this.fireEvent('show');
this.shown = true;
lastShownContexMenu = this;
return this;
},

Loading…
Cancel
Save