closes #574, create bibliography chokes on forum post
fixes copy to clipboard (from dialog, not quick copy) feature
This commit is contained in:
parent
a9c2536515
commit
632e98691d
|
@ -370,8 +370,8 @@ var Zotero_File_Interface = new function() {
|
||||||
|
|
||||||
// generate bibliography
|
// generate bibliography
|
||||||
try {
|
try {
|
||||||
if (io.output == 'clipboard') {
|
if(io.output == 'copy-to-clipboard') {
|
||||||
this.copyItemsToClipboard(items, io.style);
|
copyItemsToClipboard(items, io.style);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -1102,9 +1102,6 @@ Zotero.CSL.prototype._getCitation = function(item, position, locatorType, locato
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!type) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
Zotero.debug("CSL: using CSL type "+typeName);
|
Zotero.debug("CSL: using CSL type "+typeName);
|
||||||
|
|
||||||
// remove previous ignore entries from list
|
// remove previous ignore entries from list
|
||||||
|
@ -1730,12 +1727,13 @@ Zotero.CSL.Global.fallbackTypeMappings = {
|
||||||
map:"article",
|
map:"article",
|
||||||
blogPost:"article",
|
blogPost:"article",
|
||||||
instantMessage:"article",
|
instantMessage:"article",
|
||||||
audioRecording:"book",
|
forumPost:"article",
|
||||||
|
audioRecording:"article",
|
||||||
presentation:"article",
|
presentation:"article",
|
||||||
videoRecording:"book",
|
videoRecording:"article",
|
||||||
tvBroadcast:"book",
|
tvBroadcast:"article",
|
||||||
radioBroadcast:"book",
|
radioBroadcast:"article",
|
||||||
podcast:"book",
|
podcast:"article",
|
||||||
computerProgram:"book"
|
computerProgram:"book"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1744,9 +1742,18 @@ Zotero.CSL.prototype._getTypeFromItem = function(item) {
|
||||||
|
|
||||||
// get type
|
// get type
|
||||||
Zotero.debug("CSL: parsing item of Scholar type "+scholarType);
|
Zotero.debug("CSL: parsing item of Scholar type "+scholarType);
|
||||||
if(Zotero.CSL.Global.optionalTypeMappings[scholarType]) {
|
if(Zotero.CSL.Global.optionalTypeMappings[scholarType]) { // if there is an optional type mapping
|
||||||
return [Zotero.CSL.Global.optionalTypeMappings[scholarType], Zotero.CSL.Global.fallbackTypeMappings[scholarType]];
|
var array = [Zotero.CSL.Global.optionalTypeMappings[scholarType]];
|
||||||
} else if(Zotero.CSL.Global.fallbackTypeMappings[scholarType]) {
|
|
||||||
|
// check if there is a fallback type mapping; otherwise, use article
|
||||||
|
if(Zotero.CSL.Global.fallbackTypeMappings[scholarType]) {
|
||||||
|
array.push(Zotero.CSL.Global.fallbackTypeMappings[scholarType]);
|
||||||
|
} else {
|
||||||
|
array.push("article");
|
||||||
|
}
|
||||||
|
|
||||||
|
return array;
|
||||||
|
} else if(Zotero.CSL.Global.fallbackTypeMappings[scholarType]) { // if there is a fallback type mapping
|
||||||
return [Zotero.CSL.Global.fallbackTypeMappings[scholarType]];
|
return [Zotero.CSL.Global.fallbackTypeMappings[scholarType]];
|
||||||
} else { // use article as backup type mapping
|
} else { // use article as backup type mapping
|
||||||
return ["article"];
|
return ["article"];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user