fix upgrading of documents with non-page locatorType

This commit is contained in:
Simon Kornblith 2010-08-16 08:19:12 +00:00
parent ecd6309fbc
commit 09ff9ec083

View file

@ -1260,7 +1260,10 @@ Zotero.Integration.Session.prototype.unserializeCitation = function(arg, index)
// for upgrade from Zotero 2.0 or earlier // for upgrade from Zotero 2.0 or earlier
for each(var citationItem in citation.citationItems) { for each(var citationItem in citation.citationItems) {
if(citationItem.locatorType) { if(citationItem.locatorType) {
citationItem.label = citationItem.locatorType; const locatorTypeTerms = ["page", "book", "chapter", "column", "figure", "folio",
"issue", "line", "note", "opus", "paragraph", "part", "section", "sub verbo",
"volume", "verse"];
citationItem.label = locatorTypeTerms[citationItem.locatorType];
delete citationItem.locatorType; delete citationItem.locatorType;
} else if(citationItem.suppressAuthor) { } else if(citationItem.suppressAuthor) {
citationItem["suppress-author"] = citationItem["suppressAuthor"]; citationItem["suppress-author"] = citationItem["suppressAuthor"];