[open-ils-commits] r14936 - in trunk/Open-ILS/xul/staff_client/server: locale/en-US patron (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Nov 17 02:10:54 EST 2009
Author: phasefx
Date: 2009-11-17 02:10:49 -0500 (Tue, 17 Nov 2009)
New Revision: 14936
Modified:
trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
trunk/Open-ILS/xul/staff_client/server/patron/staged.js
trunk/Open-ILS/xul/staff_client/server/patron/staged.xul
Log:
library selector for staged patron list
Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties 2009-11-17 04:52:34 UTC (rev 14935)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties 2009-11-17 07:10:49 UTC (rev 14936)
@@ -319,6 +319,7 @@
staff.patron.summary.standing_penalty.remove=Remove
staff.patron.summary.standing_penalty.none=No Blocks/Penalties
staff.patron.staged.register_patron=Registering Staged Patron: %1$s
+staff.patron.staged.lib_menus.missing_library_list=Missing library list.
staff.patron.standing_penalty.apply_error=Error applying %1$s block/standing penalty.
staff.patron.standing_penalty.remove_error=Error removing %1$s block/standing penalty.
staff.patron.standing_penalty.update_error=Error updating block/standing penalty.
Modified: trunk/Open-ILS/xul/staff_client/server/patron/staged.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/staged.js 2009-11-17 04:52:34 UTC (rev 14935)
+++ trunk/Open-ILS/xul/staff_client/server/patron/staged.js 2009-11-17 07:10:49 UTC (rev 14936)
@@ -1,9 +1,9 @@
-var list; var error; var net; var rows;
+var list; var error; var net; var rows; var menu_lib;
function $(id) { return document.getElementById(id); }
//// parent interfaces often call these
-function default_focus() { $('stgu_list').focus(); }
+function default_focus() { $('lib_menu').focus(); }
function refresh() { populate_list(); }
////
@@ -35,6 +35,7 @@
dojo.require('openils.Util');
+ populate_lib_menu();
init_list();
$('list_actions').appendChild( list.render_list_actions() );
list.set_list_actions();
@@ -49,6 +50,36 @@
}
}
+function populate_lib_menu() {
+ try {
+ JSAN.use('util.widgets');
+ var x = document.getElementById('lib_menu_placeholder');
+ if (!x) { return; }
+ util.widgets.remove_children( x );
+
+ JSAN.use('util.file');
+ var file = new util.file('offline_ou_list');
+ if (file._file.exists()) {
+ var list_data = file.get_object(); file.close();
+ var ml = util.widgets.make_menulist( list_data[0], ses('ws_ou') );
+ ml.setAttribute('id','lib_menu');
+ x.appendChild( ml );
+ ml.addEventListener(
+ 'command',
+ function(ev) {
+ menu_lib = ev.target.value;
+ populate_list();
+ },
+ false
+ );
+ } else {
+ alert($("patronStrings").getString('staff.patron.staged.lib_menus.missing_library_list'));
+ }
+ } catch(E) {
+ alert('Error in staged.js, populate_lib_menu(): ' + E);
+ }
+}
+
function gen_event_handler(method) { // cancel or load?
return function(ev) {
try {
@@ -222,7 +253,7 @@
fieldmapper.standardRequest(
[api['FM_STGU_RETRIEVE'].app, api['FM_STGU_RETRIEVE'].method ],
{ async: true,
- params: [ses(), ses('ws_ou')],
+ params: [ses(), menu_lib || ses('ws_ou')],
onresponse : onResponse,
onerror : onError,
oncomplete : function() {
Modified: trunk/Open-ILS/xul/staff_client/server/patron/staged.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/staged.xul 2009-11-17 04:52:34 UTC (rev 14935)
+++ trunk/Open-ILS/xul/staff_client/server/patron/staged.xul 2009-11-17 07:10:49 UTC (rev 14936)
@@ -41,6 +41,7 @@
<caption id="staged_caption" label="&staff.patron_display.staged.caption;"/>
<vbox flex="0">
<hbox flex="1">
+ <hbox id="lib_menu_placeholder" />
<spacer flex="1" />
<progressmeter id="progress" flex="1" hidden="true" mode="undetermined"/>
<menubar>
More information about the open-ils-commits
mailing list