Fix csledit
Closes #1149 (There's an additional change in #1149, but as far as I can tell it's not necessary for csledit.xul.)
This commit is contained in:
parent
3a2fb2938d
commit
a57ea28d42
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user