From 83067ca7cb512cd76db625e5db9d08dd385df8e3 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 23 Jun 2016 00:05:35 +0200 Subject: sorting show and musicpool names for selector diff --git a/www/js/musicpools.js b/www/js/musicpools.js index ac5a07e..9d21427 100644 --- a/www/js/musicpools.js +++ b/www/js/musicpools.js @@ -98,7 +98,9 @@ Rdxport.MusicpoolsView.prototype.updateSelector = function() { $musicpoolSelector.off(); $('option', $musicpoolSelector).remove(); - $(this.model.groups).each(function(index, musicpool) { + $(this.model.groups).sort(function(a, b) { + return a.title.toLowerCase() >= b.title.toLowerCase() + }).each(function(index, musicpool) { var name = musicpool.title + ' (' + musicpool.clock + ')'; $musicpoolSelector.append($('