From: Jason Etheridge <jason@esilibrary.com>
Date: Thu, 11 Oct 2012 16:35:58 +0000 (-0400)
Subject: sort hostnames listed in login window
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2c76b1269c1880356ec2327a59007338091fa617;p=evergreen%2Fmasslnc.git

sort hostnames listed in login window

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>
---

diff --git a/Open-ILS/xul/staff_client/chrome/content/auth/controller.js b/Open-ILS/xul/staff_client/chrome/content/auth/controller.js
index 071fc665fb..d437a7a7c4 100644
--- a/Open-ILS/xul/staff_client/chrome/content/auth/controller.js
+++ b/Open-ILS/xul/staff_client/chrome/content/auth/controller.js
@@ -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);
                                 }
                             };