bug 307124 - pressing enter in the update wizard moves forward regardless of update state, r=mano

This commit is contained in:
mconnor%steelgryphon.com 2005-09-19 00:28:51 +00:00
Родитель cbfef10335
Коммит 99d3e5bc46
2 изменённых файлов: 14 добавлений и 11 удалений

Просмотреть файл

@ -102,7 +102,7 @@ var MigrationWizard = {
importAll.hidden = true;
}
document.documentElement.getButton("back").disabled = true;
this._wiz.canRewind = false;
// Figure out what source apps are are available to import from:
var group = document.getElementById("importSourceGroup");
@ -266,15 +266,15 @@ var MigrationWizard = {
}
}
this._wiz.getButton("next").disabled = !oneChecked;
this._wiz.canAdvance = oneChecked;
},
// 4 - Migrating
onMigratingPageShow: function ()
{
this._wiz.getButton("cancel").disabled = true;
this._wiz.getButton("back").disabled = true;
this._wiz.getButton("next").disabled = true;
this._wiz.canRewind = false;
this._wiz.canAdvance = false;
// When automigrating, show all of the data that can be received from this source.
if (this._autoMigrate)
@ -342,12 +342,13 @@ var MigrationWizard = {
dump("*** done\n");
if (this._autoMigrate) {
// We're done now.
this._wiz.canAdvance = true;
this._wiz.advance();
setTimeout(close, 5000);
}
else {
this._wiz.canAdvance = true;
var nextButton = this._wiz.getButton("next");
nextButton.disabled = false;
nextButton.click();
}
break;
@ -357,8 +358,7 @@ var MigrationWizard = {
onDonePageShow: function ()
{
this._wiz.getButton("cancel").disabled = true;
this._wiz.getButton("back").disabled = true;
this._wiz.getButton("finish").disabled = false;
this._wiz.canRewind = false;
this._listItems("doneItems");
}
};

Просмотреть файл

@ -167,13 +167,14 @@ var gUpdates = {
bf.label = finishButtonLabel || this._buttonLabel_finish;
bc.label = cancelButtonLabel || this._buttonLabel_hide;
be.label = extraButtonLabel || this._buttonLabel_hide;
bb.disabled = backButtonDisabled;
bn.disabled = nextButtonDisabled;
// update button state using the wizard commands
this.wiz.canRewind = !backButtonDisabled;
this.wiz.canAdvance = !(nextButtonDisabled && finishButtonDisabled);
bf.disabled = finishButtonDisabled;
bc.disabled = cancelButtonDisabled;
be.disabled = extraButtonDisabled;
// Show or hide the cancel and back buttons, since the Extra
// button does this job.
bc.hidden = hideBackAndCancelButtons;
@ -515,6 +516,7 @@ var gCheckingPage = {
var checking = document.getElementById("checking");
checking.setAttribute("next", "noupdatesfound");
}
gUpdates.wiz.canAdvance = true;
gUpdates.wiz.advance();
},
@ -1284,6 +1286,7 @@ var gDownloadingPage = {
return;
case Components.results.NS_OK:
LOG("UI:DownloadingPage", "onStopRequest: Patch Verification Succeeded");
gUpdates.wiz.canAdvance = true;
gUpdates.wiz.advance();
break;
default: