Copy citation list to clipboard, instead of multiple item citation
This commit is contained in:
parent
4b72792f59
commit
39c1024461
1 changed files with 4 additions and 10 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue