The main aim of this new parameter is to allow
a refresh of a GridPanel *after* the task window
has been closed, and not after Edit Window is closed
which is often two early.
---
 www/manager6/window/Edit.js | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/www/manager6/window/Edit.js b/www/manager6/window/Edit.js
index 0f9c611..36ef7b6 100644
--- a/www/manager6/window/Edit.js
+++ b/www/manager6/window/Edit.js
@@ -24,6 +24,10 @@ Ext.define('PVE.window.Edit', {
 
     showProgress: false,
 
+    // if background or showProcess are set,
+    // set an optional hook to be executed when the TaskProcess window closes
+    afterTaskProgress: undefined,
+
     isValid: function() {
        var me = this;
 
@@ -118,6 +122,9 @@ Ext.define('PVE.window.Edit', {
                    var win = Ext.create('PVE.window.TaskProgress', { 
                        upid: upid
                    });
+                   if (Ext.isFunction(me.afterTaskProgress)) {
+                       win.on('destroy', me.afterTaskProgress);
+                   }
                    win.show();
                }
            }
-- 
2.1.4


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to