commit 1a7629a589541c3b384e2cb4d0162b73e38797e6
parent f672b05d89d69a67e7d00b5b7fe9fa4320ecc623
Author: Dan Stillman <dstillman@zotero.org>
Date: Mon, 9 Aug 2010 01:55:50 +0000
Closes #1710, Clipboard citation copy w/Ctrl-Alt-A always Ibid.
Frank's patch
Diffstat:
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/chrome/content/zotero/fileInterface.js b/chrome/content/zotero/fileInterface.js
@@ -419,12 +419,10 @@ var Zotero_File_Interface = new function() {
getService(Components.interfaces.nsIClipboard);
var style = Zotero.Styles.get(style).csl;
- style.updateItems([item.id for each(item in items)]);
var citation = {"citationItems":[{id:item.id} for each(item in items)], properties:{}};
// add HTML
- style.setOutputFormat("html");
- var bibliography = style.appendCitationCluster(citation, true)[0][1];
+ var bibliography = style.previewCitationCluster(citation, [], [], "html");
var str = Components.classes["@mozilla.org/supports-string;1"].
createInstance(Components.interfaces.nsISupportsString);
str.data = bibliography;
@@ -433,8 +431,7 @@ var Zotero_File_Interface = new function() {
// add text (or HTML source)
if(!asHTML) {
- style.setOutputFormat("text");
- var bibliography = style.appendCitationCluster(citation, true)[0][1];
+ var bibliography = style.previewCitationCluster(citation, [], [], "text");
}
var str = Components.classes["@mozilla.org/supports-string;1"].
createInstance(Components.interfaces.nsISupportsString);