improve handling of the finish button

This commit is contained in:
Sebastian Sdorra
2011-04-28 21:09:02 +02:00
parent b1bf1a6fb2
commit efbb35e617

View File

@@ -267,7 +267,12 @@ Sonia.hg.ConfigWizardPanel = Ext.extend(Ext.Panel,{
valueField: 'id', valueField: 'id',
displayField: 'id', displayField: 'id',
allowBlank: false, allowBlank: false,
tpl: this.packageTemplate tpl: this.packageTemplate,
listeners: {
select: function(){
Ext.getCmp('finish').setDisabled(false);
}
}
}] }]
}] }]
} }
@@ -293,17 +298,18 @@ Sonia.hg.ConfigWizardPanel = Ext.extend(Ext.Panel,{
var next = -1; var next = -1;
if ( id == 'cod' && direction == 1 ) if ( id == 'cod' && direction == 1 ){
{
var v = Ext.getCmp('configureOrDownload').getValue().getRawValue(); var v = Ext.getCmp('configureOrDownload').getValue().getRawValue();
var df = false;
if ( v == 'localInstall' ){ if ( v == 'localInstall' ){
next = 1; next = 1;
} else if ( v == 'remoteInstall' ){ } else if ( v == 'remoteInstall' ){
next = 2; next = 2;
df = true;
} }
Ext.getCmp('move-prev').setDisabled(false); Ext.getCmp('move-prev').setDisabled(false);
Ext.getCmp('move-next').setDisabled(true); Ext.getCmp('move-next').setDisabled(true);
Ext.getCmp('finish').setDisabled(false); Ext.getCmp('finish').setDisabled(df);
} }
else if (direction == -1 && (id == 'localInstall' || id == 'remoteInstall')) { else if (direction == -1 && (id == 'localInstall' || id == 'remoteInstall')) {
next = 0; next = 0;