[open-ils-commits] r11955 - in trunk/Open-ILS/xul/staff_client/chrome/content: auth main

svn at svn.open-ils.org svn at svn.open-ils.org
Sun Jan 25 19:06:05 EST 2009


Author: phasefx
Date: 2009-01-25 19:06:04 -0500 (Sun, 25 Jan 2009)
New Revision: 11955

Modified:
   trunk/Open-ILS/xul/staff_client/chrome/content/auth/controller.js
   trunk/Open-ILS/xul/staff_client/chrome/content/main/main.xul
Log:
drop-down menu of all servers in ws_info

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/auth/controller.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/auth/controller.js	2009-01-25 23:16:53 UTC (rev 11954)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/auth/controller.js	2009-01-26 00:06:04 UTC (rev 11955)
@@ -119,6 +119,19 @@
 						['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 @@
 			},
 			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');

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/main.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/main.xul	2009-01-25 23:16:53 UTC (rev 11954)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/main.xul	2009-01-26 00:06:04 UTC (rev 11955)
@@ -109,7 +109,9 @@
 					<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"/>



More information about the open-ils-commits mailing list