Towards a proper fix for MKWS-352.
authorMike Taylor <mike@indexdata.com>
Mon, 19 Jan 2015 12:29:54 +0000 (12:29 +0000)
committerMike Taylor <mike@indexdata.com>
Mon, 19 Jan 2015 12:29:54 +0000 (12:29 +0000)
The targets widget now captures the "name" element in Pazpar2's
"bytargets" response, which it was for some inexplicable reason
discarding.

src/mkws-widget-main.js

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