From 886ce6b4a65b30aaf4ea369fa42d6df2f0753d09 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 18 Jul 2007 15:01:05 +0000 Subject: [PATCH] Fixes #679, drag-and-drop to Word and "copy item to clipboard" shortcut don't work in dev r1546 Simon, fix any of this if it's incorrect --- chrome/content/zotero/fileInterface.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/chrome/content/zotero/fileInterface.js b/chrome/content/zotero/fileInterface.js index 92005c79d..fb0f2c85a 100644 --- a/chrome/content/zotero/fileInterface.js +++ b/chrome/content/zotero/fileInterface.js @@ -320,10 +320,10 @@ var Zotero_File_Interface = new function() { getService(Components.interfaces.nsIClipboard); var csl = Zotero.Cite.getStyle(style); - csl.preprocessItems(items); + var itemSet = csl.generateItemSet(items); // add HTML - var bibliography = csl.createBibliography(items, "HTML"); + var bibliography = csl.createBibliography(itemSet, "HTML"); var str = Components.classes["@mozilla.org/supports-string;1"]. createInstance(Components.interfaces.nsISupportsString); str.data = bibliography; @@ -331,7 +331,7 @@ var Zotero_File_Interface = new function() { transferable.setTransferData("text/html", str, bibliography.length*2); // add text - var bibliography = csl.createBibliography(items, "Text"); + var bibliography = csl.createBibliography(itemSet, "Text"); var str = Components.classes["@mozilla.org/supports-string;1"]. createInstance(Components.interfaces.nsISupportsString); str.data = bibliography; @@ -355,10 +355,14 @@ var Zotero_File_Interface = new function() { getService(Components.interfaces.nsIClipboard); var csl = Zotero.Cite.getStyle(style); - csl.preprocessItems(items); + var itemSet = csl.generateItemSet(items); + var itemIDs = [];; + for (var i=0; i