]> git.proxmox.com Git - proxmox-widget-toolkit.git/blobdiff - window/Edit.js
task view, progress: add taskDone callback
[proxmox-widget-toolkit.git] / window / Edit.js
index 75fce396a816366b81ae184eb4262ed48495b636..f72bee0d3c6f84ad5a6a934bbff39f70414bcb29 100644 (file)
@@ -40,6 +40,10 @@ Ext.define('Proxmox.window.Edit', {
 
     showTaskViewer: false,
 
+    // gets called if we have a progress bar or taskview and it detected that
+    // the task finished. function(success)
+    taskDone: Ext.emptyFn,
+
     // assign a reference from docs, to add a help button docked to the
     // bottom of the window. If undefined we magically fall back to the
     // onlineHelp of our first item, if set.
@@ -144,6 +148,7 @@ Ext.define('Proxmox.window.Edit', {
                    var viewerClass = me.showTaskViewer ? 'Viewer' : 'Progress';
                    var win = Ext.create('Proxmox.window.Task' + viewerClass, {
                        upid: upid,
+                       taskDone: me.taskDone,
                        listeners: {
                            destroy: function () {
                                me.close();