fix wizard validity logic

we always checked the validity of the panels of the wizard,
when the event validitychange of a subelement triggered,
sadly this does not always happen

for example:

when switching back and forth between 'cdrom' and iso
while having no valid iso selected, the validitchange does not
trigger for the combogrids

instead we listen to the 'change' event, then the check will
be executed at the right time

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2016-04-22 10:00:46 +02:00 committed by Dietmar Maurer
parent ea31930bcd
commit dd8988e8a0

View File

@ -222,7 +222,7 @@ Ext.define('PVE.window.Wizard', {
display_header(tabs[0]); display_header(tabs[0]);
Ext.Array.each(me.query('field'), function(field) { Ext.Array.each(me.query('field'), function(field) {
field.on('validitychange', function(f) { field.on('change', function(f) {
var tp = me.down('#wizcontent'); var tp = me.down('#wizcontent');
var atab = tp.getActiveTab(); var atab = tp.getActiveTab();
var valid = check_card(atab); var valid = check_card(atab);