Fix sync icon error handling (trunk and SP2 tag)

This commit is contained in:
Dan Stillman 2008-09-01 08:09:37 +00:00
parent 02fd1f89b6
commit f0c4eec238
2 changed files with 4 additions and 4 deletions

View File

@ -342,7 +342,7 @@
<toolbarbutton id="zotero-tb-sync" tooltip="_child" <toolbarbutton id="zotero-tb-sync" tooltip="_child"
oncommand="Zotero.Sync.Runner.sync()"> oncommand="Zotero.Sync.Runner.sync()">
<tooltip <tooltip
onpopupshowing="if (Zotero.Sync.Server.lastSyncError) { this.firstChild.nextSibling.value = 'Last error: ' + Zotero.Sync.Server.lastSyncError; return; } this.firstChild.nextSibling.value = 'Last sync: ' + (Zotero.Sync.Server.lastLocalSyncTime ? new Date(Zotero.Sync.Server.lastLocalSyncTime * 1000).toLocaleString() : 'Not yet synced')" onpopupshowing="if (Zotero.Sync.Runner.lastSyncError) { this.firstChild.nextSibling.value = 'Last error: ' + Zotero.Sync.Runner.lastSyncError; return; } this.firstChild.nextSibling.value = 'Last sync: ' + (Zotero.Sync.Server.lastLocalSyncTime ? new Date(Zotero.Sync.Server.lastLocalSyncTime * 1000).toLocaleString() : 'Not yet synced')"
noautohide="true"><!-- TODO: localize --> noautohide="true"><!-- TODO: localize -->
<label value="Sync with Zotero Server"/> <label value="Sync with Zotero Server"/>
<label id="zotero-last-sync-time"/> <label id="zotero-last-sync-time"/>

View File

@ -1964,13 +1964,13 @@ Zotero.Sync.Storage = new function () {
_syncInProgress = false; _syncInProgress = false;
Zotero.DB.rollbackAllTransactions(); Zotero.DB.rollbackAllTransactions();
Zotero.Sync.Server.setSyncIcon('error'); Zotero.Sync.Runner.setSyncIcon('error');
if (e.name) { if (e.name) {
Zotero.Sync.Server.lastSyncError = e.name; Zotero.Sync.Runner.lastSyncError = e.name;
} }
else { else {
Zotero.Sync.Server.lastSyncError = e; Zotero.Sync.Runner.lastSyncError = e;
} }
Zotero.debug(e, 1); Zotero.debug(e, 1);
Zotero.Sync.Runner.reset(); Zotero.Sync.Runner.reset();