diff --git a/chrome/content/zotero/tools/csledit.js b/chrome/content/zotero/tools/csledit.js index 8e00ba9c5..21b640910 100644 --- a/chrome/content/zotero/tools/csledit.js +++ b/chrome/content/zotero/tools/csledit.js @@ -35,7 +35,7 @@ var Zotero_CSL_Editor = new function() { var lastStyle = Zotero.Prefs.get('export.lastStyle'); - var styles = Zotero.Styles.getAll(); + var styles = Zotero.Styles.getVisible(); var currentStyle = null; for (let style of styles) { if (style.source) { @@ -119,7 +119,7 @@ var Zotero_CSL_Editor = new function() { function loadCSL(cslID) { var editor = document.getElementById('zotero-csl-editor'); var style = Zotero.Styles.get(cslID); - editor.value = Zotero.File.getContents(style.file); + editor.value = style.getXML(); editor.cslID = cslID; editor.doCommand(); document.getElementById('zotero-csl-list').value = cslID; diff --git a/chrome/content/zotero/xpcom/style.js b/chrome/content/zotero/xpcom/style.js index 9c63947f4..bdd97be0a 100644 --- a/chrome/content/zotero/xpcom/style.js +++ b/chrome/content/zotero/xpcom/style.js @@ -595,6 +595,9 @@ Zotero.Style = function (style, path) { this.path = path; this.fileName = OS.Path.basename(path); } + else { + this.string = style; + } this.styleID = Zotero.Utilities.xpathText(doc, '/csl:style/csl:info[1]/csl:id[1]', Zotero.Styles.ns);