Show correct context menu and itemPane header for collections in trash (#4297)
- only have enabled "Permanently delete" and "Restore to library" options in the context menu for collections and searches in the trash - display the custom header with buttons to delete or restore in the itemPane when a collection or search in the trash is selected Fixes: #4295
This commit is contained in:
parent
df8a4799e1
commit
2dfb243924
2 changed files with 4 additions and 2 deletions
chrome/content/zotero
|
@ -492,7 +492,9 @@
|
|||
getCurrentPane(mode = undefined) {
|
||||
if (!mode) {
|
||||
// Guess a mode from the current data
|
||||
if (!this.data.length || this.data.length > 1) {
|
||||
// No/multiple objects are selected OR selected object is a trashed collection/search
|
||||
if (!this.data.length || this.data.length > 1
|
||||
|| this.data[0] instanceof Zotero.Collection || this.data[0] instanceof Zotero.Search) {
|
||||
mode = "message";
|
||||
}
|
||||
else if (this.data[0].isNote()) {
|
||||
|
|
|
@ -3558,7 +3558,7 @@ var ZoteroPane = new function()
|
|||
show.add(m.loadReport);
|
||||
}
|
||||
|
||||
var items = this.getSelectedItems();
|
||||
var items = this.getSelectedObjects();
|
||||
|
||||
if (items.length > 0) {
|
||||
// Multiple items selected
|
||||
|
|
Loading…
Add table
Reference in a new issue