Merged revisions 2890,2895-2896,2898,2900-2901,2905,2909-2911,2913,2916-2917,2919,2922,2936-2937,2953-2954,2957,2959,2962-2965,2969-2970,2973-2975,2979-2980,2983 via svnmerge from 1.0 branch
This commit is contained in:
parent
d5805446c7
commit
6e7bfe413e
8 changed files with 1504 additions and 141 deletions
|
@ -86,7 +86,8 @@ var Zotero_File_Interface_Bibliography = new function() {
|
|||
// ONLY FOR bibliography.xul: export options
|
||||
if(document.getElementById("save-as-rtf")) {
|
||||
// restore saved bibliographic settings
|
||||
document.getElementById(Zotero.Prefs.get("export.bibliographySettings")).setAttribute("selected", "true");
|
||||
document.getElementById('output-radio').selectedItem =
|
||||
document.getElementById(Zotero.Prefs.get("export.bibliographySettings"));
|
||||
|
||||
// disable clipboard on the Mac, because it can't support formatted
|
||||
// output
|
||||
|
|
|
@ -2484,9 +2484,10 @@ Zotero.Item.prototype.getAttachments = function() {
|
|||
}
|
||||
|
||||
var sql = "SELECT A.itemID, value AS title FROM itemAttachments A "
|
||||
+ "NATURAL JOIN items I LEFT JOIN itemData ID USING (itemID) "
|
||||
+ "NATURAL JOIN items I LEFT JOIN itemData ID "
|
||||
+ "ON (fieldID=110 AND A.itemID=ID.itemID) "
|
||||
+ "LEFT JOIN itemDataValues IDV "
|
||||
+ "ON (fieldID=110 AND ID.valueID=IDV.valueID) "
|
||||
+ "ON (ID.valueID=IDV.valueID) "
|
||||
+ "WHERE sourceItemID=?";
|
||||
|
||||
if (Zotero.Prefs.get('sortAttachmentsChronologically')) {
|
||||
|
|
|
@ -586,10 +586,12 @@ Zotero.OpenURL = new function() {
|
|||
}
|
||||
}
|
||||
} else if(key == "rft.description") {
|
||||
item.extra = value;
|
||||
item.abstractNote = value;
|
||||
} else if(key == "rft.rights") {
|
||||
item.rights = value;
|
||||
} else if(key == "rft.subject") {
|
||||
} else if(key == "rft.language") {
|
||||
item.language = value;
|
||||
} else if(key == "rft.subject") {
|
||||
item.tags.push(value);
|
||||
} else if(key == "rft.type") {
|
||||
if(Zotero.ItemTypes.getID(value)) item.itemType = value;
|
||||
|
|
|
@ -1584,7 +1584,7 @@ Zotero.ItemTreeView.prototype.onDragStart = function (evt,transferData,action)
|
|||
Zotero.QuickCopy.getContentFromItems(items, format, exportCallback);
|
||||
}
|
||||
else if (mode.indexOf('bibliography') == 0) {
|
||||
var content = Zotero.QuickCopy.getContentFromItems(items, format);
|
||||
var content = Zotero.QuickCopy.getContentFromItems(items, format, null, evt.shiftKey);
|
||||
transferData.data.addDataForFlavour("text/unicode", content.text);
|
||||
if (content.html) {
|
||||
transferData.data.addDataForFlavour("text/html", content.html);
|
||||
|
|
|
@ -131,7 +131,7 @@ Zotero.QuickCopy = new function() {
|
|||
* If bibliography format, the process is synchronous and an object
|
||||
* contain properties 'text' and 'html' is returned.
|
||||
*/
|
||||
function getContentFromItems(items, format, callback) {
|
||||
function getContentFromItems(items, format, callback, modified) {
|
||||
var [mode, format] = format.split('=');
|
||||
var [mode, contentType] = mode.split('/');
|
||||
|
||||
|
@ -192,10 +192,25 @@ Zotero.QuickCopy = new function() {
|
|||
|
||||
var csl = Zotero.Cite.getStyle(format);
|
||||
var itemSet = csl.createItemSet(items);
|
||||
var bibliography = {
|
||||
text: csl.formatBibliography(itemSet, contentType == "html" ? "HTML" : "Text"),
|
||||
html: csl.formatBibliography(itemSet, "HTML")
|
||||
};
|
||||
|
||||
// Copy citations if shift key pressed
|
||||
if (modified) {
|
||||
var itemIDs = [];
|
||||
for (var i=0; i<items.length; i++) {
|
||||
itemIDs.push(items[i].id);
|
||||
}
|
||||
var citation = csl.createCitation(itemSet.getItemsByIds(itemIDs));
|
||||
var bibliography = {
|
||||
text: csl.formatCitation(citation, contentType == "html" ? 'HTML' : 'Text'),
|
||||
html: csl.formatCitation(citation, "HTML")
|
||||
}
|
||||
}
|
||||
else {
|
||||
var bibliography = {
|
||||
text: csl.formatBibliography(itemSet, contentType == "html" ? "HTML" : "Text"),
|
||||
html: csl.formatBibliography(itemSet, "HTML")
|
||||
};
|
||||
}
|
||||
return bibliography;
|
||||
}
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ Zotero.Utilities.prototype.cleanTags = function(x) {
|
|||
* Certain entities can be inserted manually:
|
||||
*
|
||||
* <ZOTEROBREAK/> => <br/>
|
||||
* <ZOTEROHELLIP/> => …
|
||||
* <ZOTEROHELLIP/> => …
|
||||
*/
|
||||
Zotero.Utilities.prototype.htmlSpecialChars = function(str) {
|
||||
if (typeof str != 'string') {
|
||||
|
@ -178,7 +178,7 @@ Zotero.Utilities.prototype.htmlSpecialChars = function(str) {
|
|||
case 'BREAK':
|
||||
return '<br/>';
|
||||
case 'HELLIP':
|
||||
return '…';
|
||||
return '…';
|
||||
default:
|
||||
return p1;
|
||||
}
|
||||
|
|
|
@ -1720,6 +1720,7 @@ Zotero.Browser = new function() {
|
|||
|
||||
// Create a hidden browser
|
||||
var hiddenBrowser = win.document.createElement("browser");
|
||||
hiddenBrowser.setAttribute('type', 'content');
|
||||
hiddenBrowser.setAttribute('disablehistory', 'true');
|
||||
win.document.documentElement.appendChild(hiddenBrowser);
|
||||
Zotero.debug("created hidden browser ("
|
||||
|
|
1599
scrapers.sql
1599
scrapers.sql
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue