[pve-devel] [PATCH manager] rename enableAfterLoad to enableLoadMask

Dominik Csapak d.csapak at proxmox.com
Fri Apr 22 11:47:10 CEST 2016


also add a explaining comment

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

diff --git a/www/manager6/form/ComboGrid.js b/www/manager6/form/ComboGrid.js
index 33f3059..1654e6f 100644
--- a/www/manager6/form/ComboGrid.js
+++ b/www/manager6/form/ComboGrid.js
@@ -221,7 +221,7 @@ Ext.define('PVE.form.ComboGrid', {
 	//
 	// we save the minheight to reset it after the load
 	picker.on('show', function() {
-	    if (me.enableAfterLoad) {
+	    if (me.enableLoadMask) {
 		me.savedMinHeight = picker.getMinHeight();
 		picker.setMinHeight(100);
 	    }
@@ -257,7 +257,7 @@ Ext.define('PVE.form.ComboGrid', {
 
 	me.mon(me.store, 'beforeload', function() {
 	    if (!me.isDisabled()) {
-		me.enableAfterLoad = true;
+		me.enableLoadMask = true;
 	    }
 	});
 
@@ -266,8 +266,13 @@ Ext.define('PVE.form.ComboGrid', {
 	    if (success) {
 		me.clearInvalid();
 
-		if (me.enableAfterLoad) {
-		    delete me.enableAfterLoad;
+		if (me.enableLoadMask) {
+		    delete me.enableLoadMask;
+
+		    // if the picker exists,
+		    // we reset its minheight to the saved var/0
+		    // we have to update the layout, otherwise the height
+		    // gets not recalculated
 		    if (me.picker) {
 			me.picker.setMinHeight((me.savedMinHeight)?me.savedMinHeight:0);
 			delete me.savedMinHeight;
-- 
2.1.4




More information about the pve-devel mailing list