[open-ils-commits] r15255 - trunk/Open-ILS/xul/staff_client/server/admin (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Dec 30 16:41:29 EST 2009
Author: phasefx
Date: 2009-12-30 16:41:24 -0500 (Wed, 30 Dec 2009)
New Revision: 15255
Modified:
trunk/Open-ILS/xul/staff_client/server/admin/patrons_due_refunds.js
trunk/Open-ILS/xul/staff_client/server/admin/patrons_due_refunds.xul
Log:
home library selector for Patrons with Negative Balances interface
Modified: trunk/Open-ILS/xul/staff_client/server/admin/patrons_due_refunds.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/admin/patrons_due_refunds.js 2009-12-30 20:55:27 UTC (rev 15254)
+++ trunk/Open-ILS/xul/staff_client/server/admin/patrons_due_refunds.js 2009-12-30 21:41:24 UTC (rev 15255)
@@ -1,4 +1,4 @@
-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); }
@@ -34,6 +34,7 @@
dojo.require('dojo.date.locale');
dojo.require('dojo.date.stamp');
+ render_lib_menu();
init_list();
$('list_actions').appendChild( list.render_list_actions() );
list.set_list_actions();
@@ -158,7 +159,7 @@
fieldmapper.standardRequest(
[api['FM_AU_BLOBS_WITH_NEGATIVE_BALANCE'].app, api['FM_AU_BLOBS_WITH_NEGATIVE_BALANCE'].method ],
{ async: true,
- params: [ses()],
+ params: [ses(),menu_lib],
onresponse : onResponse,
onerror : onError,
oncomplete : function() {
@@ -171,3 +172,35 @@
alert('Error in patrons_due_refunds.js, populate_list(): ' + E);
}
}
+
+function render_lib_menu() {
+ try {
+ 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();
+ menu_lib = x.getAttribute('value') || ses('ws_ou');
+ var ml = util.widgets.make_menulist( list_data[0], menu_lib );
+ ml.setAttribute('id','lib_menu');
+ x.appendChild( ml );
+ ml.addEventListener(
+ 'command',
+ function(ev) {
+ menu_lib = ev.target.value;
+ x.setAttribute('value',ev.target.value); oils_persist(x);
+ populate_list();
+ },
+ false
+ );
+ } else {
+ throw('Missing offline org unit list.');
+ }
+
+ } catch(E) {
+ alert('Error in patrons_due_refunds.js, render_lib_menu(): ' + E);
+ }
+}
Modified: trunk/Open-ILS/xul/staff_client/server/admin/patrons_due_refunds.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/admin/patrons_due_refunds.xul 2009-12-30 20:55:27 UTC (rev 15254)
+++ trunk/Open-ILS/xul/staff_client/server/admin/patrons_due_refunds.xul 2009-12-30 21:41:24 UTC (rev 15255)
@@ -40,6 +40,7 @@
<caption id="patrons_due_refunds_caption" label="&staff.admin.patrons_due_refunds.caption;"/>
<vbox flex="0">
<hbox flex="1">
+ <hbox id="lib_menu_placeholder" oils_persist="value" />
<spacer flex="1" />
<progressmeter id="progress" flex="1" hidden="true" mode="undetermined"/>
<menubar>
More information about the open-ils-commits
mailing list