Ticket #1710: fix-c-a-A-citation-quick-copy.patch

File fix-c-a-A-citation-quick-copy.patch, 8.7 KB (added by fbennett, 6 years ago)
  • chrome/content/zotero/fileInterface.js

    Only in zotero-trunk/chrome/content: .svn
    Only in zotero-trunk/chrome/content/zotero/bindings: .svn
    diff -u -w -r zotero-trunk/chrome/content/zotero/fileInterface.js zotero-run/chrome/content/zotero/fileInterface.js
    old new  
    419419                                                           getService(Components.interfaces.nsIClipboard); 
    420420                 
    421421                var style = Zotero.Styles.get(style).csl; 
    422                 style.updateItems([item.id for each(item in items)]); 
    423422                var citation = {"citationItems":[{id:item.id} for each(item in items)], properties:{}}; 
    424423                 
    425424                // add HTML 
    426                 style.setOutputFormat("html"); 
    427                 var bibliography = style.appendCitationCluster(citation, true)[0][1]; 
     425                var bibliography = style.previewCitationCluster(citation, [], [], "html"); 
    428426                var str = Components.classes["@mozilla.org/supports-string;1"]. 
    429427                                  createInstance(Components.interfaces.nsISupportsString); 
    430428                str.data = bibliography; 
     
    433431                 
    434432                // add text (or HTML source) 
    435433                if(!asHTML) { 
    436                         style.setOutputFormat("text"); 
    437                         var bibliography = style.appendCitationCluster(citation, true)[0][1]; 
     434                        var bibliography = style.previewCitationCluster(citation, [], [], "text"); 
    438435                } 
    439436                var str = Components.classes["@mozilla.org/supports-string;1"]. 
    440437                                  createInstance(Components.interfaces.nsISupportsString);