comparison war/scripts/sti/STICore.js @ 70:e6b72868e395 trimmed_data

Allow more than one field of the same name (append the content)
author Sebastian Kruse <skruse@mpiwg-berlin.mpg.de>
date Thu, 10 Jan 2013 13:21:12 +0100
parents 8b58d9bc0bb6
children a610b45d0f90
comparison
equal deleted inserted replaced
69:ea856995abac 70:e6b72868e395
379 if (isHeader) { 379 if (isHeader) {
380 lastHeader = $(this).text(); 380 lastHeader = $(this).text();
381 isHeader = false; 381 isHeader = false;
382 } else { 382 } else {
383 var value = $(this).text(); 383 var value = $(this).text();
384 descriptionData[lastHeader] = value; 384 if (descriptionData[lastHeader] != null)
385 //append if a field occures more than once
386 descriptionData[lastHeader] += "\n" + value;
387 else
388 descriptionData[lastHeader] = value;
385 isHeader = true; 389 isHeader = true;
386 } 390 }
387 } 391 }
388 ) 392 )
389 } 393 }