Fix sync icon error handling (trunk and SP2 tag)
This commit is contained in:
parent
9c3c7ebbb7
commit
4d9e018ca5
|
@ -342,7 +342,7 @@
|
|||
<toolbarbutton id="zotero-tb-sync" tooltip="_child"
|
||||
oncommand="Zotero.Sync.Runner.sync()">
|
||||
<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 -->
|
||||
<label value="Sync with Zotero Server"/>
|
||||
<label id="zotero-last-sync-time"/>
|
||||
|
|
|
@ -1964,13 +1964,13 @@ Zotero.Sync.Storage = new function () {
|
|||
_syncInProgress = false;
|
||||
Zotero.DB.rollbackAllTransactions();
|
||||
|
||||
Zotero.Sync.Server.setSyncIcon('error');
|
||||
Zotero.Sync.Runner.setSyncIcon('error');
|
||||
|
||||
if (e.name) {
|
||||
Zotero.Sync.Server.lastSyncError = e.name;
|
||||
Zotero.Sync.Runner.lastSyncError = e.name;
|
||||
}
|
||||
else {
|
||||
Zotero.Sync.Server.lastSyncError = e;
|
||||
Zotero.Sync.Runner.lastSyncError = e;
|
||||
}
|
||||
Zotero.debug(e, 1);
|
||||
Zotero.Sync.Runner.reset();
|
||||
|
|
Loading…
Reference in New Issue
Block a user