[pve-devel] [PATCH manager v2] rename enableAfterLoad to enableLoadMask
Dominik Csapak
d.csapak at proxmox.com
Tue May 3 09:00:56 CEST 2016
also add an explaining comment
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
changes since v1:
* rebased on current master
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 bc1b281..fbc318e 100644
--- a/www/manager6/form/ComboGrid.js
+++ b/www/manager6/form/ComboGrid.js
@@ -240,7 +240,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);
}
@@ -276,7 +276,7 @@ Ext.define('PVE.form.ComboGrid', {
me.mon(me.store, 'beforeload', function() {
if (!me.isDisabled()) {
- me.enableAfterLoad = true;
+ me.enableLoadMask = true;
}
});
@@ -285,8 +285,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 || 0);
delete me.savedMinHeight;
--
2.1.4
More information about the pve-devel
mailing list