Support single-field mode in translators (with .fieldMode=1)

This commit is contained in:
Dan Stillman 2009-03-10 00:34:16 +00:00
parent f96d5c1cac
commit 41aad110c7

View file

@ -1270,10 +1270,20 @@ Zotero.Translate.prototype._itemDone = function(item, attachedTo) {
var creatorTypeID = 1;
}
var fields = {
firstName: data[j].firstName,
lastName: data[j].lastName
};
// Single-field mode
if (data[j].fieldMode == 1) {
var fields = {
lastName: data[j].lastName,
fieldMode: 1
};
}
// Two-field mode
else {
var fields = {
firstName: data[j].firstName,
lastName: data[j].lastName
};
}
var creatorDataID = Zotero.Creators.getDataID(fields);
if(creatorDataID) {