Fix nonfunctional Advanced Search menu item in dialogs

This commit is contained in:
Abe Jellinek 2024-01-30 11:43:56 -05:00
parent 1375de4ba2
commit a23b5310e6

View file

@ -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;
}