Bug 689311 - "Pair a Device" and "Set up Sync" links in the Sync prefpane. r=rnewman

This commit is contained in:
Philipp von Weitershausen 2011-10-02 01:16:06 -07:00
parent 2036df0497
commit 4deb1d48af
7 changed files with 28 additions and 15 deletions

View File

@ -122,7 +122,7 @@ var gSyncSetup = {
this.captchaBrowser = document.getElementById("captcha");
this.wizard = document.getElementById("accountSetup");
if (window.arguments && window.arguments[0] == true) {
if (window.arguments && window.arguments[0] == "reset") {
// we're resetting sync
this._resettingSync = true;
this.wizard.pageIndex = OPTIONS_PAGE;

View File

@ -143,13 +143,23 @@ let gSyncPane = {
gSyncUtils.resetPassphrase();
},
openSetup: function (resetSync) {
/**
* Invoke the Sync setup wizard.
*
* @param wizardType
* Indicates type of wizard to launch:
* null -- regular set up wizard
* "pair" -- pair a device first
* "reset" -- reset sync
*/
openSetup: function (wizardType) {
var win = Services.wm.getMostRecentWindow("Weave:AccountSetup");
if (win)
win.focus();
else {
window.openDialog("chrome://browser/content/syncSetup.xul",
"weaveSetup", "centerscreen,chrome,resizable=no", resetSync);
"weaveSetup", "centerscreen,chrome,resizable=no",
wizardType);
}
},
@ -175,7 +185,7 @@ let gSyncPane = {
},
resetSync: function () {
this.openSetup(true);
this.openSetup("reset");
}
}

View File

@ -74,14 +74,17 @@
<deck id="weavePrefsDeck">
<vbox id="noAccount" align="center">
<spacer flex="1"/>
<button id="setupButton"
label="&setupButton.label;"
accesskey="&setupButton.accesskey;"
oncommand="gSyncPane.openSetup();"/>
<separator/>
<description id="syncDesc" flex="1">
<description id="syncDesc">
&weaveDesc.label;
</description>
<separator/>
<label class="text-link"
onclick="event.stopPropagation(); gSyncPane.openSetup(null);"
value="&setupButton.label;"/>
<separator/>
<label class="text-link"
onclick="event.stopPropagation(); gSyncPane.openSetup('pair');"
value="&pairDevice.label;"/>
<spacer flex="3"/>
</vbox>
@ -116,7 +119,7 @@
<label id="syncAddDeviceLabel"
class="text-link"
onclick="gSyncPane.openAddDevice(); return false;"
value="&addDevice.label;"/>
value="&pairDevice.label;"/>
</hbox>
<vbox>

View File

@ -17,7 +17,7 @@
<!ENTITY myRecoveryKey.label "My Recovery Key">
<!ENTITY resetSync2.label "Reset Sync…">
<!ENTITY addDevice.label "Add a Device">
<!ENTITY pairDevice.label "Pair a Device">
<!ENTITY syncMy.label "Sync My">
<!ENTITY engine.bookmarks.label "Bookmarks">

View File

@ -169,7 +169,7 @@ radio[pane=paneSync] {
/* Sync Pane */
#syncDesc {
padding: 0 12em;
padding: 0 8em;
}
#accountCaptionImage {

View File

@ -227,7 +227,7 @@ caption {
/* ----- SYNC PANE ----- */
#syncDesc {
padding: 0 12em;
padding: 0 8em;
}
#accountCaptionImage {

View File

@ -155,7 +155,7 @@ radio[pane=paneSync] {
/* Sync Pane */
#syncDesc {
padding: 0 12em;
padding: 0 8em;
}
.syncGroupBox {