'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: ",
);
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,
}, 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);
}
};
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);
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();
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"));
}
);
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,
}, 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);
}
<!ENTITY staff.server.admin.index.transit_list "Transit List">
<!ENTITY staff.server.admin.index.conify "Server Settings">
+<!ENTITY staff.server.admin.index.booking "Booking">
+<!ENTITY staff.server.admin.index.booking.reservation "Create/Cancel Reservations">
+<!ENTITY staff.server.admin.index.booking.pull_list "Pull List">
+<!ENTITY staff.server.admin.index.booking.capture "Capture">
+<!ENTITY staff.server.admin.index.booking.pickup "Pickup Reservations">
+<!ENTITY staff.server.admin.index.booking.return "Return Reservations">
+
<!ENTITY staff.server.admin.org_settings.title "Evergreen: Library Settings Editor">
<!-- This will be followed by the user's name -->
<tbody id="the_table_body">
</tbody>
</table>
+ <div id="print_holder" class="nice_vertical_padding">
+ <!-- XXX Print button probably won't stay right here -->
+ <input type="button" class="AUTO_ATTR_VALUE_print"
+ onclick="window.print();" /><!-- XXX too simplistic? -->
+ </div>
</div>
- <div id="print_holder" class="nice_vertical_padding">
- <!-- XXX Print button probably won't stay right here -->
- <input type="button" class="AUTO_ATTR_VALUE_print"
- onclick="window.print();" /><!-- XXX too simplistic? -->
- </div>
+ <div id="no_results" class="AUTO_no_results"></div>
</div>
[% END %]
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>&staff.server.admin.index.title;</title>
+ <script type="text/javascript" src="/js/dojo/dojo/dojo.js"
+ djConfig="parseOnLoad: true, isDebug:false"></script>
<script>
function _l(l,p) {
var url = l + location.search;
location.href = url;
}
function getBuildId() { return location.href.match(/\/xul\/(.+?)\/server\//)[1]; }
+
+ function my_init() {
+ try {
+ dojo.require("dojo.cookie");
+ window.xulG.auth = {"session": {"key": dojo.cookie("ses")}};
+ } catch(E) { /* XXX ignorable except for booking links */ }
+ }
</script>
<style type='text/css'>
body { background-color: white; }
</style>
</head>
- <body>
+ <body onload="my_init();">
<center>
<div style='height: 40px; margin-top: 20px; font-weight: bold; font-size: 14pt;'>
&staff.server.admin.index.title;
<table width='100%'>
<thead>
<tr>
- <th width='30%'>&staff.server.admin.index.workstation_configuration;</th>
- <th width='30%'>&staff.server.admin.index.library_configuration;</th>
- <th width='30%'>&staff.server.admin.index.maintenance_reports;</th>
+ <th width='25%'>&staff.server.admin.index.workstation_configuration;</th>
+ <th width='25%'>&staff.server.admin.index.library_configuration;</th>
+ <th width='25%'>&staff.server.admin.index.maintenance_reports;</th>
+ <th width='25%'>&staff.server.admin.index.booking;</th>
</tr>
</thead>
<tbody>
<div style='padding: 8px;'>
<a href='javascript:window.xulG.new_tab("/xul/server/admin/transit_list.xul",{"tab_name":"&staff.server.admin.index.transits;"},{});'>&staff.server.admin.index.transit_list;</a>
</div>
+ </td><td>
+ <div style='padding: 8px;'>
+ <a href='javascript:window.xulG.new_tab("/eg/booking/reservation",{"tab_name":"&staff.server.admin.index.booking.reservation;","browser":false},window.xulG);'>&staff.server.admin.index.booking.reservation;</a> <span style="color: red">&staff.server.admin.index.testing;</span>
+ </div>
+ <div style='padding: 8px;'>
+ <a href='javascript:window.xulG.new_tab("/eg/booking/pull_list",{"tab_name":"&staff.server.admin.index.booking.pull_list;","browser":false},window.xulG);'>&staff.server.admin.index.booking.pull_list;</a> <span style="color: red">&staff.server.admin.index.testing;</span>
+ </div>
+ <div style='padding: 8px;'>
+ <a href='javascript:window.xulG.new_tab("/eg/booking/capture",{"tab_name":"&staff.server.admin.index.booking.capture;","browser":false},window.xulG);'>&staff.server.admin.index.booking.capture;</a> <span style="color: red">&staff.server.admin.index.testing;</span>
+ </div>
+ <div style='padding: 8px;'>
+ <a href='javascript:window.xulG.new_tab("/eg/booking/pickup",{"tab_name":"&staff.server.admin.index.booking.pickup;","browser":false},window.xulG);'>&staff.server.admin.index.booking.pickup;</a> <span style="color: red">&staff.server.admin.index.testing;</span>
+ </div>
+ <div style='padding: 8px;'>
+ <a href='javascript:window.xulG.new_tab("/eg/booking/return",{"tab_name":"&staff.server.admin.index.booking.return;","browser":false},window.xulG);'>&staff.server.admin.index.booking.return;</a> <span style="color: red">&staff.server.admin.index.testing;</span>
+ </div>
</td>
</tr>
</tbody>