www

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

commit 16f98f76e0a68121447bba723295bbc8a7b4b3e3
parent c95ce030ba6d8517751d3a4a1834ee81b5820a83
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue,  2 Dec 2008 09:36:41 +0000

Disable duplication only for tagged items, not all items


Diffstat:
Mchrome/content/zotero/overlay.js | 11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js @@ -1075,10 +1075,13 @@ var ZoteroPane = new function() function duplicateSelectedItem() { - var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] - .getService(Components.interfaces.nsIPromptService); - ps.alert(null, "Error", "Item duplication is not available in this Zotero release."); - return; + var item = this.getSelectedItems()[0]; + if (item.getTags()) { + var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] + .getService(Components.interfaces.nsIPromptService); + ps.alert(null, "Error", "Duplication of tagged items is not available in this Zotero release."); + return; + } var newItem = this.getSelectedItems()[0].clone(); var newItemID = newItem.save()