sort hostnames listed in login window
authorJason Etheridge <jason@esilibrary.com>
Thu, 11 Oct 2012 16:35:58 +0000 (12:35 -0400)
committerBen Shum <bshum@biblio.org>
Thu, 11 Oct 2012 17:23:56 +0000 (13:23 -0400)
for those of us with a lot of hosts to deal with :)

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/xul/staff_client/chrome/content/auth/controller.js

index 071fc66..d437a7a 100644 (file)
@@ -147,10 +147,15 @@ auth.controller.prototype = {
                         ['render'],
                         function(e) {
                             return function() {
+                                var list = [];
                                 for (var s in obj.data.ws_info) {
+                                    list.push(s);
+                                }
+                                list.sort();
+                                for (var i = 0; i < list.length; i++) {
                                     var mi = document.createElement('menuitem');
-                                    mi.setAttribute('label',s);
-                                    mi.setAttribute('value',s);
+                                    mi.setAttribute('label',list[i]);
+                                    mi.setAttribute('value',list[i]);
                                     e.appendChild(mi);
                                 }
                             };