Mercurial > hg > STI-GWT
diff war/scripts/sti/DataSet.js @ 68:8b58d9bc0bb6 trimmed_data
add functionality for additional tabular data from the description field (work in progress)
author | Sebastian Kruse <skruse@mpiwg-berlin.mpg.de> |
---|---|
date | Thu, 03 Jan 2013 18:43:28 +0100 |
parents | cf06b77a8bbd |
children |
line wrap: on
line diff
--- a/war/scripts/sti/DataSet.js Wed Jan 02 16:52:01 2013 +0100 +++ b/war/scripts/sti/DataSet.js Thu Jan 03 18:43:28 2013 +0100 @@ -11,7 +11,16 @@ this.objects = objects; this.termIdentifier = termIdentifier; this.maxGranularity = maxGranularity; - + + //check through each object if the description field contained a table, + //and "remember" the column names for easy access later + this.descriptionDataColumns = new Array(); + for (var i = 0; i < this.objects.length; i++) { + for (var columnName in this.objects[i].descriptionData) { + if ($.inArray(columnName, this.descriptionDataColumns) == -1) + this.descriptionDataColumns.push(columnName); + } + } } DataSet.prototype = {