commit d63d24c636f87c0de0dfa0069898c6c77e9374a8
parent de696d32e85efc1241f612ce8e0097c214dc9956
Author: Dan Stillman <dstillman@zotero.org>
Date: Wed, 11 Jan 2012 18:12:21 -0500
Show access error for translator save attempt to read-only library
Not sure how this works for connector saves
Diffstat:
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/browser.js b/chrome/content/zotero/browser.js
@@ -152,6 +152,15 @@ var Zotero_Browser = new function() {
var libraryID = null, collectionID = null;
if(ZoteroPane && !Zotero.isConnector) {
try {
+ if (!ZoteroPane.collectionsView.editable) {
+ Zotero_Browser.progress.changeHeadline(Zotero.getString("ingester.scrapeError"));
+ var desc = Zotero.getString('save.error.cannotMakeChangesToLibrary');
+ Zotero_Browser.progress.addDescription(desc);
+ Zotero_Browser.progress.show();
+ Zotero_Browser.progress.startCloseTimer(8000);
+ return;
+ }
+
libraryID = ZoteroPane.getSelectedLibraryID();
collectionID = ZoteroPane.getSelectedCollection(true);
} catch(e) {}
diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js
@@ -3498,14 +3498,14 @@ var ZoteroPane = new function()
this.displayCannotEditLibraryMessage = function () {
var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
- ps.alert(null, "", "You cannot make changes to the currently selected library.");
+ ps.alert(null, "", Zotero.getString('save.error.cannotMakeChangesToLibrary'));
}
this.displayCannotEditLibraryFilesMessage = function () {
var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
- ps.alert(null, "", "You cannot add files to the currently selected library.");
+ ps.alert(null, "", Zotero.getString('save.error.cannotAddFilesToLibrary'));
}
diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties
@@ -396,6 +396,8 @@ fileTypes.document = Document
save.attachment = Saving Snapshot…
save.link = Saving Link…
save.link.error = An error occurred while saving this link.
+save.error.cannotMakeChangesToLibrary = You cannot make changes to the currently selected library.
+save.error.cannotAddFilesToLibrary = You cannot add files to the currently selected library.
ingester.saveToZotero = Save to Zotero
ingester.saveToZoteroUsing = Save to Zotero using "%S"