diff --git a/content/Preferences/autoexport.pug b/content/Preferences/autoexport.pug index 5eeeced44c..497a0b93e7 100644 --- a/content/Preferences/autoexport.pug +++ b/content/Preferences/autoexport.pug @@ -3,11 +3,10 @@ vbox(flex="1") separator.thin hbox label(bbt:preference="extensions.zotero.translators.better-bibtex.autoExport") &better-bibtex.Preferences.auto-export; - menulist(preference="extensions.zotero.translators.better-bibtex.autoExport") - menupopup - menuitem(label="&better-bibtex.Preferences.auto-export.off;" value="off") - menuitem(label="&better-bibtex.Preferences.auto-export.immediate;" value="immediate") - menuitem(label="&better-bibtex.Preferences.auto-export.idle;" value="idle") + html:select(preference="extensions.zotero.translators.better-bibtex.autoExport") + html:option(value='off') &better-bibtex.Preferences.auto-export.off; + html:option(value='immediate') &better-bibtex.Preferences.auto-export.immediate; + html:option(value='idle') &better-bibtex.Preferences.auto-export.idle; hbox label(bbt:preference="extensions.zotero.translators.better-bibtex.autoExportDelay") &better-bibtex.Preferences.auto-export.delay; html:input(type='range' min='2' max='300' preference='extensions.zotero.translators.better-bibtex.autoExportDelay') @@ -50,11 +49,10 @@ tabbox#better-bibtex-prefs-auto-export-tabbox(hidden="true") hbox label &better-bibtex.Preferences.export.bibtex.URLs; hbox - menulist(data-ae-id="" data-ae-field="bibtexURL" oncommand="Zotero.BetterBibTeX.PrefPane.autoexport.edit(event.currentTarget)") - menupopup - menuitem(label="&better-bibtex.Preferences.export.bibtex.URLs.off;" value="off") - menuitem(label="&better-bibtex.Preferences.export.bibtex.URLs.note;" value="note") - menuitem(label="&better-bibtex.Preferences.export.bibtex.URLs.url;" value="url") + html:select(data-ae-id="" data-ae-field="bibtexURL" oncommand="Zotero.BetterBibTeX.PrefPane.autoexport.edit(event.currentTarget)") + html:option(value='off') &better-bibtex.Preferences.export.bibtex.URLs.off; + html:option(value='note') &better-bibtex.Preferences.export.bibtex.URLs.note; + html:option(value='url') &better-bibtex.Preferences.export.bibtex.URLs.url; image(tooltip="tooltip-bibtexURL" src="chrome://zotero-better-bibtex/skin/attention.svg" width="16" height="16") vbox.autoexport-options.autoexport-BetterBibLaTeX(hidden="true") checkbox(data-ae-id="" data-ae-field="asciiBibLaTeX" label="&better-bibtex.Preferences.export.biblatex.ascii;" oncommand="Zotero.BetterBibTeX.PrefPane.autoexport.edit(event.target)") @@ -62,11 +60,10 @@ tabbox#better-bibtex-prefs-auto-export-tabbox(hidden="true") vbox.autoexport-options.autoexport-BetterBibTeX.autoexport-BetterBibLaTeX(hidden="true") hbox.autoexport-options.autoexport-BetterBibTeX.autoexport-BetterBibLaTeX label &better-bibtex.Preferences.export.fields.doi-and-url; - menulist(data-ae-id="" data-ae-field="DOIandURL" oncommand="Zotero.BetterBibTeX.PrefPane.autoexport.edit(event.currentTarget)") - menupopup - menuitem(label="&better-bibtex.Preferences.export.fields.doi-and-url.both;" value="both") - menuitem(label="&better-bibtex.Preferences.export.fields.doi-and-url.DOI;" value="doi") - menuitem(label="&better-bibtex.Preferences.export.fields.doi-and-url.URL;" value="url") + html:select(data-ae-id="" data-ae-field="DOIandURL" oncommand="Zotero.BetterBibTeX.PrefPane.autoexport.edit(event.currentTarget)") + html:option(value='both') &better-bibtex.Preferences.export.fields.doi-and-url.both; + html:option(value='doi') &better-bibtex.Preferences.export.fields.doi-and-url.DOI; + html:option(value='url') &better-bibtex.Preferences.export.fields.doi-and-url.URL; checkbox.autoexport-options.autoexport-BetterBibTeX.autoexport-BetterBibLaTeX(data-ae-id="" data-ae-field="exportNotes" label="&better-bibtex.Preferences.auto-export.fields.notes;" oncommand="Zotero.BetterBibTeX.PrefPane.autoexport.edit(event.target)") checkbox.autoexport-options.autoexport-BetterBibTeX.autoexport-BetterBibLaTeX(data-ae-id="" data-ae-field="useJournalAbbreviation" label="&better-bibtex.Preferences.auto-export.fields.journalAbbrev;" oncommand="Zotero.BetterBibTeX.PrefPane.autoexport.edit(event.target)") checkbox(data-ae-id="" data-ae-field="recursive" label="&better-bibtex.Preferences.auto-export.fields.recursive;" oncommand="Zotero.BetterBibTeX.PrefPane.autoexport.edit(event.target)") diff --git a/content/Preferences/citekeys.pug b/content/Preferences/citekeys.pug index a5e2851252..b21c2b4027 100644 --- a/content/Preferences/citekeys.pug +++ b/content/Preferences/citekeys.pug @@ -33,16 +33,14 @@ groupbox(style='margin-bottom: 10px') // &better-bibtex.Preferences.citekey.uniqueness.pin.description; hbox label(bbt:preference="extensions.zotero.translators.better-bibtex.keyScope") &better-bibtex.Preferences.citekey.uniqueness.scope; - menulist(preference="extensions.zotero.translators.better-bibtex.keyScope") - menupopup - menuitem(label="&better-bibtex.Preferences.citekey.uniqueness.scope.global;" value="global") - menuitem(label="&better-bibtex.Preferences.citekey.uniqueness.scope.library;" value="library") + html:select(preference="extensions.zotero.translators.better-bibtex.keyScope") + html:option(value='global') &better-bibtex.Preferences.citekey.uniqueness.scope.global; + html:option(value='library') &better-bibtex.Preferences.citekey.uniqueness.scope.library; hbox label(bbt:preference="extensions.zotero.translators.better-bibtex.keyConflictPolicy") &better-bibtex.Preferences.citekey.uniqueness.conflict; - menulist(preference="extensions.zotero.translators.better-bibtex.keyConflictPolicy") - menupopup - menuitem(label="&better-bibtex.Preferences.citekey.uniqueness.conflict.change;" value="change") - menuitem(label="&better-bibtex.Preferences.citekey.uniqueness.conflict.keep;" value="keep") + html:select(preference="extensions.zotero.translators.better-bibtex.keyConflictPolicy") + html:option(value='change') &better-bibtex.Preferences.citekey.uniqueness.conflict.change; + html:option(value='keep') &better-bibtex.Preferences.citekey.uniqueness.conflict.keep; groupbox caption(label="&better-bibtex.Preferences.advanced.ideographs;") diff --git a/content/Preferences/export/bibtex.pug b/content/Preferences/export/bibtex.pug index ec67275826..e66d2681df 100644 --- a/content/Preferences/export/bibtex.pug +++ b/content/Preferences/export/bibtex.pug @@ -4,11 +4,10 @@ hbox label(bbt:preference="extensions.zotero.translators.better-bibtex.bibtexURL") &better-bibtex.Preferences.export.bibtex.URLs;: image(tooltip="tooltip-bibtexURL" src="chrome://zotero-better-bibtex/skin/attention.svg" width="16" height="16") hbox - menulist(preference="extensions.zotero.translators.better-bibtex.bibtexURL") - menupopup - menuitem(label="&better-bibtex.Preferences.export.bibtex.URLs.off;" value="off") - menuitem(label="&better-bibtex.Preferences.export.bibtex.URLs.note;" value="note") - menuitem(label="&better-bibtex.Preferences.export.bibtex.URLs.note-url-ish;" value="note-url-ish") - menuitem(label="&better-bibtex.Preferences.export.bibtex.URLs.url;" value="url") - menuitem(label="&better-bibtex.Preferences.export.bibtex.URLs.url-ish;" value="url-ish") + html:select(preference="extensions.zotero.translators.better-bibtex.bibtexURL") + html:option(value='off') &better-bibtex.Preferences.export.bibtex.URLs.off; + html:option(value='note') &better-bibtex.Preferences.export.bibtex.URLs.note; + html:option(value='note-url-ish') &better-bibtex.Preferences.export.bibtex.URLs.note-url-ish; + html:option(value='url') &better-bibtex.Preferences.export.bibtex.URLs.url; + html:option(value='url-ish') &better-bibtex.Preferences.export.bibtex.URLs.url-ish; hbox(flex='1') diff --git a/content/Preferences/export/fields.pug b/content/Preferences/export/fields.pug index c90143b150..18ad17c5ca 100644 --- a/content/Preferences/export/fields.pug +++ b/content/Preferences/export/fields.pug @@ -1,27 +1,24 @@ hbox label(bbt:preference="extensions.zotero.translators.better-bibtex.language") &better-bibtex.Preferences.export.fields.language; - menulist(preference="extensions.zotero.translators.better-bibtex.language" preference-editable="true") - menupopup - menuitem(label="&better-bibtex.Preferences.export.fields.language.langid;" value="langid") - menuitem(label="&better-bibtex.Preferences.export.fields.language.language;" value="language") - menuitem(label="&better-bibtex.Preferences.export.fields.language.both;" value="both") + html:select(preference="extensions.zotero.translators.better-bibtex.language" preference-editable="true") + html:option(value='langid') &better-bibtex.Preferences.export.fields.language.langid; + html:option(value='language') &better-bibtex.Preferences.export.fields.language.language; + html:option(value='both') &better-bibtex.Preferences.export.fields.language.both; hbox label(bbt:preference="extensions.zotero.translators.better-bibtex.DOIandURL") &better-bibtex.Preferences.export.fields.doi-and-url; - menulist(preference="extensions.zotero.translators.better-bibtex.DOIandURL" preference-editable="true") - menupopup - menuitem(label="&better-bibtex.Preferences.export.fields.doi-and-url.both;" value="both") - menuitem(label="&better-bibtex.Preferences.export.fields.doi-and-url.DOI;" value="doi") - menuitem(label="&better-bibtex.Preferences.export.fields.doi-and-url.URL;" value="url") + html:select(preference="extensions.zotero.translators.better-bibtex.DOIandURL" preference-editable="true") + html:option(value='both') &better-bibtex.Preferences.export.fields.doi-and-url.both; + html:option(value='doi') &better-bibtex.Preferences.export.fields.doi-and-url.DOI; + html:option(value='url') &better-bibtex.Preferences.export.fields.doi-and-url.URL; image(tooltip="tooltip-bibtexURL" src="chrome://zotero-better-bibtex/skin/attention.svg" width="16" height="16") hbox label(bbt:preference="extensions.zotero.translators.better-bibtex.skipFields") &better-bibtex.Preferences.export.fields.skip;: textbox#id-better-bibtex-preferences-skipFields(size='30' preference='extensions.zotero.translators.better-bibtex.skipFields') hbox label(bbt:preference="extensions.zotero.translators.better-bibtex.jabrefFormat") &better-bibtex.Preferences.export.jabrefFormat; - menulist(preference="extensions.zotero.translators.better-bibtex.jabrefFormat" preference-editable="true") - menupopup - menuitem(label="&better-bibtex.Preferences.export.jabrefFormat.0;" value="0") - menuitem(label="&better-bibtex.Preferences.export.jabrefFormat.3;" value="3") - menuitem(label="&better-bibtex.Preferences.export.jabrefFormat.4;" value="4") - menuitem(label="&better-bibtex.Preferences.export.jabrefFormat.5;" value="5") + html:select(preference="extensions.zotero.translators.better-bibtex.jabrefFormat" preference-editable="true") + html:option(value='0') &better-bibtex.Preferences.export.jabrefFormat.0; + html:option(value='3') &better-bibtex.Preferences.export.jabrefFormat.3; + html:option(value='4') &better-bibtex.Preferences.export.jabrefFormat.4; + html:option(value='5') &better-bibtex.Preferences.export.jabrefFormat.5; image(tooltip="tooltip-jabrefFormat" src="chrome://zotero-better-bibtex/skin/attention.svg" width="16" height="16") diff --git a/content/Preferences/export/misc.pug b/content/Preferences/export/misc.pug index d4efb0a91a..bc6997105c 100644 --- a/content/Preferences/export/misc.pug +++ b/content/Preferences/export/misc.pug @@ -3,20 +3,18 @@ checkbox#id-better-bibtex-preferences-autoAbbrev(label="&better-bibtex.Preferenc separator#better-bibtex-abbrev-style-separator.thin.jurism label#better-bibtex-abbrev-style-label.jurism(bbt:preference="extensions.zotero.translators.better-bibtex.autoAbbrevStyle") &better-bibtex.Preferences.auto-abbrev.style; -menulist#better-bibtex-abbrev-style.jurism(onchange="Zotero.BetterBibTeX.PrefPane.styleChanged()") - menupopup#better-bibtex-abbrev-style-popup +html:select#better-bibtex-abbrev-style.jurism(onchange="Zotero.BetterBibTeX.PrefPane.styleChanged()") checkbox(label="&better-bibtex.Preferences.export.qualityReport;" preference="extensions.zotero.translators.better-bibtex.qualityReport") checkbox(label="&better-bibtex.Preferences.export.automaticTags;" preference="extensions.zotero.translators.better-bibtex.automaticTags") label(bbt:preference="extensions.zotero.translators.better-bibtex.mapUnicode") &better-bibtex.Preferences.export.map-unicode; -menulist(preference="extensions.zotero.translators.better-bibtex.mapUnicode") - menupopup - menuitem(label="&better-bibtex.Preferences.export.map-unicode.minimal-packages;" value="minimal-packages") - menuitem(label="&better-bibtex.Preferences.export.map-unicode.conservative;" value="conservative") - menuitem(label="&better-bibtex.Preferences.export.map-unicode.text;" value="text") - menuitem(label="&better-bibtex.Preferences.export.map-unicode.math;" value="math") - menuitem(label="&better-bibtex.Preferences.export.map-unicode.creator;" value="creator") +html:select(preference="extensions.zotero.translators.better-bibtex.mapUnicode") + html:option(value='minimal-packages') &better-bibtex.Preferences.export.map-unicode.minimal-packages; + html:option(value='conservative') &better-bibtex.Preferences.export.map-unicode.conservative; + html:option(value='text') &better-bibtex.Preferences.export.map-unicode.text; + html:option(value='math') &better-bibtex.Preferences.export.map-unicode.math; + html:option(value='creator') &better-bibtex.Preferences.export.map-unicode.creator; hbox checkbox(preference="extensions.zotero.translators.better-bibtex.exportTitleCase" label="&better-bibtex.Preferences.advanced.export.titleCase;") diff --git a/content/Preferences/export/quickcopy.pug b/content/Preferences/export/quickcopy.pug index ea515ae9eb..19a784e2fb 100644 --- a/content/Preferences/export/quickcopy.pug +++ b/content/Preferences/export/quickcopy.pug @@ -3,20 +3,19 @@ groupbox vbox(style='height: 14em;' flex='1') hbox label(bbt:preference='extensions.zotero.translators.better-bibtex.quickCopyMode') &better-bibtex.Preferences.export.quickCopy.format; - menulist#id-better-bibtex-preferences-quickCopyMode(preference='extensions.zotero.translators.better-bibtex.quickCopyMode' preference-editable='true' oncommand='Zotero.BetterBibTeX.PrefPane.refresh();') - menupopup - menuitem(label='&better-bibtex.Preferences.export.quickCopy.latex;' value='latex') - menuitem(label='&better-bibtex.Preferences.export.quickCopy.citekeys;' value='citekeys') - menuitem(label='&better-bibtex.Preferences.export.quickCopy.pandoc;' value='pandoc') - menuitem(label='&better-bibtex.Preferences.export.quickCopy.orgMode;' value='orgmode') - menuitem(label='&better-bibtex.Preferences.export.quickCopy.orgRef;' value='orgRef') - menuitem(label='&better-bibtex.Preferences.export.quickCopy.orgRef3;' value='orgRef3') - menuitem(label='&better-bibtex.Preferences.export.quickCopy.rtfScan;' value='rtfScan') - menuitem(label='&better-bibtex.Preferences.export.quickCopy.roamCiteKey;' value='roamCiteKey') - menuitem(label='&better-bibtex.Preferences.export.quickCopy.atom;' value='atom') - menuitem(label='&better-bibtex.Preferences.export.quickCopy.gitbook;' value='gitbook') - menuitem(label='&better-bibtex.Preferences.export.quickCopy.selectLink;' value='selectlink') - menuitem(label='&better-bibtex.Preferences.export.quickCopy.etaTemplate;' value='eta') + html:select#id-better-bibtex-preferences-quickCopyMode(preference='extensions.zotero.translators.better-bibtex.quickCopyMode' preference-editable='true' oncommand='Zotero.BetterBibTeX.PrefPane.refresh();') + html:option(value='latex') &better-bibtex.Preferences.export.quickCopy.latex; + html:option(value='citekeys') &better-bibtex.Preferences.export.quickCopy.citekeys; + html:option(value='pandoc') &better-bibtex.Preferences.export.quickCopy.pandoc; + html:option(value='orgmode') &better-bibtex.Preferences.export.quickCopy.orgMode; + html:option(value='orgRef') &better-bibtex.Preferences.export.quickCopy.orgRef; + html:option(value='orgRef3') &better-bibtex.Preferences.export.quickCopy.orgRef3; + html:option(value='rtfScan') &better-bibtex.Preferences.export.quickCopy.rtfScan; + html:option(value='roamCiteKey') &better-bibtex.Preferences.export.quickCopy.roamCiteKey; + html:option(value='atom') &better-bibtex.Preferences.export.quickCopy.atom; + html:option(value='gitbook') &better-bibtex.Preferences.export.quickCopy.gitbook; + html:option(value='selectlink') &better-bibtex.Preferences.export.quickCopy.selectLink; + html:option(value='eta') &better-bibtex.Preferences.export.quickCopy.etaTemplate; hbox#better-bibtex-preferences-quickcopy-latex.better-bibtex-preferences-quickcopy-details label(bbt:preference='extensions.zotero.translators.better-bibtex.citeCommand') &better-bibtex.Preferences.export.quickCopy.latex.command; @@ -27,17 +26,15 @@ groupbox hbox#better-bibtex-preferences-quickcopy-orgmode.better-bibtex-preferences-quickcopy-details label(bbt:preference='extensions.zotero.translators.better-bibtex.quickCopyOrgMode') &better-bibtex.Preferences.export.quickCopy.orgMode; - menulist(preference='extensions.zotero.translators.better-bibtex.quickCopyOrgMode') - menupopup - menuitem(label='&better-bibtex.Preferences.export.quickCopy.orgMode.zotero;' value='zotero') - menuitem(label='&better-bibtex.Preferences.export.quickCopy.orgMode.citekey;' value='citationkey') + html:select(preference='extensions.zotero.translators.better-bibtex.quickCopyOrgMode') + html:option(value='zotero') &better-bibtex.Preferences.export.quickCopy.orgMode.zotero; + html:option(value='citationkey') &better-bibtex.Preferences.export.quickCopy.orgMode.citekey; hbox#better-bibtex-preferences-quickcopy-selectlink.better-bibtex-preferences-quickcopy-details label(bbt:preference='extensions.zotero.translators.better-bibtex.quickCopySelectLink') &better-bibtex.Preferences.export.quickCopy.selectLink; - menulist(preference='extensions.zotero.translators.better-bibtex.quickCopySelectLink') - menupopup - menuitem(label='&better-bibtex.Preferences.export.quickCopy.selectLink.zotero;' value='zotero') - menuitem(label='&better-bibtex.Preferences.export.quickCopy.selectLink.citekey;' value='citationkey') + html:select(preference='extensions.zotero.translators.better-bibtex.quickCopySelectLink') + html:option(value='zotero') &better-bibtex.Preferences.export.quickCopy.selectLink.zotero; + html:option(value='citationkey') &better-bibtex.Preferences.export.quickCopy.selectLink.citekey; vbox#better-bibtex-preferences-quickcopy-eta.better-bibtex-preferences-quickcopy-details label.text-link(href='https://retorque.re/zotero-better-bibtex/installation/preferences/citation-keys/#quick-copydrag-and-drop-citations' bbt:preference='extensions.zotero.translators.better-bibtex.quickCopyEta') &better-bibtex.Preferences.export.quickCopy.etaTemplate; diff --git a/content/Preferences/import.pug b/content/Preferences/import.pug index 856ab2a07f..82a351b00f 100644 --- a/content/Preferences/import.pug +++ b/content/Preferences/import.pug @@ -8,11 +8,10 @@ hbox radio(label="&better-bibtex.Preferences.advanced.import.sentenceCase.off;" value="off") hbox label(bbt:preference="extensions.zotero.translators.better-bibtex.importCaseProtection") &better-bibtex.Preferences.advanced.import.caseProtection; - menulist(preference="extensions.zotero.translators.better-bibtex.importCaseProtection") - menupopup - menuitem(label="&better-bibtex.Preferences.advanced.import.caseProtection.as_needed;" value="as-needed") - menuitem(label="&better-bibtex.Preferences.advanced.import.caseProtection.on;" value="on") - menuitem(label="&better-bibtex.Preferences.advanced.import.caseProtection.off;" value="off") + html:select(preference="extensions.zotero.translators.better-bibtex.importCaseProtection") + html:option(value='as-needed') &better-bibtex.Preferences.advanced.import.caseProtection.as_needed; + html:option(value='on') &better-bibtex.Preferences.advanced.import.caseProtection.on; + html:option(value='off') &better-bibtex.Preferences.advanced.import.caseProtection.off; image(tooltip="tooltip-importCaseProtection" src="chrome://zotero-better-bibtex/skin/attention.svg" width="16" height="16") checkbox(preference="extensions.zotero.translators.better-bibtex.auxImport" label="&better-bibtex.Preferences.citekey.AUXScanner.import;") diff --git a/content/ServerURL.xul b/content/ServerURL.xul index 9e1c2dd3d8..6553548015 100644 --- a/content/ServerURL.xul +++ b/content/ServerURL.xul @@ -14,14 +14,12 @@ - - - - - - - - + + BibLaTeX + BibTeX + CSL YAML + CSL JSON + &better-bibtex.ServerURL.description; diff --git a/setup/preferences.ts b/setup/preferences.ts index 53e8943352..e229a29110 100755 --- a/setup/preferences.ts +++ b/setup/preferences.ts @@ -301,8 +301,15 @@ class Docs extends ASTWalker { this.description(this.text(node)) break + case 'html:option': + if (!hidden) { + pref = this.attr(history.find(n => n.name === 'html:select'), 'preference') + if (pref) this.option(pref, this.text(node), this.attr(node, 'value', true)) + } + break + case 'menuitem': - // error('menulists are deprecated') + error('menulists are deprecated') if (!hidden) { pref = this.attr(history.find(n => n.name === 'menulist'), 'preference') if (pref) this.option(pref, this.attr(node, 'label', true), this.attr(node, 'value', true)) @@ -434,6 +441,7 @@ The Better BibTeX hidden preferences are preceded by “extensions.zotero.transl } } +/* class Convert extends ASTWalker { children(node) { if (node.block.nodes.find(node => node.type !== 'Tag')) error('unexpected', node.block.nodes.find(node => node.type !== 'Tag').type) @@ -463,6 +471,7 @@ class Convert extends ASTWalker { this.walk(node.block, history) } } +*/ function walk(cls, ast) { (new cls).walk(ast) @@ -481,7 +490,7 @@ const options = { walker.saveTypescript() walk(StripConfig, ast) - walk(Convert, ast) + // walk(Convert, ast) return ast },