From 16f98f76e0a68121447bba723295bbc8a7b4b3e3 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 2 Dec 2008 09:36:41 +0000 Subject: [PATCH] Disable duplication only for tagged items, not all items --- chrome/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 index b4c0bc1bb..13b995838 100644 --- 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()