From b78b7eb777ea6e995c8c180dd5fcd7d05fb6a60c Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 7 Aug 2007 19:10:47 +0000 Subject: [PATCH] Closes #700, Update csledit.xul to use new citation API Think this works. Reopen if problems. --- chrome/content/zotero/fileInterface.js | 3 +-- chrome/content/zotero/tools/csledit.xul | 32 ++++++++++++++++++------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/chrome/content/zotero/fileInterface.js b/chrome/content/zotero/fileInterface.js index 94a455f0c..f086c94e0 100644 --- a/chrome/content/zotero/fileInterface.js +++ b/chrome/content/zotero/fileInterface.js @@ -318,7 +318,6 @@ var Zotero_File_Interface = new function() { createInstance(Components.interfaces.nsITransferable); var clipboardService = Components.classes["@mozilla.org/widget/clipboard;1"]. getService(Components.interfaces.nsIClipboard); - var csl = Zotero.Cite.getStyle(style); var itemSet = csl.generateItemSet(items); @@ -358,7 +357,7 @@ var Zotero_File_Interface = new function() { var itemSet = csl.generateItemSet(items); var itemIDs = []; for (var i=0; i'; + for (var i=0; i'; } - // Generate multiple citations - var multCitations = csl.createCitation({citationType:1, items:items}, "HTML"); - // Generate bibliography - var bibliography = csl.createBibliography(items, "HTML"); + // Generate multiple citations + var multCitations = csl.createCitation(itemSet, itemSet.getItemsByIds(itemIDs), "HTML", 1, null, null); + + // Generate bibliography + var bibliography = csl.createBibliography(itemSet, "HTML"); iframe.contentDocument.documentElement.innerHTML = citations + '
' + multCitations + '
' + bibliography; }