Note: add openInTab context menu and change editInWindow locale string

This commit is contained in:
Ramon Mi 2026-02-06 21:15:33 +08:00
parent ea230faa26
commit 366c257beb
5 changed files with 19 additions and 3 deletions

View file

@ -77,7 +77,8 @@
<menupopup class="context-pane-list-popup">
<menuitem class="context-pane-list-show-in-library" label="&zotero.items.menu.showInLibrary;"/>
<menuitem class="context-pane-list-edit-in-window" label="&zotero.context.editInWindow;"/>
<menuitem class="context-pane-list-edit-in-tab" data-l10n-id="context-notes-edit-in-tab"/>
<menuitem class="context-pane-list-edit-in-window" data-l10n-id="context-notes-edit-in-window"/>
<menuseparator/>
<menuitem class="context-pane-list-move-to-trash" label="&zotero.general.moveToTrash;"/>
</menupopup>
@ -516,6 +517,10 @@
Zotero_Tabs.select('zotero-pane');
break;
case 'context-pane-list-edit-in-tab':
ZoteroPane.openNote(id, { openInWindow: false });
break;
case 'context-pane-list-edit-in-window':
ZoteroPane.openNote(id, { openInWindow: true });
break;

View file

@ -658,11 +658,17 @@ class EditorInstance {
this._showInLibrary(this._item.id);
return;
}
case 'openTab': {
await this._ensureNoteCreated();
let zp = Zotero.getActiveZoteroPane();
zp.openNote(this._item.id, { openInWindow: false });
return;
}
case 'openWindow': {
// TODO: Can we can avoid creating empty note just to open it in a new window?
await this._ensureNoteCreated();
let zp = Zotero.getActiveZoteroPane();
zp.openNoteWindow(this._item.id);
zp.openNote(this._item.id, { openInWindow: true });
return;
}
case 'update': {

View file

@ -43,6 +43,7 @@ note-editor-show-on-page = Show on Page
note-editor-add-citation = Add Citation
note-editor-remove-citation = Hide Citation
note-editor-find-and-replace = Find and Replace
note-editor-edit-in-tab = Edit in a New Tab
note-editor-edit-in-window = Edit in a Separate Window
note-editor-apply-annotation-colors = Show Annotation Colors
note-editor-remove-annotation-colors = Hide Annotation Colors

View file

@ -639,6 +639,10 @@ context-notes-search =
.placeholder = Search Notes
context-notes-return-button =
.aria-label = { general-go-back }
context-notes-edit-in-tab =
.label = Edit in a New Tab
context-notes-edit-in-window =
.label = Edit in a Separate Window
new-collection = New Collection…
menu-new-collection =

@ -1 +1 @@
Subproject commit 107ab75c3247c6584bda2303ecbddf4b317fdd2d
Subproject commit 102d76fa93ea57a7b7b5fffa754b7445a9c9ae9c