comparison war/scripts/sti/STICore.js @ 72:4d3df00f5b98 trimmed_data

added comments for HTML content in cells
author Sebastian Kruse <skruse@mpiwg-berlin.mpg.de>
date Fri, 11 Jan 2013 10:15:45 +0100
parents a610b45d0f90
children 02cdf454d94b
comparison
equal deleted inserted replaced
71:a610b45d0f90 72:4d3df00f5b98
378 function() { 378 function() {
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();
384 var value = ""; 383 var value = "";
385 384
385 //if this td contains HTML, serialize all
386 //it's children (the "content"!)
386 $(this).children().each( 387 $(this).children().each(
387 function() { 388 function() {
388 value += (new XMLSerializer()).serializeToString(this); 389 value += (new XMLSerializer()).serializeToString(this);
389 } 390 }
390 ); 391 );
391 392
393 //no HTML content (or no content at all)
392 if (value.length == 0) 394 if (value.length == 0)
393 value = $(this).text(); 395 value = $(this).text();
394 396
395 if (descriptionData[lastHeader] != null) 397 if (descriptionData[lastHeader] != null)
396 //append if a field occures more than once 398 //append if a field occures more than once