[pve-devel] [PATCH manager 1/4] Add a new property afterAPICall to Edit Window
Emmanuel Kasper
e.kasper at proxmox.com
Tue Dec 20 11:27:44 CET 2016
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..c29b97b 100644
--- a/www/manager6/window/Edit.js
+++ b/www/manager6/window/Edit.js
@@ -24,6 +24,10 @@ Ext.define('PVE.window.Edit', {
showProgress: false,
+ // optional function to be executed after a succesfull API2Request
+ // if backgroundDelay or showProgress are set
+ afterAPICall: 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.afterAPICall)) {
+ win.on('destroy', me.afterAPICall);
+ }
win.show();
}
}
--
2.1.4
More information about the pve-devel
mailing list