Display error icon and message on sync attempt if browser is offline

This commit is contained in:
Dan Stillman 2008-11-15 21:01:23 +00:00
parent e45ee36117
commit 63c90f2ae7

View file

@ -405,6 +405,13 @@ Zotero.Sync.Runner = new function () {
} }
this.sync = function () { this.sync = function () {
if (Zotero.Utilities.HTTP.browserIsOffline()){
this.lastSyncError = "Browser is offline"; // TODO: localize
this.clearSyncTimeout(); // DEBUG: necessary?
this.setSyncIcon('error');
return false;
}
if (_running) { if (_running) {
throw ("Sync already running in Zotero.Sync.Runner.sync()"); throw ("Sync already running in Zotero.Sync.Runner.sync()");
} }