]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
WEBUI: do not allow to open multiple dialog windows, fixes #3184
authorJaroslav Kysela <perex@perex.cz>
Sat, 21 Nov 2015 17:05:26 +0000 (18:05 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sat, 21 Nov 2015 17:05:26 +0000 (18:05 +0100)
src/webui/static/app/extensions.js
src/webui/static/app/tvheadend.js

index 1a58dbd34262c1c2510c6f2287ee3bfb90482168..ef4f5b4cacdc3826b26009cb3e046d3e64a878ff 100644 (file)
@@ -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) {
index f36d058ea9e831fd305e468c2c2f0fc655756f4e..304455b8fdeea47aa46d6480fd437d26f4620eaf 100644 (file)
@@ -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