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.
-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(); }
////
dojo.require('openils.Util');
+ populate_lib_menu();
init_list();
$('list_actions').appendChild( list.render_list_actions() );
list.set_list_actions();
}
}
+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 {
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() {