It seems that in ExtJS5 the prototype of the Window component already sets
some default values to me.buttons and me.layout, hence calling applyIf
on these properties will silently fail.

me.layout is already set to 'auto' by the framework, we don't need to set
that anymore.
---
 www/manager5/window/Edit.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/www/manager5/window/Edit.js b/www/manager5/window/Edit.js
index 3e69da9..e150cf1 100644
--- a/www/manager5/window/Edit.js
+++ b/www/manager5/window/Edit.js
@@ -232,13 +232,17 @@ Ext.define('PVE.window.Edit', {
            me.title = PVE.Utils.dialog_title(me.subject, me.create, me.isAdd);
        }
 
+       if (me.create) {
+               me.buttons = [ submitBtn ] ;
+       } else {
+               me.buttons = [ submitBtn, resetBtn ];
+       }
+
        Ext.applyIf(me, {
            modal: true,
-           layout: 'auto',
            width: twoColumn ? colwidth*2 : colwidth,
            border: false,
            items: [ me.formPanel ],
-           buttons: me.create ? [ submitBtn ] : [ submitBtn, resetBtn ]
        });
 
        me.callParent();
-- 
2.1.4


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to