Fix sync icon error handling (trunk and SP2 tag)
This commit is contained in:
parent
02fd1f89b6
commit
f0c4eec238
|
@ -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"/>
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user