www

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

commit 75293a475db8d61dddc48b69afe0cf069a7e325d
parent 2a7a604f284f9fb551f03e313cd984fadcef4581
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed,  1 May 2013 15:33:15 -0400

Use nicer alerts for error reporting error messages

Diffstat:
Mchrome/content/zotero/errorReport.xul | 27+++++++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)

diff --git a/chrome/content/zotero/errorReport.xul b/chrome/content/zotero/errorReport.xul @@ -70,17 +70,32 @@ return; } + var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] + .getService(Components.interfaces.nsIPromptService); + if (!xmlhttp.responseXML){ try { if (xmlhttp.status>1000){ - alert(Zotero.getString('errorReport.noNetworkConnection')); + ps.alert( + null, + Zotero.getString('general.error'), + Zotero.getString('errorReport.noNetworkConnection') + ); } else { - alert(Zotero.getString('errorReport.invalidResponseRepository')); + ps.alert( + null, + Zotero.getString('general.error'), + Zotero.getString('errorReport.invalidResponseRepository') + ); } } catch (e){ - alert(Zotero.getString('errorReport.repoCannotBeContacted')); + ps.alert( + null, + Zotero.getString('general.error'), + Zotero.getString('errorReport.repoCannotBeContacted') + ); } wizard.rewind(); @@ -90,7 +105,11 @@ var reported = xmlhttp.responseXML.getElementsByTagName('reported'); if (reported.length != 1) { - alert(Zotero.getString('errorReport.invalidResponseRepository')); + ps.alert( + null, + Zotero.getString('general.error'), + Zotero.getString('errorReport.invalidResponseRepository') + ); wizard.rewind(); return; }