The "targets" widget now lists targets in alphabetical order.
authorMike Taylor <mike@indexdata.com>
Tue, 20 Jan 2015 08:16:18 +0000 (08:16 +0000)
committerMike Taylor <mike@indexdata.com>
Tue, 20 Jan 2015 08:16:18 +0000 (08:16 +0000)
src/mkws-widget-main.js

index e04b87d..5438348 100644 (file)
@@ -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}));
   });