www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit ab1983ebf26809bb7214801ef9bf12eeaf428220
parent 5586eae237139db7080e490767f21fca20503421
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon,  1 Mar 2010 20:00:34 +0000

- Better sync error message for Firefox offline mode
- Better sync error message for "Sync already running in Zotero.Sync.Runner.sync()"
- Remove "Report Error..." button for manual intervention message


Diffstat:
Mchrome/content/zotero/xpcom/sync.js | 22++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js @@ -505,12 +505,19 @@ Zotero.Sync.Runner = new function () { if (Zotero.Utilities.HTTP.browserIsOffline()){ this.clearSyncTimeout(); // DEBUG: necessary? - this.setSyncIcon('error', "Browser is offline"); + var msg = "Zotero cannot sync while Firefox is in offline mode."; + var e = new Zotero.Error(msg, 0, { dialogButtonText: null }) + this.setSyncIcon('error', e); return false; } if (_running) { - throw ("Sync already running in Zotero.Sync.Runner.sync()"); + // TODO: show status in all windows + var msg = "A sync process is already running. To view progress, check " + + "the window in which the sync began or restart Firefox."; + var e = new Zotero.Error(msg, 0, { dialogButtonText: null }) + this.setSyncIcon('error', e); + return false; } // Purge deleted objects so they don't cause sync errors (e.g., long tags) @@ -1048,9 +1055,8 @@ Zotero.Sync.Server = new function () { this.__defineGetter__('password', function () { var username = this.username; - + if (!username) { - Zotero.debug('Username not set before setting Zotero.Sync.Server.password'); return ''; } @@ -2760,11 +2766,11 @@ Zotero.Sync.Server.Data = new function() { if (Zotero.Sync.Runner.background) { Zotero.Sync.Server.manualSyncRequired = true; - throw ( - Zotero.getString('sync.error.manualInterventionRequired') + var msg = Zotero.getString('sync.error.manualInterventionRequired') + "\n\n" - + Zotero.getString('sync.error.clickSyncIcon') - ); + + Zotero.getString('sync.error.clickSyncIcon'); + var e = new Zotero.Error(msg, 0, { dialogButtonText: null }); + throw (e); } var mergeData = _reconcile(type, toReconcile, remoteCreatorStore);