Fix nonfunctional Advanced Search menu item in dialogs
This commit is contained in:
parent
1375de4ba2
commit
a23b5310e6
1 changed files with 13 additions and 8 deletions
|
@ -115,14 +115,19 @@
|
|||
|
||||
popup.append(item);
|
||||
}
|
||||
let separator = document.createXULElement('menuseparator');
|
||||
popup.append(separator);
|
||||
let advancedSearchOption = document.createXULElement('menuitem');
|
||||
advancedSearchOption.label = Zotero.getString("zotero.toolbar.advancedSearch");
|
||||
advancedSearchOption.addEventListener("command", () => {
|
||||
ZoteroPane.openAdvancedSearchWindow();
|
||||
});
|
||||
popup.append(advancedSearchOption);
|
||||
|
||||
// Add Advanced Search menu item in main window
|
||||
if (document.documentElement.getAttribute('windowtype') === 'navigator:browser') {
|
||||
let separator = document.createXULElement('menuseparator');
|
||||
popup.append(separator);
|
||||
let advancedSearchOption = document.createXULElement('menuitem');
|
||||
advancedSearchOption.label = Zotero.getString("zotero.toolbar.advancedSearch");
|
||||
advancedSearchOption.addEventListener("command", () => {
|
||||
ZoteroPane.openAdvancedSearchWindow();
|
||||
});
|
||||
popup.append(advancedSearchOption);
|
||||
}
|
||||
|
||||
return this._searchModePopup = popup;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue