Disable duplication only for tagged items, not all items

This commit is contained in:
Dan Stillman 2008-12-02 09:36:41 +00:00
parent c95ce030ba
commit 16f98f76e0

View file

@ -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()