Fix empty value tags and comma separated values (#7289)

When a tag doesn't have a value it was showing a empty 'bubble'.
If value has several values separated by commas, make a 'bubble' for
each one.
This commit is contained in:
Adrián López
2017-01-18 16:02:40 +01:00
committed by Torkel Ödegaard
parent 94e901793a
commit e1b82e72eb

View File

@@ -98,7 +98,8 @@ function (_, TableModel) {
annotation: self.annotation,
time: + new Date(value[timeCol]),
title: value[titleCol],
tags: tagsCol.map(function(t) { return value[t]; }),
// Remove empty values, then split in different tags for comma separated values
tags: _.flatten(tagsCol.filter(function (t) { return value[t]; }).map(function(t) { return value[t].split(","); })),
text: value[textCol]
};