From: Mike Taylor Date: Tue, 20 Jan 2015 08:16:18 +0000 (+0000) Subject: The "targets" widget now lists targets in alphabetical order. X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=fedd5ca7b6f69684e6c59cec1c92e82952cafa9c;hp=cf87e89209beb9e0c89bc6bf719f219746a71eb2 The "targets" widget now lists targets in alphabetical order. --- diff --git a/src/mkws-widget-main.js b/src/mkws-widget-main.js index e04b87d..5438348 100644 --- a/src/mkws-widget-main.js +++ b/src/mkws-widget-main.js @@ -29,6 +29,8 @@ mkws.registerWidgetType('targets', function() { 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})); });