From 3058c42195a35212540eefb5f9c56e4afd903afc Mon Sep 17 00:00:00 2001 From: miker Date: Fri, 8 Jan 2010 21:13:56 +0000 Subject: [PATCH] Patch from Lebbeous Fogle-Weekley adding non-menu entry points for critical reservation (booking) interfaces (side-step a new staff client, for now), patron interface integration, and I18n git-svn-id: svn://svn.open-ils.org/ILS/trunk@15289 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../web/js/dojo/openils/booking/nls/pull_list.js | 1 + Open-ILS/web/js/ui/default/booking/pickup.js | 26 +++++++++------ Open-ILS/web/js/ui/default/booking/populator.js | 8 +++-- Open-ILS/web/js/ui/default/booking/pull_list.js | 29 +++++++++++------ Open-ILS/web/js/ui/default/booking/return.js | 37 +++++++++++++++------- Open-ILS/web/opac/locale/en-US/lang.dtd | 7 ++++ .../web/templates/default/booking/pull_list.tt2 | 11 ++++--- Open-ILS/xul/staff_client/server/admin/index.xhtml | 34 +++++++++++++++++--- 8 files changed, 113 insertions(+), 40 deletions(-) diff --git a/Open-ILS/web/js/dojo/openils/booking/nls/pull_list.js b/Open-ILS/web/js/dojo/openils/booking/nls/pull_list.js index bb661b91d9..30ae8ec804 100644 --- a/Open-ILS/web/js/dojo/openils/booking/nls/pull_list.js +++ b/Open-ILS/web/js/dojo/openils/booking/nls/pull_list.js @@ -5,6 +5,7 @@ 'COPY_LOOKUP_ERROR': "Error looking up copies by barcode: ", 'COPY_MISSING': "Unexpected error: No information for copy: ", + 'AUTO_no_results': "No results", 'AUTO_owning_lib_selector': "See pull list for library:", 'AUTO_pull_list_title': "Booking Pull List", 'AUTO_interval_in_days': "Generate list for this many days hence: ", diff --git a/Open-ILS/web/js/ui/default/booking/pickup.js b/Open-ILS/web/js/ui/default/booking/pickup.js index fdf709e0f2..afa0527cb8 100644 --- a/Open-ILS/web/js/ui/default/booking/pickup.js +++ b/Open-ILS/web/js/ui/default/booking/pickup.js @@ -4,6 +4,22 @@ var localeStrings = dojo.i18n.getLocalization( ); var p; +function react_to_pass_in(opts) { + if (opts && opts.patron_barcode) { + p.populate({"patron": opts.patron_barcode}); + + hide_dom_element( + document.getElementById("contains_barcode_control") + ); + document.getElementById("patron_barcode").value = opts.patron_barcode; + p._extra_resetting = function() { + reveal_dom_element( + document.getElementById("contains_barcode_control") + ); + }; + } +} + function my_init() { p = new Populator({ "ready": ready_bresv, @@ -12,13 +28,5 @@ function my_init() { }, document.getElementById("patron_barcode")); init_auto_l10n(document.getElementById("auto_l10n_start_here")); - /* The following would be for pass-in from the patron interface, but - * doesn't yet work/is cheap and needs improved anyway. */ -// try { -// document.getElementById("patron_barcode").value = -// xulG.bresv_interface_opts.patron_barcode; -// document.getElementById("lookup").submit(); -// } catch (E) { -// ; -// } + react_to_pass_in(xulG.bresv_interface_opts); } diff --git a/Open-ILS/web/js/ui/default/booking/populator.js b/Open-ILS/web/js/ui/default/booking/populator.js index 6ccb1efecd..7dd6df13cf 100644 --- a/Open-ILS/web/js/ui/default/booking/populator.js +++ b/Open-ILS/web/js/ui/default/booking/populator.js @@ -200,8 +200,8 @@ Populator.prototype.populate = function(barcode, which) { }; Populator.prototype.toggle_anyness = function(any, which) { var widget = this.widgets[which].domNode; - var empty_alternate = document.getElementById("no_" + widget.id); - var controls = document.getElementById("controls_" + widget.id); + var empty_alternate = document.getElementById("no_" + widget.id); + var controls = document.getElementById("controls_" + widget.id); if (any) { reveal_dom_element(widget); if (empty_alternate) hide_dom_element(empty_alternate); @@ -267,6 +267,10 @@ Populator.prototype.reset = function() { this.hide_container(this.widgets[k]); } this.patron_barcode = undefined; + + if (typeof(this._extra_resetting) == "function") + this._extra_resetting(); + if (this.primary_input) { this.primary_input.value = ""; this.primary_input.focus(); diff --git a/Open-ILS/web/js/ui/default/booking/pull_list.js b/Open-ILS/web/js/ui/default/booking/pull_list.js index 208b10689e..38f130b095 100644 --- a/Open-ILS/web/js/ui/default/booking/pull_list.js +++ b/Open-ILS/web/js/ui/default/booking/pull_list.js @@ -175,18 +175,29 @@ function populate_pull_list(form) { return; } - /* Step 2: render the table with the pull list */ - render_pull_list_fundamentals(results); - - /* Step 3: asynchronously fill in the copy details we're missing */ - setTimeout(function() { - var acp_cache = {}; - if ((acp_cache = get_all_relevant_acp(results))) - fill_in_pull_list_details(results, acp_cache); - }, 0); + if (results.length) { + reveal_dom_element(document.getElementById("table_goes_here")); + hide_dom_element(document.getElementById("no_results")); + + /* Step 2: render the table with the pull list */ + render_pull_list_fundamentals(results); + + /* Step 3: asynchronously fill in the copy details we're missing */ + setTimeout(function() { + var acp_cache = {}; + if ((acp_cache = get_all_relevant_acp(results))) + fill_in_pull_list_details(results, acp_cache); + }, 0); + } else { + hide_dom_element(document.getElementById("table_goes_here")); + reveal_dom_element(document.getElementById("no_results")); + } + } function my_init() { + hide_dom_element(document.getElementById("table_goes_here")); + hide_dom_element(document.getElementById("no_results")); init_owning_lib_selector(); init_auto_l10n(document.getElementById("auto_l10n_start_here")); } diff --git a/Open-ILS/web/js/ui/default/booking/return.js b/Open-ILS/web/js/ui/default/booking/return.js index 4d64e3b8c8..64c9cf86b3 100644 --- a/Open-ILS/web/js/ui/default/booking/return.js +++ b/Open-ILS/web/js/ui/default/booking/return.js @@ -4,6 +4,31 @@ var localeStrings = dojo.i18n.getLocalization( ); var p; +function react_to_pass_in(opts) { + if (opts && opts.patron_barcode) { + p.populate({"patron": opts.patron_barcode}); + + hide_dom_element( + document.getElementById("contains_barcode_control") + ); + + document.getElementById("barcode").value = opts.patron_barcode; + var barcode_type = document.getElementById("barcode_type"); + for (var i in barcode_type.options) { + if (barcode_type.options[i].value == "patron") { + barcode_type.selectedIndex = i; + break; + } + } + + p._extra_resetting = function() { + reveal_dom_element( + document.getElementById("contains_barcode_control") + ); + }; + } +} + function my_init() { p = new Populator({ "out": out_bresv, @@ -12,15 +37,5 @@ function my_init() { }, document.getElementById("barcode")); init_auto_l10n(document.getElementById("auto_l10n_start_here")); - /* The following would handle pass-in from the patron interface, but - * doesn't work (dirty solution, will come back to it, make it work, - * clean it up). */ -// try { -// document.getElementById("barcode").value = -// xulG.bresv_interface_opts.patron_barcode; -// document.getElementById("barcode_type").selectedIndex = 1; -// document.getElementById("lookup").submit(); -// } catch (E) { -// alert(E); -// } + react_to_pass_in(xulG.bresv_interface_opts); } diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 0a3063488c..479f0da5c2 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -1712,6 +1712,13 @@ + + + + + + + diff --git a/Open-ILS/web/templates/default/booking/pull_list.tt2 b/Open-ILS/web/templates/default/booking/pull_list.tt2 index fa0657aae9..90de2068fa 100644 --- a/Open-ILS/web/templates/default/booking/pull_list.tt2 +++ b/Open-ILS/web/templates/default/booking/pull_list.tt2 @@ -39,11 +39,12 @@ + - +
[% END %] diff --git a/Open-ILS/xul/staff_client/server/admin/index.xhtml b/Open-ILS/xul/staff_client/server/admin/index.xhtml index 41c86f0019..aa01bc578b 100644 --- a/Open-ILS/xul/staff_client/server/admin/index.xhtml +++ b/Open-ILS/xul/staff_client/server/admin/index.xhtml @@ -9,6 +9,8 @@ &staff.server.admin.index.title; + - +
&staff.server.admin.index.title; @@ -38,9 +47,10 @@ - - - + + + + @@ -84,6 +94,22 @@
&staff.server.admin.index.transit_list;
+ -- 2.11.0
&staff.server.admin.index.workstation_configuration;&staff.server.admin.index.library_configuration;&staff.server.admin.index.maintenance_reports;&staff.server.admin.index.workstation_configuration;&staff.server.admin.index.library_configuration;&staff.server.admin.index.maintenance_reports;&staff.server.admin.index.booking;
+
+ &staff.server.admin.index.booking.reservation; &staff.server.admin.index.testing; +
+
+ &staff.server.admin.index.booking.pull_list; &staff.server.admin.index.testing; +
+
+ &staff.server.admin.index.booking.capture; &staff.server.admin.index.testing; +
+
+ &staff.server.admin.index.booking.pickup; &staff.server.admin.index.testing; +
+
+ &staff.server.admin.index.booking.return; &staff.server.admin.index.testing; +