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
|
@ -1484,10 +1484,11 @@ var ZoteroPane = new function()
|
||||||
/*
|
/*
|
||||||
* Remove, trash, or delete item(s), depending on context
|
* Remove, trash, or delete item(s), depending on context
|
||||||
*
|
*
|
||||||
* @param {Boolean} [force=false] Trash or delete even if in a collection or search,
|
* @param {Boolean} [force=false] Trash or delete even if in a collection or search,
|
||||||
* or trash without prompt in library
|
* 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) {
|
if (!this.itemsView || !this.itemsView.selection.count) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1513,7 +1514,7 @@ var ZoteroPane = new function()
|
||||||
|
|
||||||
if (itemGroup.isLibrary(true)) {
|
if (itemGroup.isLibrary(true)) {
|
||||||
// In library, don't prompt if meta key was pressed
|
// 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()) {
|
else if (itemGroup.isCollection()) {
|
||||||
// In collection, only prompt if trashing
|
// In collection, only prompt if trashing
|
||||||
|
|
|
@ -274,7 +274,7 @@
|
||||||
<menuseparator/>
|
<menuseparator/>
|
||||||
<menuitem label="&zotero.items.menu.duplicateItem;" oncommand="ZoteroPane_Local.duplicateSelectedItem();"/>
|
<menuitem label="&zotero.items.menu.duplicateItem;" oncommand="ZoteroPane_Local.duplicateSelectedItem();"/>
|
||||||
<menuitem oncommand="ZoteroPane_Local.deleteSelectedItems();"/>
|
<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.restoreToLibrary;" oncommand="ZoteroPane_Local.restoreSelectedItems();"/>
|
||||||
<menuitem label="&zotero.items.menu.mergeItems;" oncommand="ZoteroPane_Local.mergeSelectedItems();"/>
|
<menuitem label="&zotero.items.menu.mergeItems;" oncommand="ZoteroPane_Local.mergeSelectedItems();"/>
|
||||||
<menuseparator/>
|
<menuseparator/>
|
||||||
|
|
Loading…
Reference in a new issue