Commit 42cda896 authored by Emmanuel Kasper's avatar Emmanuel Kasper Committed by Dietmar Maurer

ext5migrate: set buttons property directly instead of calling applyIf

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.
parent e12f89d8
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment