www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 39c1024461b67965a79005ec8f2903f806fad639
parent 4b72792f595af6fb2f5ebfb644c117e7b26636b6
Author: Simon Kornblith <simon@simonster.com>
Date:   Tue,  6 Nov 2012 01:35:15 -0500

Copy citation list to clipboard, instead of multiple item citation

Diffstat:
Mchrome/content/zotero/fileInterface.js | 14++++----------
1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/chrome/content/zotero/fileInterface.js b/chrome/content/zotero/fileInterface.js @@ -400,7 +400,7 @@ var Zotero_File_Interface = new function() { * * Does not check that items are actual references (and not notes or attachments) */ - function copyItemsToClipboard(items, style, asHTML) { + function copyItemsToClipboard(items, style, asHTML, asCitations) { // copy to clipboard var transferable = Components.classes["@mozilla.org/widget/transferable;1"]. createInstance(Components.interfaces.nsITransferable); @@ -409,7 +409,7 @@ var Zotero_File_Interface = new function() { var style = Zotero.Styles.get(style); // add HTML - var bibliography = Zotero.Cite.makeFormattedBibliographyOrCitationList(style, items, "html"); + var bibliography = Zotero.Cite.makeFormattedBibliographyOrCitationList(style, items, "html", asCitations); var str = Components.classes["@mozilla.org/supports-string;1"]. createInstance(Components.interfaces.nsISupportsString); str.data = bibliography; @@ -418,7 +418,7 @@ var Zotero_File_Interface = new function() { // add text (or HTML source) if(!asHTML) { - var bibliography = Zotero.Cite.makeFormattedBibliographyOrCitationList(style, items, "text"); + var bibliography = Zotero.Cite.makeFormattedBibliographyOrCitationList(style, items, "text", asCitations); } var str = Components.classes["@mozilla.org/supports-string;1"]. createInstance(Components.interfaces.nsISupportsString); @@ -500,13 +500,7 @@ var Zotero_File_Interface = new function() { // generate bibliography try { if(io.method == 'copy-to-clipboard') { - if (io.mode == 'citation') { - copyCitationToClipboard(items, io.style); - } - else { - copyItemsToClipboard(items, io.style); - } - return; + copyItemsToClipboard(items, io.style, false, io.mode === "citation"); } else { var style = Zotero.Styles.get(io.style);