Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
WEBUI: do not allow to open multiple dialog windows, fixes #3184
  • Loading branch information
perexg committed Nov 21, 2015
1 parent 00ab005 commit 8902dcb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/webui/static/app/extensions.js
Expand Up @@ -1757,11 +1757,16 @@ Ext.ux.Window = Ext.extend(Ext.Window, {
Ext.EventManager.onWindowResize(this.keepItVisible, this, [true]);
this.originalWidth = 0;
this.originalHeight = 0;
/* exclusive window */
if (tvheadend.dialog)
tvheadend.dialog.close();
tvheadend.dialog = this;
},

beforeDestroy : function() {
Ext.EventManager.removeResizeListener(this.keepItVisible, this);
Ext.Window.superclass.beforeDestroy.call(this);
tvheadend.dialog = null;
},

keepItVisible : function(resize) {
Expand Down
1 change: 1 addition & 0 deletions src/webui/static/app/tvheadend.js
Expand Up @@ -2,6 +2,7 @@ tvheadend.dynamic = true;
tvheadend.accessupdate = null;
tvheadend.capabilities = null;
tvheadend.admin = false;
tvheadend.dialog = null;

tvheadend.cookieProvider = new Ext.state.CookieProvider({
// 7 days from now
Expand Down

0 comments on commit 8902dcb

Please sign in to comment.