www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 28281e5fe6e53d6d05cdbdf9e2fc09e35ca48bdf
parent d78c31eb2ba64f4b5312ce3b98d71e4abd38f968
Author: Matt Burton <mcburton@gmail.com>
Date:   Wed, 25 Mar 2009 16:44:12 +0000

cleaned up broken creator parsing code. Setting creator to a single field instead

Diffstat:
Mtranslators/ProQuest.js | 13+++++--------
1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/translators/ProQuest.js b/translators/ProQuest.js @@ -69,18 +69,15 @@ function parseRIS(uris) { translator.setHandler("itemDone", function(obj, item) { var cre = new Array(); cre = item.creators; + for each(var e in cre) { - + if(!e['firstName']) { - //check if there is a first name, if not, take the first word in the last name - var names = e['lastName'].split(" "); - e['firstName']=names[0]; - e['lastName']=""; - for(var i = 1; i<names.length; i++) { - e['lastName']+=names[i]; - } + // Rather than parse, change creator to a single field. + e.fieldMode = 1; } } + if (item.publicationTitle) item.publicationTitle = Zotero.Utilities.trimInternal(item.publicationTitle.replace(/\([\d\-]+\)/g, "")); item.complete(); });