From 63c90f2ae71c9143ebf7f3178720a97b89a97e51 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 15 Nov 2008 21:01:23 +0000 Subject: [PATCH] Display error icon and message on sync attempt if browser is offline --- chrome/content/zotero/xpcom/sync.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js index ae33d10688..e490e18772 100644 --- a/chrome/content/zotero/xpcom/sync.js +++ b/chrome/content/zotero/xpcom/sync.js @@ -405,6 +405,13 @@ Zotero.Sync.Runner = new 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) { throw ("Sync already running in Zotero.Sync.Runner.sync()"); }