mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 675820: "Set Up Sync" link at bottom of home tab: mobile. r=philikon, ui-r=faaborg
This commit is contained in:
parent
dd6c3f6d8d
commit
4be80f6a94
@ -92,7 +92,9 @@
|
||||
<span id="feedback" style="width: &aboutHome.footerWidth;" class="section-row" pref="app.feedbackURL" onclick="openLink(this);" role="button">&aboutHome.giveFeedback;</span
|
||||
><span id="support" style="width: &aboutHome.footerWidth;" class="section-row" pref="app.support.baseURL" onclick="openLink(this);" role="button">&aboutHome.getHelp;</span>
|
||||
</div>
|
||||
|
||||
<div id="sync-setup">
|
||||
<a id="syncSetupSync" href="#" onclick="openSetupSyncWizard();">&aboutHome.setupSync;</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -160,6 +162,7 @@
|
||||
function init() {
|
||||
initTabs();
|
||||
initAddons();
|
||||
initSetupSync();
|
||||
|
||||
let prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefService).QueryInterface(Ci.nsIPrefBranch2);
|
||||
if (prefs.getBoolPref("browser.firstrun.show.uidiscovery")) {
|
||||
@ -175,6 +178,7 @@
|
||||
|
||||
function uninit() {
|
||||
uninitAddons();
|
||||
uninitSetupSync();
|
||||
}
|
||||
|
||||
function _readFile(aFile) {
|
||||
@ -451,7 +455,35 @@
|
||||
doc.removeEventListener("animationend", endDiscovery, false);
|
||||
doc.removeEventListener("PanBegin", endDiscovery, false);
|
||||
}
|
||||
|
||||
|
||||
function initSetupSync() {
|
||||
let services = getChromeWin().Services;
|
||||
if (services.prefs.prefHasUserValue("services.sync.username")) {
|
||||
document.getElementById("syncSetupSync").style.display = "none";
|
||||
}
|
||||
services.obs.addObserver(syncConnected, "weave:service:setup-complete", false);
|
||||
services.obs.addObserver(syncDisconnected, "weave:service:start-over", false);
|
||||
}
|
||||
|
||||
function uninitSetupSync() {
|
||||
let services = getChromeWin().Services;
|
||||
services.obs.removeObserver(syncConnected, "weave:service:setup-complete");
|
||||
services.obs.removeObserver(syncDisconnected, "weave:service:start-over");
|
||||
}
|
||||
|
||||
function syncConnected() {
|
||||
document.getElementById("syncSetupSync").style.display = "none";
|
||||
}
|
||||
|
||||
function syncDisconnected() {
|
||||
document.getElementById("syncSetupSync").style.display = "inline";
|
||||
}
|
||||
|
||||
function openSetupSyncWizard() {
|
||||
let chromeWin = getChromeWin();
|
||||
chromeWin.WeaveGlue.open();
|
||||
}
|
||||
|
||||
function initLightbox() {
|
||||
let prefs = getChromeWin().Services.prefs;
|
||||
let channel = prefs.getCharPref("app.update.channel");
|
||||
|
@ -19,3 +19,4 @@
|
||||
(aboutHome.forAndroid): Second line of a multi-line button. Treat as a subtitle.
|
||||
-->
|
||||
<!ENTITY aboutHome.forAndroid "for Android">
|
||||
<!ENTITY aboutHome.setupSync "Set Up Sync">
|
||||
|
@ -244,6 +244,17 @@ body[dir="rtl"] {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#sync-setup {
|
||||
font-size: 18px;
|
||||
margin-top: 24px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#syncSetupSync {
|
||||
text-decoration: underline;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
/* Lightbox for Aurora */
|
||||
#lightbox {
|
||||
position: fixed;
|
||||
|
Loading…
Reference in New Issue
Block a user