Add Style Editor to Developer menu

This commit is contained in:
Dan Stillman 2019-08-05 05:05:57 -04:00
parent 2b041ecfd4
commit 7d7afc2b46
4 changed files with 11 additions and 2 deletions

View file

@ -449,6 +449,10 @@ function openRunJSWindow() {
window.open('chrome://zotero/content/runJS.html', 'run-js', 'width=900,height=700,resizable');
}
function openStyleEditor() {
window.open('chrome://zotero/content/tools/csledit.xul', 'style-editor', 'width=950,height=700,resizable');
}
function openScaffold() {
window.open('chrome://scaffold/content/scaffold.xul', 'scaffold', 'chrome,resizable');
}

View file

@ -202,6 +202,7 @@
<menupopup>
<menuitem id="menu_errorConsole" label="Error Console" oncommand="toJavaScriptConsole()"/>
<menuitem id="menu_runJS" label="Run JavaScript" oncommand="openRunJSWindow()"/>
<menuitem id="style-editor-menu-item" label="Style Editor" oncommand="openStyleEditor()"/>
<menuitem id="scaffold-menu-item" label="Translator Editor" oncommand="openScaffold()"/>
</menupopup>
</menu>

View file

@ -27,7 +27,9 @@ var Zotero_CSL_Editor = new function() {
this.init = init;
this.handleKeyPress = handleKeyPress;
this.loadCSL = loadCSL;
function init() {
async function init() {
await Zotero.Schema.schemaUpdatePromise;
Zotero.Styles.populateLocaleList(document.getElementById("locale-menu"));
var cslList = document.getElementById('zotero-csl-list');

View file

@ -59,7 +59,9 @@
</menupopup>
</menulist>
<menulist id="locale-menu" oncommand="Zotero.Prefs.set('export.lastLocale', this.value); Zotero_CSL_Editor.refresh()"/>
<menulist id="zotero-csl-list" style="min-height: 1.6em; min-width: 100px" flex="1" oncommand="Zotero_CSL_Editor.onStyleSelected(this.value)"/>
</hbox>
<hbox align="center">
<menulist id="zotero-csl-list" style="margin-left: 7px; min-height: 1.6em; min-width: 100px" oncommand="Zotero_CSL_Editor.onStyleSelected(this.value)"/>
</hbox>
<textbox id="zotero-csl-editor" type="timed" timeout="250" multiline="true"
flex="1"