drop-down menu of all servers in ws_info
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 26 Jan 2009 00:06:04 +0000 (00:06 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 26 Jan 2009 00:06:04 +0000 (00:06 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11955 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/auth/controller.js
Open-ILS/xul/staff_client/chrome/content/main/main.xul

index c0c9df3..d448397 100644 (file)
@@ -119,6 +119,19 @@ auth.controller.prototype = {
                                                ['keypress'],
                                                handle_keypress
                                        ],
+                    'server_menu' : [
+                        ['render'],
+                        function(e) {
+                            return function() {
+                                for (var s in obj.data.ws_info) {
+                                    var mi = document.createElement('menuitem');
+                                    mi.setAttribute('label',s);
+                                    mi.setAttribute('value',s);
+                                    e.appendChild(mi);
+                                }
+                            };
+                        }
+                    ],
                                        'name_prompt' : [
                                                ['keypress'],
                                                handle_keypress
@@ -219,6 +232,16 @@ auth.controller.prototype = {
                        },
                        false
                );
+        obj.controller.view.server_prompt.addEventListener(
+            'command',
+            function (ev) {
+                obj.controller.view.name_prompt.focus();
+                obj.controller.view.name_prompt.select();
+                               obj.test_server(ev.target.value);
+                               obj.controller.render('ws_deck'); 
+            },
+            false
+        );
 
                // This talks to our ILS
                JSAN.use('auth.session');
index ebe5e0f..5347bcb 100644 (file)
                                        <row>
                                                <label value="&staff.main.auth.hostname;" control="server_prompt" accesskey="&staff.main.auth.hostname.accesskey;"/>
                                                <vbox>
-                                                       <textbox id="server_prompt"/>
+                                                       <menulist editable="true" id="server_prompt" flex="1">
+                                <menupopup id="server_menu" />
+                            </menulist>
                             <hbox>
                                                            <button label="&staff.main.auth.retest;" id="retest" accesskey="&staff.main.auth.retest.accesskey;" command="cmd_test_server"/>
                                                            <button label="&staff.main.auth.add_ssl_exception;" id="ssl_exception" command="cmd_ssl_exception"/>