File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ menuAddNote-newTemplateStandaloneNote =
1818menuAddNote-newTemplateItemNote =
1919 .label = Neue Eintrags-Notiz aus Vorlage
2020
21+ menuCollection-exportNotes =
22+ .label = Export Notes in Collection...
23+
2124menuTab-moveNewWindow =
2225 .label = In neues BN-Fenster verschieben
2326menu-openNoteAsBNWindow =
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ menuAddNote-newTemplateStandaloneNote =
1818menuAddNote-newTemplateItemNote =
1919 .label = New Item Note from Template
2020
21+ menuCollection-exportNotes =
22+ .label = Export Notes in Collection...
23+
2124menuTab-moveNewWindow =
2225 .label = Move to BN New Window
2326menu-openNoteAsBNWindow =
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ menuAddNote-newTemplateStandaloneNote =
1818menuAddNote-newTemplateItemNote =
1919 .label = Nuova Nota Elemento da Template
2020
21+ menuCollection-exportNotes =
22+ .label = Export Notes in Collection...
23+
2124menuTab-moveNewWindow =
2225 .label = Move to BN New Window
2326menu-openNoteAsBNWindow =
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ menuAddNote-newTemplateStandaloneNote =
1818menuAddNote-newTemplateItemNote =
1919 .label = Новая заметка элемента из шаблона
2020
21+ menuCollection-exportNotes =
22+ .label = Export Notes in Collection...
23+
2124menuTab-moveNewWindow =
2225 .label = Move to BN New Window
2326menu-openNoteAsBNWindow =
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ menuAddNote-newTemplateStandaloneNote =
1818menuAddNote-newTemplateItemNote =
1919 .label = Şablondan Yeni Öğe Notu
2020
21+ menuCollection-exportNotes =
22+ .label = Export Notes in Collection...
23+
2124menuTab-moveNewWindow =
2225 .label = Move to BN New Window
2326menu-openNoteAsBNWindow =
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ menuAddNote-newTemplateStandaloneNote =
1818menuAddNote-newTemplateItemNote =
1919 .label = 从模板新建条目笔记
2020
21+ menuCollection-exportNotes =
22+ .label = 导出分类中的笔记...
23+
2124menuTab-moveNewWindow =
2225 .label = 移动到 BN 新窗口
2326menu-openNoteAsBNWindow =
Original file line number Diff line number Diff line change @@ -82,6 +82,32 @@ export function registerMenus() {
8282 ] ,
8383 } ) ;
8484
85+ Zotero . MenuManager . registerMenu ( {
86+ menuID : `${ config . addonRef } -menuCollectionExportNotes` ,
87+ pluginID : config . addonID ,
88+ target : "main/library/collection" ,
89+ menus : [
90+ {
91+ menuType : "menuitem" ,
92+ l10nID : `${ config . addonRef } -menuCollection-exportNotes` ,
93+ icon : `chrome://${ config . addonRef } /content/icons/favicon.png` ,
94+ onShowing : ( _ , context ) => {
95+ context . setVisible ( context . collectionTreeRow ?. type === "collection" ) ;
96+ } ,
97+ onCommand : ( _ , context ) => {
98+ const collection = context . collectionTreeRow
99+ ?. ref as Zotero . Collection | undefined ;
100+ if ( ! collection ) {
101+ return ;
102+ }
103+ addon . hooks . onShowExportNoteOptions (
104+ collection . getChildItems ( true , false ) ,
105+ ) ;
106+ } ,
107+ } ,
108+ ] ,
109+ } ) ;
110+
85111 Zotero . MenuManager . registerMenu ( {
86112 menuID : `${ config . addonRef } -menuHelp` ,
87113 pluginID : config . addonID ,
Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ export type FluentMessageId =
113113 | 'menuAddNote-importMD'
114114 | 'menuAddNote-newTemplateItemNote'
115115 | 'menuAddNote-newTemplateStandaloneNote'
116+ | 'menuCollection-exportNotes'
116117 | 'menuEditor-copy'
117118 | 'menuEditor-copyLine'
118119 | 'menuEditor-copySection'
You can’t perform that action at this time.
0 commit comments