mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 630885 - Sync key listed as undefined and generates an error on 'Change Sync Key'. r=mconnor a=blocking-final
Don't make the user click on "Generate" before the 'Change Sync Key' dialog can be dismissed.
This commit is contained in:
parent
2270d0e3d8
commit
aeae3c5040
@ -73,6 +73,7 @@ let Change = {
|
||||
// load some other elements & info from the window
|
||||
this._dialog = document.getElementById("change-dialog");
|
||||
this._dialogType = window.arguments[0];
|
||||
this._duringSetup = window.arguments[1];
|
||||
this._status = document.getElementById("status");
|
||||
this._statusIcon = document.getElementById("statusIcon");
|
||||
this._statusRow = document.getElementById("statusRow");
|
||||
@ -115,6 +116,9 @@ let Change = {
|
||||
warningText.textContent = this._str("change.synckey2.warningText");
|
||||
this._dialog.getButton("finish").label
|
||||
= this._str("change.synckey.acceptButton");
|
||||
if (this._duringSetup) {
|
||||
this._dialog.getButton("finish").disabled = false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "ChangePassword":
|
||||
|
@ -174,7 +174,7 @@ var gSyncSetup = {
|
||||
// according to the user's pref.
|
||||
Weave.Svc.Prefs.reset("firstSync");
|
||||
this.setupInitialSync();
|
||||
gSyncUtils.resetPassphrase();
|
||||
gSyncUtils.resetPassphrase(true);
|
||||
},
|
||||
|
||||
onResetPassphrase: function () {
|
||||
|
@ -67,7 +67,7 @@ let gSyncUtils = {
|
||||
input.value = Weave.Clients.localName;
|
||||
},
|
||||
|
||||
openChange: function openChange(type) {
|
||||
openChange: function openChange(type, duringSetup) {
|
||||
// Just re-show the dialog if it's already open
|
||||
let openedDialog = Weave.Svc.WinMediator.getMostRecentWindow("Sync:" + type);
|
||||
if (openedDialog != null) {
|
||||
@ -78,7 +78,8 @@ let gSyncUtils = {
|
||||
// Open up the change dialog
|
||||
let changeXUL = "chrome://browser/content/syncGenericChange.xul";
|
||||
let changeOpt = "centerscreen,chrome,resizable=no";
|
||||
Weave.Svc.WinWatcher.activeWindow.openDialog(changeXUL, "", changeOpt, type);
|
||||
Weave.Svc.WinWatcher.activeWindow.openDialog(changeXUL, "", changeOpt,
|
||||
type, duringSetup);
|
||||
},
|
||||
|
||||
changePassword: function () {
|
||||
@ -86,9 +87,9 @@ let gSyncUtils = {
|
||||
this.openChange("ChangePassword");
|
||||
},
|
||||
|
||||
resetPassphrase: function () {
|
||||
resetPassphrase: function (duringSetup) {
|
||||
if (Weave.Utils.ensureMPUnlocked())
|
||||
this.openChange("ResetPassphrase");
|
||||
this.openChange("ResetPassphrase", duringSetup);
|
||||
},
|
||||
|
||||
updatePassphrase: function () {
|
||||
|
Loading…
Reference in New Issue
Block a user