X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-widget-main.js;h=8fad7d976652986490af226e20de46f9c30e9ccb;hb=87a5e53fb30e78b1ffd42b3d049d94d7d94400d6;hp=e04b87df144a42c6e08e8f16a8507acc394e7c2a;hpb=72982e91181c46d88a2146d9a53deb64677fc498;p=mkws-moved-to-github.git diff --git a/src/mkws-widget-main.js b/src/mkws-widget-main.js index e04b87d..8fad7d9 100644 --- a/src/mkws-widget-main.js +++ b/src/mkws-widget-main.js @@ -25,10 +25,12 @@ mkws.registerWidgetType('targets', function() { cur.diagnostic = data[i].diagnostic; cur.message = data[i].message; cur.records = data[i].records; - cur.state = data[i].state; + cur.state = data[i].state.replace(/^Client_/, ''); cleandata.push(cur); } + cleandata.sort(function(a,b) { return a.name.localeCompare(b.name) }); + var template = that.team.loadTemplate(that.config.template || "targets"); that.node.html(template({data: cleandata})); }); @@ -257,7 +259,7 @@ mkws.registerWidgetType('ranking', function() { var cur = {}; var opt = this.config.sort_options[i]; cur.key = opt[0]; - cur.label = opt.length == 1 ? opt[0] : opt[1]; + cur.label = opt.length == 1 ? opt[0] : mkws.M(opt[1]); if (order == cur.key || order == cur.label) cur.selected = true; output.sort.push(cur); }