www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit b650263d665a5e559a4d868598c4ee30f14957aa
parent d2a518163778e765f53e83ba05e8a72076766ea0
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri,  8 Apr 2016 17:03:29 -0400

"Sync with Zotero Server" -> "Sync with zotero.org"

Diffstat:
Mchrome/content/zotero/xpcom/sync/syncRunner.js | 17+++++++++++------
Mchrome/content/zotero/zoteroPane.js | 6++++++
Mchrome/content/zotero/zoteroPane.xul | 6+++---
Mchrome/locale/en-US/zotero/zotero.dtd | 1-
Mchrome/locale/en-US/zotero/zotero.properties | 1+
5 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/chrome/content/zotero/xpcom/sync/syncRunner.js b/chrome/content/zotero/xpcom/sync/syncRunner.js @@ -966,7 +966,6 @@ Zotero.Sync.Runner_Module = function (options = {}) { // Update sync error icon var icon = doc.getElementById('zotero-tb-sync-error'); - Zotero.debug(icon + ""); this.updateErrorIcon(icon, state, errors); // Update sync icon @@ -1119,15 +1118,21 @@ Zotero.Sync.Runner_Module = function (options = {}) { /** - * Register label in sync icon tooltip to receive updates + * Register labels in sync icon tooltip to receive updates * * If no label passed, unregister current label * - * @param {Tooltip} [label] + * @param {Tooltip} [tooltip] */ - this.registerSyncStatusLabel = function (statusLabel, lastSyncLabel) { - _currentSyncStatusLabel = statusLabel; - _currentLastSyncLabel = lastSyncLabel; + this.registerSyncStatus = function (tooltip) { + if (tooltip) { + _currentSyncStatusLabel = tooltip.firstChild.nextSibling; + _currentLastSyncLabel = tooltip.firstChild.nextSibling.nextSibling; + } + else { + _currentSyncStatusLabel = null; + _currentLastSyncLabel = null; + } if (_currentSyncStatusLabel) { _updateSyncStatusLabel(); } diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js @@ -113,6 +113,12 @@ var ZoteroPane = new function() document.getElementById('zotero-pane-stack').setAttribute('oldsearchfield', 'true') } + // Set the sync tooltip label + Components.utils.import("resource://zotero/config.js"); + document.getElementById('zotero-tb-sync-label').value = Zotero.getString( + 'sync.syncWith', ZOTERO_CONFIG.DOMAIN_NAME + ); + if (Zotero.isStandalone) { document.getElementById('zotero-tb-feed-add-fromPage').hidden = true; document.getElementById('zotero-tb-feed-add-fromPage-menu').hidden = true; diff --git a/chrome/content/zotero/zoteroPane.xul b/chrome/content/zotero/zoteroPane.xul @@ -237,10 +237,10 @@ oncommand="Zotero.Sync.Server.canAutoResetClient = true; Zotero.Sync.Server.manualSyncRequired = false; Zotero.Sync.Runner.sync()"> <tooltip id="zotero-tb-sync-tooltip" - onpopupshowing="Zotero.Sync.Runner.registerSyncStatusLabel(this.firstChild.nextSibling, this.firstChild.nextSibling.nextSibling)" - onpopuphiding="Zotero.Sync.Runner.registerSyncStatusLabel()" + onpopupshowing="Zotero.Sync.Runner.registerSyncStatus(this)" + onpopuphiding="Zotero.Sync.Runner.registerSyncStatus()" noautohide="true"> - <label value="&zotero.sync.button;"/> + <label id="zotero-tb-sync-label"/> <label id="zotero-tb-sync-status" hidden="true"/> <label id="zotero-tb-sync-last-sync"/> </tooltip> diff --git a/chrome/locale/en-US/zotero/zotero.dtd b/chrome/locale/en-US/zotero/zotero.dtd @@ -237,7 +237,6 @@ <!ENTITY zotero.integration.references.label "References in Bibliography"> -<!ENTITY zotero.sync.button "Sync with Zotero Server"> <!ENTITY zotero.sync.error "Sync Error"> <!ENTITY zotero.sync.storage.progress "Progress:"> <!ENTITY zotero.sync.storage.downloads "Downloads:"> diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties @@ -809,6 +809,7 @@ styles.abbreviations.parseError = The abbreviations file "%1$S" is not valid JS styles.abbreviations.missingInfo = The abbreviations file "%1$S" does not specify a complete info block. sync.sync = Sync +sync.syncWith = Sync with %S sync.cancel = Cancel Sync sync.openSyncPreferences = Open Sync Preferences sync.resetGroupAndSync = Reset Group and Sync