Context-menu item delete from library root didn't show a prompt
This commit is contained in:
parent
d42b741756
commit
7a8e06cac2
2 changed files with 6 additions and 5 deletions
|
@ -1486,8 +1486,9 @@ var ZoteroPane = new function()
|
|||
*
|
||||
* @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
|
||||
|
|
|
@ -274,7 +274,7 @@
|
|||
<menuseparator/>
|
||||
<menuitem label="&zotero.items.menu.duplicateItem;" oncommand="ZoteroPane_Local.duplicateSelectedItem();"/>
|
||||
<menuitem oncommand="ZoteroPane_Local.deleteSelectedItems();"/>
|
||||
<menuitem oncommand="ZoteroPane_Local.deleteSelectedItems(true);"/>
|
||||
<menuitem oncommand="ZoteroPane_Local.deleteSelectedItems(true, true);"/>
|
||||
<menuitem label="&zotero.items.menu.restoreToLibrary;" oncommand="ZoteroPane_Local.restoreSelectedItems();"/>
|
||||
<menuitem label="&zotero.items.menu.mergeItems;" oncommand="ZoteroPane_Local.mergeSelectedItems();"/>
|
||||
<menuseparator/>
|
||||
|
|
Loading…
Reference in a new issue