Last part of MKWS-352.
authorMike Taylor <mike@indexdata.com>
Mon, 19 Jan 2015 11:57:35 +0000 (11:57 +0000)
committerMike Taylor <mike@indexdata.com>
Mon, 19 Jan 2015 11:57:35 +0000 (11:57 +0000)
MKWS "targets" widget now use team.targetName() to emit the
displayName when known, falling back to the old behaviour of using the
ID when that is not known (because we have yet to get back a targets
facet that includes this target).

src/mkws-widget-main.js

index 4a1d23b..09565ac 100644 (file)
@@ -19,7 +19,7 @@ mkws.registerWidgetType('targets', function() {
     var cleandata = [];
     for (var i = 0; i < data.length; i++) {
       var cur = {};
-      cur.id = data[i].id;
+      cur.id = that.team.targetName(data[i].id);
       cur.hits = data[i].hits;
       cur.diagnostic = data[i].diagnostic;
       cur.message = data[i].message;