From 7a8e06cac2823c303bf8c8d15627c391283592f2 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 5 Jan 2013 16:35:33 -0500 Subject: [PATCH] Context-menu item delete from library root didn't show a prompt --- chrome/content/zotero/zoteroPane.js | 9 +++++---- chrome/content/zotero/zoteroPane.xul | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 6579441db..4e2177a57 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -1484,10 +1484,11 @@ var ZoteroPane = new function() /* * Remove, trash, or delete item(s), depending on context * - * @param {Boolean} [force=false] Trash or delete even if in a collection or search, - * or trash without prompt in library + * @param {Boolean} [force=false] Trash or delete even if in a collection or search, + * or trash without prompt in library + * @param {Boolean} [fromMenu=false] If triggered from context menu, which always prompts for deletes */ - this.deleteSelectedItems = function (force) { + this.deleteSelectedItems = function (force, fromMenu) { if (!this.itemsView || !this.itemsView.selection.count) { return; } @@ -1513,7 +1514,7 @@ var ZoteroPane = new function() if (itemGroup.isLibrary(true)) { // In library, don't prompt if meta key was pressed - var prompt = force ? false : toTrash; + var prompt = (force && !fromMenu) ? false : toTrash; } else if (itemGroup.isCollection()) { // In collection, only prompt if trashing diff --git a/chrome/content/zotero/zoteroPane.xul b/chrome/content/zotero/zoteroPane.xul index 45a0f29d3..f56c301c5 100644 --- a/chrome/content/zotero/zoteroPane.xul +++ b/chrome/content/zotero/zoteroPane.xul @@ -274,7 +274,7 @@ - +