fix storage selector 'change' event handling

the initial loading of the storage selector fires a 'change'
event via the 'onLoad' method of its parent class

at that point the value of the storage selector is empty,
and the callback function fails
This commit is contained in:
Emmanuel Kasper 2016-03-09 15:57:17 +01:00 committed by Dietmar Maurer
parent 0b409147ad
commit e7f0e95e2f

View File

@ -332,6 +332,9 @@ Ext.define('PVE.lxc.MountPointInputPanel', {
hidden: me.unused || !me.create, hidden: me.unused || !me.create,
listeners: { listeners: {
change: function(f, value) { change: function(f, value) {
if (!value) { // initial store loading fires an unwanted 'change'
return;
}
if (me.mpdata.type === 'bind') { if (me.mpdata.type === 'bind') {
me.quota.setDisabled(true); me.quota.setDisabled(true);
me.quota.setValue(false); me.quota.setValue(false);