From 415f6aa2ecb360f8b1852a09d72cbcfee032bc85 Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 26 Jan 2009 00:06:04 +0000 Subject: [PATCH] drop-down menu of all servers in ws_info git-svn-id: svn://svn.open-ils.org/ILS/trunk@11955 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../staff_client/chrome/content/auth/controller.js | 23 ++++++++++++++++++++++ .../xul/staff_client/chrome/content/main/main.xul | 4 +++- 2 files changed, 26 insertions(+), 1 deletion(-) 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 c0c9df330d..d4483972f0 100644 --- a/Open-ILS/xul/staff_client/chrome/content/auth/controller.js +++ b/Open-ILS/xul/staff_client/chrome/content/auth/controller.js @@ -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'); diff --git a/Open-ILS/xul/staff_client/chrome/content/main/main.xul b/Open-ILS/xul/staff_client/chrome/content/main/main.xul index ebe5e0f361..5347bcb59c 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/main.xul +++ b/Open-ILS/xul/staff_client/chrome/content/main/main.xul @@ -109,7 +109,9 @@