[pve-devel] [PATCH manager 04/15] gui: StateProvider: add fireevent option to set

Dominik Csapak d.csapak at proxmox.com
Mon May 27 14:13:55 CEST 2019


this way, we can control if we want to fire the 'statechanged' event
when we set a value in the stateprovider

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/StateProvider.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/manager6/StateProvider.js b/www/manager6/StateProvider.js
index 80e82c04..81c76401 100644
--- a/www/manager6/StateProvider.js
+++ b/www/manager6/StateProvider.js
@@ -239,13 +239,13 @@ Ext.define('PVE.StateProvider', {
 	me.callParent(arguments);
     },
 
-    set: function(name, value){
+    set: function(name, value, fireevent){
         var me = this;
 
 	//console.log("SET " + name + " " + Ext.encode(value));
 	if (typeof me.UIState[name] != "undefined") {
 	    var newvalue = value ? value.value : null;
-	    if (me.setHV(name, newvalue, false)) {
+	    if (me.setHV(name, newvalue, fireevent)) {
 		var htext = me.encodeHToken(me.UIState);
 		Ext.History.add(htext);
 	    }
-- 
2.11.0





More information about the pve-devel mailing list