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
9833df0977
commit
b21be5b99a
|
@ -86,7 +86,8 @@ var Zotero_File_Interface_Bibliography = new function() {
|
||||||
// ONLY FOR bibliography.xul: export options
|
// ONLY FOR bibliography.xul: export options
|
||||||
if(document.getElementById("save-as-rtf")) {
|
if(document.getElementById("save-as-rtf")) {
|
||||||
// restore saved bibliographic settings
|
// 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
|
// disable clipboard on the Mac, because it can't support formatted
|
||||||
// output
|
// output
|
||||||
|
|
|
@ -2484,9 +2484,10 @@ Zotero.Item.prototype.getAttachments = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
var sql = "SELECT A.itemID, value AS title FROM itemAttachments A "
|
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 "
|
+ "LEFT JOIN itemDataValues IDV "
|
||||||
+ "ON (fieldID=110 AND ID.valueID=IDV.valueID) "
|
+ "ON (ID.valueID=IDV.valueID) "
|
||||||
+ "WHERE sourceItemID=?";
|
+ "WHERE sourceItemID=?";
|
||||||
|
|
||||||
if (Zotero.Prefs.get('sortAttachmentsChronologically')) {
|
if (Zotero.Prefs.get('sortAttachmentsChronologically')) {
|
||||||
|
|
|
@ -586,9 +586,11 @@ Zotero.OpenURL = new function() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(key == "rft.description") {
|
} else if(key == "rft.description") {
|
||||||
item.extra = value;
|
item.abstractNote = value;
|
||||||
} else if(key == "rft.rights") {
|
} else if(key == "rft.rights") {
|
||||||
item.rights = value;
|
item.rights = value;
|
||||||
|
} else if(key == "rft.language") {
|
||||||
|
item.language = value;
|
||||||
} else if(key == "rft.subject") {
|
} else if(key == "rft.subject") {
|
||||||
item.tags.push(value);
|
item.tags.push(value);
|
||||||
} else if(key == "rft.type") {
|
} else if(key == "rft.type") {
|
||||||
|
|
|
@ -1584,7 +1584,7 @@ Zotero.ItemTreeView.prototype.onDragStart = function (evt,transferData,action)
|
||||||
Zotero.QuickCopy.getContentFromItems(items, format, exportCallback);
|
Zotero.QuickCopy.getContentFromItems(items, format, exportCallback);
|
||||||
}
|
}
|
||||||
else if (mode.indexOf('bibliography') == 0) {
|
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);
|
transferData.data.addDataForFlavour("text/unicode", content.text);
|
||||||
if (content.html) {
|
if (content.html) {
|
||||||
transferData.data.addDataForFlavour("text/html", 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
|
* If bibliography format, the process is synchronous and an object
|
||||||
* contain properties 'text' and 'html' is returned.
|
* 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, format] = format.split('=');
|
||||||
var [mode, contentType] = mode.split('/');
|
var [mode, contentType] = mode.split('/');
|
||||||
|
|
||||||
|
@ -192,10 +192,25 @@ Zotero.QuickCopy = new function() {
|
||||||
|
|
||||||
var csl = Zotero.Cite.getStyle(format);
|
var csl = Zotero.Cite.getStyle(format);
|
||||||
var itemSet = csl.createItemSet(items);
|
var itemSet = csl.createItemSet(items);
|
||||||
|
|
||||||
|
// 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 = {
|
var bibliography = {
|
||||||
text: csl.formatBibliography(itemSet, contentType == "html" ? "HTML" : "Text"),
|
text: csl.formatBibliography(itemSet, contentType == "html" ? "HTML" : "Text"),
|
||||||
html: csl.formatBibliography(itemSet, "HTML")
|
html: csl.formatBibliography(itemSet, "HTML")
|
||||||
};
|
};
|
||||||
|
}
|
||||||
return bibliography;
|
return bibliography;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -153,7 +153,7 @@ Zotero.Utilities.prototype.cleanTags = function(x) {
|
||||||
* Certain entities can be inserted manually:
|
* Certain entities can be inserted manually:
|
||||||
*
|
*
|
||||||
* <ZOTEROBREAK/> => <br/>
|
* <ZOTEROBREAK/> => <br/>
|
||||||
* <ZOTEROHELLIP/> => …
|
* <ZOTEROHELLIP/> => …
|
||||||
*/
|
*/
|
||||||
Zotero.Utilities.prototype.htmlSpecialChars = function(str) {
|
Zotero.Utilities.prototype.htmlSpecialChars = function(str) {
|
||||||
if (typeof str != 'string') {
|
if (typeof str != 'string') {
|
||||||
|
@ -178,7 +178,7 @@ Zotero.Utilities.prototype.htmlSpecialChars = function(str) {
|
||||||
case 'BREAK':
|
case 'BREAK':
|
||||||
return '<br/>';
|
return '<br/>';
|
||||||
case 'HELLIP':
|
case 'HELLIP':
|
||||||
return '…';
|
return '…';
|
||||||
default:
|
default:
|
||||||
return p1;
|
return p1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1720,6 +1720,7 @@ Zotero.Browser = new function() {
|
||||||
|
|
||||||
// Create a hidden browser
|
// Create a hidden browser
|
||||||
var hiddenBrowser = win.document.createElement("browser");
|
var hiddenBrowser = win.document.createElement("browser");
|
||||||
|
hiddenBrowser.setAttribute('type', 'content');
|
||||||
hiddenBrowser.setAttribute('disablehistory', 'true');
|
hiddenBrowser.setAttribute('disablehistory', 'true');
|
||||||
win.document.documentElement.appendChild(hiddenBrowser);
|
win.document.documentElement.appendChild(hiddenBrowser);
|
||||||
Zotero.debug("created hidden browser ("
|
Zotero.debug("created hidden browser ("
|
||||||
|
|
1523
scrapers.sql
1523
scrapers.sql
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user