From 7d7afc2b4617c7997731e99e98f8d00aa18b539f Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 5 Aug 2019 05:05:57 -0400 Subject: [PATCH] Add Style Editor to Developer menu --- chrome/content/zotero/standalone/standalone.js | 4 ++++ chrome/content/zotero/standalone/standalone.xul | 1 + chrome/content/zotero/tools/csledit.js | 4 +++- chrome/content/zotero/tools/csledit.xul | 4 +++- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/standalone/standalone.js b/chrome/content/zotero/standalone/standalone.js index d3837c90f4..038d6533e9 100644 --- a/chrome/content/zotero/standalone/standalone.js +++ b/chrome/content/zotero/standalone/standalone.js @@ -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'); } diff --git a/chrome/content/zotero/standalone/standalone.xul b/chrome/content/zotero/standalone/standalone.xul index b501d6916e..901350b30e 100644 --- a/chrome/content/zotero/standalone/standalone.xul +++ b/chrome/content/zotero/standalone/standalone.xul @@ -202,6 +202,7 @@ + diff --git a/chrome/content/zotero/tools/csledit.js b/chrome/content/zotero/tools/csledit.js index a55d216a29..cd57d9dddf 100644 --- a/chrome/content/zotero/tools/csledit.js +++ b/chrome/content/zotero/tools/csledit.js @@ -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'); diff --git a/chrome/content/zotero/tools/csledit.xul b/chrome/content/zotero/tools/csledit.xul index df4acc1e32..78316b62ad 100644 --- a/chrome/content/zotero/tools/csledit.xul +++ b/chrome/content/zotero/tools/csledit.xul @@ -59,7 +59,9 @@ - + + +