diff --git a/chrome/content/zotero/tools/csledit.xul b/chrome/content/zotero/tools/csledit.xul index 3b5e5129a..dc2033c5a 100644 --- a/chrome/content/zotero/tools/csledit.xul +++ b/chrome/content/zotero/tools/csledit.xul @@ -64,7 +64,7 @@ var item = cslList.appendItem(style.title, style.styleID); } var pageList = document.getElementById('zotero-csl-page-type'); - var locators = Zotero.CSL.Global.getLocatorStrings(); + var locators = Zotero.Cite.labels; for each(var type in locators) { var locator = type; locator = locator[0].toUpperCase()+locator.substr(1); @@ -76,7 +76,7 @@ } function refresh() { var editor = document.getElementById('zotero-csl-editor') - generateBibliography(editor.value) + generateBibliography(editor.cslID) } @@ -93,12 +93,14 @@ var editor = document.getElementById('zotero-csl-editor') var style = Zotero.Styles.get(cslID); editor.value = Zotero.File.getContents(style.file); + editor.cslID = cslID; editor.doCommand(); document.getElementById('zotero-csl-list').value = cslID; } function generateBibliography(str) { + var editor = document.getElementById('zotero-csl-editor') var iframe = document.getElementById('zotero-csl-preview-box'); var items = mainWindow.ZoteroPane.getSelectedItems(); @@ -106,7 +108,7 @@ iframe.contentDocument.documentElement.innerHTML = '

No references selected in Zotero.

'; return; } - var csl; + var styleObject, styleEngine; if (str.indexOf("'; + citation.citationItems[i].position = parseInt(pos, 10); + var subcitation = [citation.citationItems[i]]; + citations += styleEngine.makeCitationCluster(subcitation) + '
'; } - var multCitations = '

Multi Citations

' + - csl.formatCitation(citation, "HTML"); + + var multCitations = '

Multi Citations (all with position "first")

' + + styleEngine.previewCitationCluster(citation, [], [], "html"); // Generate bibliography + styleEngine.updateItems(itemIds); + var bibData = styleEngine.makeBibliography(); var bibliography = '

Bibliography

' + - csl.formatBibliography(itemSet, "HTML"); + bibData[0].bibstart + bibData[1].join("") + bibData[0].bibend; + iframe.contentDocument.documentElement.innerHTML = '
' + citations + multCitations + bibliography