[open-ils-commits] r14060 - in trunk/Open-ILS: web/opac/locale/en-US xul/staff_client/chrome/content/main xul/staff_client/server/circ xul/staff_client/server/locale/en-US (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Sep 18 16:29:20 EDT 2009
Author: phasefx
Date: 2009-09-18 16:29:15 -0400 (Fri, 18 Sep 2009)
New Revision: 14060
Added:
trunk/Open-ILS/xul/staff_client/server/circ/renew.js
trunk/Open-ILS/xul/staff_client/server/circ/renew.xul
trunk/Open-ILS/xul/staff_client/server/circ/renew_overlay.xul
Modified:
trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js
trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
trunk/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
Log:
Renew Item interface, where you can scan in the item barcodes and a renewal attempt is made automatically.
Not as clean as it could be if implemented from scratch; it's a paired down derivative of the checkin interface.
Possible TODO: Provide an Override checkbox so that all subsequent renewal attempts are made with .override
Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2009-09-18 20:26:54 UTC (rev 14059)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2009-09-18 20:29:15 UTC (rev 14060)
@@ -350,6 +350,8 @@
<!ENTITY staff.checkin.done_label.accesskey 'D'>
<!ENTITY staff.checkin.print_receipt.label 'Print List'>
<!ENTITY staff.checkin.print_receipt.accesskey ''>
+<!ENTITY staff.renew.print_receipt.label 'Print List'>
+<!ENTITY staff.renew.print_receipt.accesskey ''>
<!ENTITY staff.checkin.reprint_receipt_label 'Re-Print Last List'>
<!ENTITY staff.checkin.reprint_receipt_label.accesskey 'L'>
<!ENTITY staff.checkin_interface_label "Check In">
@@ -418,6 +420,13 @@
<!ENTITY staff.circ.checkin.scan.accesskey 'a'>
<!ENTITY staff.circ.checkin.submit.label 'Submit'>
<!ENTITY staff.circ.checkin.submit.accesskey 'S'>
+
+<!ENTITY staff.circ.renew.caption 'Renew'>
+<!ENTITY staff.circ.renew.scan.label 'Enter Barcode:'>
+<!ENTITY staff.circ.renew.scan.accesskey 'a'>
+<!ENTITY staff.circ.renew.submit.label 'Submit'>
+<!ENTITY staff.circ.renew.submit.accesskey 'S'>
+
<!ENTITY staff.circ.context_cancel_hold "Cancel Hold">
<!ENTITY staff.circ.context_checkin "Check In">
<!ENTITY staff.circ.context_edit "Edit Copy">
@@ -744,6 +753,8 @@
<!ENTITY staff.main.menu.circ.checkin.accesskey "C">
<!ENTITY staff.main.menu.circ.checkin.label "Check In Items">
<!ENTITY staff.main.menu.circ.checkout.accesskey "O">
+<!ENTITY staff.main.menu.circ.renew.label "Renew Items">
+<!ENTITY staff.main.menu.circ.renew.accesskey "n">
<!ENTITY staff.main.menu.circ.checkout.label "Check Out Items">
<!ENTITY staff.main.menu.circ.claimed_returned.key "C">
<!ENTITY staff.main.menu.circ.claimed_returned.label 'Mark as "Claimed Returned"'>
@@ -1775,6 +1786,32 @@
<!ENTITY staff.circ.checkin_overlay.do_not_alert_on_precat.label "Ignore Pre-cataloged Items">
<!ENTITY staff.circ.checkin_overlay.checkin_auto.label "Auto-Print Hold and Transit Slips">
<!ENTITY staff.circ.checkin_overlay.checkin_auto.accesskey "P">
+<!ENTITY staff.circ.renew_overlay.background_text "Renew Item">
+<!ENTITY staff.circ.renew_overlay.sel_clip.label "Copy to Clipboard">
+<!ENTITY staff.circ.renew_overlay.sel_clip.accesskey "C">
+<!ENTITY staff.circ.renew_overlay.sel_bucket.label "Add to Item Bucket">
+<!ENTITY staff.circ.renew_overlay.sel_bucket.accesskey "A">
+<!ENTITY staff.circ.renew_overlay.sel_opac.label "Show in Catalog">
+<!ENTITY staff.circ.renew_overlay.sel_opac.accesskey "S">
+<!ENTITY staff.circ.renew_overlay.sel_copy_details.label "Show Item Details">
+<!ENTITY staff.circ.renew_overlay.sel_copy_details.accesskey "I">
+<!ENTITY staff.circ.renew_overlay.sel_patron.label "Show Last Few Circulations">
+<!ENTITY staff.circ.renew_overlay.sel_patron.accesskey "L">
+<!ENTITY staff.circ.renew_overlay.sel_last_patron.label "Retrieve Last Patron who circulated item">
+<!ENTITY staff.circ.renew_overlay.sel_last_patron.accesskey "R">
+<!ENTITY staff.circ.renew_overlay.sel_edit.label "Edit Item Attributes">
+<!ENTITY staff.circ.renew_overlay.sel_edit.accesskey "E">
+<!ENTITY staff.circ.renew_overlay.sel_mark_items_damaged.label "Mark Item Damaged">
+<!ENTITY staff.circ.renew_overlay.sel_mark_items_damaged.accesskey "D">
+<!ENTITY staff.circ.renew_overlay.sel_transit_abort.label "Abort Transit">
+<!ENTITY staff.circ.renew_overlay.sel_spine.label "Print Spine Label">
+<!ENTITY staff.circ.renew_overlay.sel_spine.accesskey "P">
+<!ENTITY staff.circ.renew_overlay.save_columns.label "Save Columns">
+<!ENTITY staff.circ.renew_overlay.actions.label "Actions for Selected Items">
+<!ENTITY staff.circ.renew_overlay.actions.accesskey "S">
+<!ENTITY staff.circ.renew_overlay.renew_export.label "Export">
+<!ENTITY staff.circ.renew_overlay.trim_list.label "Trim List (20 rows)">
+<!ENTITY staff.circ.renew_overlay.strict_barcode.label "Strict Barcode">
<!ENTITY staff.circ.checkout_overlay.duedate_menu.label "Normal">
<!ENTITY staff.circ.checkout_overlay.duedate_menu.accesskey "u">
<!ENTITY staff.circ.checkout_overlay.barcode.accesskey "C">
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js 2009-09-18 20:26:54 UTC (rev 14059)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js 2009-09-18 20:29:15 UTC (rev 14060)
@@ -275,6 +275,7 @@
'XUL_BIB_BRIEF' : '/xul/server/cat/bib_brief.xul',
'XUL_BROWSER' : 'chrome://open_ils_staff_client/content/util/browser.xul',
'XUL_CHECKIN' : '/xul/server/circ/checkin.xul',
+ 'XUL_RENEW' : '/xul/server/circ/renew.xul',
'XUL_CHECKOUT' : '/xul/server/circ/checkout.xul',
'XUL_CIRC_BRIEF' : '/xul/server/circ/circ_brief.xul',
'XUL_CIRC_SUMMARY' : '/xul/server/circ/circ_summary.xul',
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js 2009-09-18 20:26:54 UTC (rev 14059)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js 2009-09-18 20:29:15 UTC (rev 14060)
@@ -394,6 +394,13 @@
obj.set_tab(obj.url_prefix(urls.XUL_CHECKIN),{},{});
}
],
+ 'cmd_circ_renew' : [
+ ['oncommand'],
+ function() {
+ obj.data.stash_retrieve();
+ obj.set_tab(obj.url_prefix(urls.XUL_RENEW),{},{});
+ }
+ ],
'cmd_circ_checkout' : [
['oncommand'],
function() {
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul 2009-09-18 20:26:54 UTC (rev 14059)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/menu_frame_menus.xul 2009-09-18 20:29:15 UTC (rev 14060)
@@ -25,6 +25,7 @@
<command id="cmd_circ_checkout" key="circ-checkout-key" />
<command id="cmd_patron_search" key="patron-search-key" />
<command id="cmd_circ_checkin" key="circ-checkin-key" />
+ <command id="cmd_circ_renew" key="circ-renew-key" />
<command id="cmd_circ_hold_capture" key="circ-hold-capture-key" />
<command id="cmd_circ_hold_pull_list" />
<command id="cmd_browse_holds" />
@@ -132,6 +133,7 @@
<key id="close-window-key" modifiers="accel" key="Q" command="cmd_close_window"/>
<key id="circ-checkout-key" keycode="VK_F1" command="cmd_circ_checkout"/>
<key id="circ-checkin-key" keycode="VK_F2" command="cmd_circ_checkin"/>
+ <key id="circ-renew-key" keycode="VK_F2" modifiers="control" command="cmd_circ_renew"/>
<key id="reprint-receipt-key" keycode="VK_F9" command="cmd_reprint"/>
<key id="search-opac-key" keycode="VK_F3" command="cmd_search_opac"/>
<key id="search-tcn-key" keycode="VK_F3" modifiers="shift" command="cmd_search_tcn"/>
@@ -179,6 +181,7 @@
<menupopup id="main.menu.circ.popup">
<menuitem label="&staff.main.menu.circ.checkout.label;" accesskey="&staff.main.menu.circ.checkout.accesskey;" key="circ-checkout-key" command="cmd_circ_checkout"/>
<menuitem label="&staff.main.menu.circ.checkin.label;" accesskey="&staff.main.menu.circ.checkin.accesskey;" key="circ-checkin-key" command="cmd_circ_checkin"/>
+ <menuitem label="&staff.main.menu.circ.renew.label;" accesskey="&staff.main.menu.circ.renew.accesskey;" key="circ-renew-key" command="cmd_circ_renew"/>
<menuitem label="&staff.main.menu.circ.patron_registration.label;" accesskey="&staff.main.menu.circ.patron_registration.accesskey;" key="patron-register-key" command="cmd_patron_register"/>
<menuitem label="&staff.main.menu.circ.patron_retrieve.label;" accesskey="&staff.main.menu.circ.patron_retrieve.accesskey;" command="cmd_retrieve_last_patron" key="retrieve_last_patron_key"/>
<menuseparator />
Added: trunk/Open-ILS/xul/staff_client/server/circ/renew.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/renew.js (rev 0)
+++ trunk/Open-ILS/xul/staff_client/server/circ/renew.js 2009-09-18 20:29:15 UTC (rev 14060)
@@ -0,0 +1,378 @@
+dump('entering circ.renew.js\n');
+
+if (typeof circ == 'undefined') circ = {};
+circ.renew = function (params) {
+
+ JSAN.use('util.error'); this.error = new util.error();
+ JSAN.use('util.network'); this.network = new util.network();
+ JSAN.use('util.barcode');
+ JSAN.use('util.date');
+ this.OpenILS = {}; JSAN.use('OpenILS.data'); this.OpenILS.data = new OpenILS.data(); this.OpenILS.data.init({'via':'stash'});
+ this.data = this.OpenILS.data;
+}
+
+circ.renew.prototype = {
+
+ 'selection_list' : [],
+
+ 'init' : function( params ) {
+
+ var obj = this;
+
+ JSAN.use('circ.util');
+ var columns = circ.util.columns(
+ {
+ 'barcode' : { 'hidden' : false },
+ 'title' : { 'hidden' : false },
+ 'location' : { 'hidden' : false },
+ 'call_number' : { 'hidden' : false },
+ 'status' : { 'hidden' : false },
+ 'alert_message' : { 'hidden' : false },
+ 'due_date' : { 'hidden' : false },
+ 'due_time' : { 'hidden' : false }
+ },
+ {
+ 'except_these' : [ 'uses', 'checkin_time_full' ]
+ }
+ );
+
+ JSAN.use('util.list'); obj.list = new util.list('renew_list');
+ obj.list.init(
+ {
+ 'columns' : columns,
+ 'map_row_to_columns' : circ.util.std_map_row_to_columns(),
+ 'on_select' : function(ev) {
+ try {
+ JSAN.use('util.functional');
+ var sel = obj.list.retrieve_selection();
+ obj.selection_list = util.functional.map_list(
+ sel,
+ function(o) { return JSON2js(o.getAttribute('retrieve_id')); }
+ );
+ obj.error.sdump('D_TRACE', 'circ/copy_status: selection list = ' + js2JSON(obj.selection_list) );
+ if (obj.selection_list.length == 0) {
+ obj.controller.view.sel_edit.setAttribute('disabled','true');
+ obj.controller.view.sel_opac.setAttribute('disabled','true');
+ obj.controller.view.sel_patron.setAttribute('disabled','true');
+ obj.controller.view.sel_last_patron.setAttribute('disabled','true');
+ obj.controller.view.sel_copy_details.setAttribute('disabled','true');
+ obj.controller.view.sel_bucket.setAttribute('disabled','true');
+ obj.controller.view.sel_spine.setAttribute('disabled','true');
+ obj.controller.view.sel_transit_abort.setAttribute('disabled','true');
+ obj.controller.view.sel_clip.setAttribute('disabled','true');
+ obj.controller.view.sel_mark_items_damaged.setAttribute('disabled','true');
+ } else {
+ obj.controller.view.sel_edit.setAttribute('disabled','false');
+ obj.controller.view.sel_opac.setAttribute('disabled','false');
+ obj.controller.view.sel_patron.setAttribute('disabled','false');
+ obj.controller.view.sel_last_patron.setAttribute('disabled','false');
+ obj.controller.view.sel_copy_details.setAttribute('disabled','false');
+ obj.controller.view.sel_bucket.setAttribute('disabled','false');
+ obj.controller.view.sel_spine.setAttribute('disabled','false');
+ obj.controller.view.sel_transit_abort.setAttribute('disabled','false');
+ obj.controller.view.sel_clip.setAttribute('disabled','false');
+ obj.controller.view.sel_mark_items_damaged.setAttribute('disabled','false');
+ }
+ } catch(E) {
+ alert('FIXME: ' + E);
+ }
+ }
+ }
+ );
+
+ JSAN.use('util.controller'); obj.controller = new util.controller();
+ obj.controller.init(
+ {
+ 'control_map' : {
+ 'save_columns' : [ [ 'command' ], function() { obj.list.save_columns(); } ],
+ 'sel_clip' : [
+ ['command'],
+ function() {
+ obj.list.clipboard();
+ obj.controller.view.renew_barcode_entry_textbox.focus();
+ }
+ ],
+ 'sel_edit' : [
+ ['command'],
+ function() {
+ try {
+ obj.spawn_copy_editor();
+ } catch(E) {
+ alert(E);
+ }
+ }
+ ],
+ 'sel_spine' : [
+ ['command'],
+ function() {
+ JSAN.use('cat.util');
+ cat.util.spawn_spine_editor(obj.selection_list);
+ }
+ ],
+ 'sel_opac' : [
+ ['command'],
+ function() {
+ JSAN.use('cat.util');
+ cat.util.show_in_opac(obj.selection_list);
+ }
+ ],
+ 'sel_transit_abort' : [
+ ['command'],
+ function() {
+ JSAN.use('circ.util');
+ circ.util.abort_transits(obj.selection_list);
+ }
+ ],
+ 'sel_patron' : [
+ ['command'],
+ function() {
+ JSAN.use('circ.util');
+ circ.util.show_last_few_circs(obj.selection_list);
+ }
+ ],
+ 'sel_last_patron' : [
+ ['command'],
+ function() {
+ var patrons = {};
+ for (var i = 0; i < obj.selection_list.length; i++) {
+ var circs = obj.network.simple_request('FM_CIRC_RETRIEVE_VIA_COPY',[ses(),obj.selection_list[i].copy_id,1]);
+ if (circs.length > 0) {
+ patrons[circs[0].usr()] = 1;
+ } else {
+ alert(document.getElementById('circStrings').getFormattedString('staff.circ.item_no_circs', [obj.selection_list[i].barcode]));
+ }
+ }
+ for (var i in patrons) {
+ xulG.new_patron_tab({},{'id' : i});
+ }
+ }
+ ],
+ 'sel_copy_details' : [
+ ['command'],
+ function() {
+ JSAN.use('circ.util');
+ for (var i = 0; i < obj.selection_list.length; i++) {
+ circ.util.show_copy_details( obj.selection_list[i].copy_id );
+ }
+ }
+ ],
+ 'sel_mark_items_damaged' : [
+ ['command'],
+ function() {
+ var funcs = [];
+ JSAN.use('cat.util'); JSAN.use('util.functional');
+ cat.util.mark_item_damaged( util.functional.map_list( obj.selection_list, function(o) { return o.copy_id; } ) );
+ }
+ ],
+ 'sel_bucket' : [
+ ['command'],
+ function() {
+ JSAN.use('cat.util');
+ cat.util.add_copies_to_bucket(obj.selection_list);
+ }
+ ],
+ 'renew_barcode_entry_textbox' : [
+ ['keypress'],
+ function(ev) {
+ if (ev.keyCode && ev.keyCode == 13) {
+ obj.renew();
+ }
+ }
+ ],
+ 'cmd_broken' : [
+ ['command'],
+ function() { alert(document.getElementById('circStrings').getString('staff.circ.unimplemented')); }
+ ],
+ 'cmd_renew_submit_barcode' : [
+ ['command'],
+ function() {
+ obj.renew();
+ }
+ ],
+ 'cmd_renew_print' : [
+ ['command'],
+ function() {
+ var p = {
+ 'template' : 'renew'
+ };
+ obj.list.print(p);
+ }
+ ],
+ 'cmd_csv_to_clipboard' : [ ['command'], function() {
+ obj.list.dump_csv_to_clipboard();
+ obj.controller.view.renew_barcode_entry_textbox.focus();
+ } ],
+ 'cmd_csv_to_printer' : [ ['command'], function() {
+ obj.list.dump_csv_to_printer();
+ obj.controller.view.renew_barcode_entry_textbox.focus();
+ } ],
+ 'cmd_csv_to_file' : [ ['command'], function() {
+ obj.list.dump_csv_to_file( { 'defaultFileName' : 'checked_in.txt' } );
+ obj.controller.view.renew_barcode_entry_textbox.focus();
+ } ]
+ }
+ }
+ );
+ this.controller.render();
+ this.controller.view.renew_barcode_entry_textbox.focus();
+
+ },
+
+ 'test_barcode' : function(bc) {
+ var obj = this;
+ var x = document.getElementById('strict_barcode');
+ if (x && x.checked != true) return true;
+ var good = util.barcode.check(bc);
+ if (good) {
+ return true;
+ } else {
+ if ( 1 == obj.error.yns_alert(
+ document.getElementById('circStrings').getFormattedString('staff.circ.check_digit.bad', [bc]),
+ document.getElementById('circStrings').getString('staff.circ.barcode.bad'),
+ document.getElementById('circStrings').getString('staff.circ.cancel'),
+ document.getElementById('circStrings').getString('staff.circ.barcode.accept'),
+ null,
+ document.getElementById('circStrings').getString('staff.circ.confirm'),
+ '/xul/server/skin/media/images/bad_barcode.png'
+ ) ) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+ },
+
+ 'renew' : function() {
+ var obj = this;
+ try {
+ var barcode = obj.controller.view.renew_barcode_entry_textbox.value;
+ if (!barcode) return;
+ if (barcode) {
+ if ( obj.test_barcode(barcode) ) { /* good */ } else { /* bad */ return; }
+ }
+ var auto_print = document.getElementById('renew_auto');
+ if (auto_print) auto_print = auto_print.checked;
+ JSAN.use('circ.util');
+ var renew = circ.util.renew_via_barcode(
+ barcode,
+ null,
+ function( r ) {
+ obj.renew_followup( r, barcode );
+ }
+ );
+ } catch(E) {
+ obj.error.standard_unexpected_error_alert('Error in circ/renew.js, renew():', E);
+ if (typeof obj.on_failure == 'function') {
+ obj.on_failure(E);
+ }
+ if (typeof window.xulG == 'object' && typeof window.xulG.on_failure == 'function') {
+ window.xulG.on_failure(E);
+ }
+ }
+ },
+
+ 'renew_followup' : function(r,bc) {
+ var obj = this;
+ try {
+ if (!r) return obj.on_failure(); /* circ.util.renew handles errors and returns null currently */
+ if ( (typeof r[0].ilsevent != 'undefined' && r[0].ilsevent == 0) ) {
+ // SUCCESS
+ var x = document.getElementById('no_change_label');
+ if (x) {
+ x.hidden = true;
+ x.setAttribute('value','');
+ }
+ } else {
+ // FAILURE
+ var msg = document.getElementById("patronStrings").getFormattedString('staff.patron.items.items_renew.not_renewed',[bc, r[0].textcode + r[0].desc]);
+ var x = document.getElementById('no_change_label');
+ if (x) {
+ x.hidden = false;
+ x.setAttribute('value',msg);
+ }
+ obj.controller.view.renew_barcode_entry_textbox.focus();
+ obj.controller.view.renew_barcode_entry_textbox.select();
+ return;
+ }
+ var renew = r[0].payload;
+ var retrieve_id = js2JSON( { 'copy_id' : renew.copy.id(), 'barcode' : renew.copy.barcode(), 'doc_id' : (renew.record == null ? null : renew.record.doc_id() ) } );
+ if (document.getElementById('trim_list')) {
+ var x = document.getElementById('trim_list');
+ if (x.checked) { obj.list.trim_list = 20; } else { obj.list.trim_list = null; }
+ }
+ obj.list.append(
+ {
+ 'retrieve_id' : retrieve_id,
+ 'row' : {
+ 'my' : {
+ 'circ' : renew.circ,
+ 'mvr' : renew.record,
+ 'acp' : renew.copy,
+ 'status' : renew.status,
+ 'route_to' : renew.route_to,
+ 'message' : renew.message
+ }
+ },
+ 'to_top' : true
+ }
+ );
+ obj.list.node.view.selection.select(0);
+
+ JSAN.use('util.sound'); var sound = new util.sound(); sound.circ_good();
+
+ if (typeof obj.on_renew == 'function') {
+ obj.on_renew(renew);
+ }
+ if (typeof window.xulG == 'object' && typeof window.xulG.on_renew == 'function') {
+ window.xulG.on_renew(renew);
+ }
+
+ return true;
+
+ } catch(E) {
+ obj.error.standard_unexpected_error_alert('Error in circ/renew.js, renew_followup():', E);
+ if (typeof obj.on_failure == 'function') {
+ obj.on_failure(E);
+ }
+ if (typeof window.xulG == 'object' && typeof window.xulG.on_failure == 'function') {
+ window.xulG.on_failure(E);
+ }
+ }
+
+ },
+
+ 'on_renew' : function() {
+ this.controller.view.renew_barcode_entry_textbox.disabled = false;
+ this.controller.view.renew_barcode_entry_textbox.select();
+ this.controller.view.renew_barcode_entry_textbox.value = '';
+ this.controller.view.renew_barcode_entry_textbox.focus();
+ },
+
+ 'on_failure' : function() {
+ this.controller.view.renew_barcode_entry_textbox.disabled = false;
+ this.controller.view.renew_barcode_entry_textbox.select();
+ this.controller.view.renew_barcode_entry_textbox.focus();
+ },
+
+ 'spawn_copy_editor' : function() {
+
+ var obj = this;
+
+ JSAN.use('util.functional');
+
+ var list = obj.selection_list;
+
+ list = util.functional.map_list(
+ list,
+ function (o) {
+ return o.copy_id;
+ }
+ );
+
+ JSAN.use('cat.util'); cat.util.spawn_copy_editor( { 'copy_ids' : list, 'edit' : 1 } );
+
+ }
+
+}
+
+dump('exiting circ.renew.js\n');
Added: trunk/Open-ILS/xul/staff_client/server/circ/renew.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/renew.xul (rev 0)
+++ trunk/Open-ILS/xul/staff_client/server/circ/renew.xul 2009-09-18 20:29:15 UTC (rev 14060)
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Application: Evergreen Staff Client -->
+<!-- Screen: Patron Display -->
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- STYLESHEETS -->
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<?xml-stylesheet href="chrome://open_ils_staff_client/skin/global.css" type="text/css"?>
+<?xml-stylesheet href="/xul/server/skin/global.css" type="text/css"?>
+<?xml-stylesheet href="/xul/server/skin/circ.css" type="text/css"?>
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- LOCALIZATION -->
+<!DOCTYPE window PUBLIC "" ""[
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
+]>
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- OVERLAYS -->
+<?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
+<?xul-overlay href="/xul/server/circ/renew_overlay.xul"?>
+
+<window id="renew_win"
+ onload="try { my_init(); font_helper(); persist_helper(); } catch(E) { alert(E); }"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+ <!-- BEHAVIOR -->
+ <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};</script>
+ <scripts id="openils_util_scripts"/>
+
+ <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
+ <script>
+ <![CDATA[
+ function my_init() {
+ try {
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+ if (typeof JSAN == 'undefined') { throw( document.getElementById("commonStrings").getString('common.jsan.missing') ); }
+ JSAN.errorLevel = "die"; // none, warn, or die
+ JSAN.addRepository('/xul/server/');
+ JSAN.use('util.error'); g.error = new util.error();
+ g.error.sdump('D_TRACE','my_init() for renew.xul');
+
+ var tab_name = document.getElementById('circStrings').getString('staff.circ.renew.tab.label');
+
+ JSAN.use('circ.renew'); g.renew = new circ.renew();
+ g.renew.init(
+ {
+ }
+ );
+
+ if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
+ try { window.xulG.set_tab_name(tab_name); } catch(E) { alert(E); }
+ }
+
+ } catch(E) {
+ var err_msg = document.getElementById("commonStrings").getFormattedString('common.exception', ['circ.renew.xul', E]);
+ try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
+ alert(err_msg);
+ }
+ }
+
+ function default_focus() { try { setTimeout( function() { document.getElementById('renew_barcode_entry_textbox').focus(); }, 0); } catch(E) {} }
+ ]]>
+ </script>
+
+ <popupset id="copy_status_popupset"/>
+
+ <commandset id="renew_cmds">
+ <command id="cmd_renew_submit_barcode" />
+ <command id="cmd_renew_print" />
+ <command id="cmd_csv_to_clipboard" />
+ <command id="cmd_csv_to_printer" />
+ <command id="cmd_csv_to_file" />
+ <command id="save_columns" />
+
+ <command id="sel_clip" disabled="true"/>
+ <command id="sel_edit" disabled="true"/>
+ <command id="sel_opac" disabled="true"/>
+ <command id="sel_patron" disabled="true"/>
+ <command id="sel_last_patron" disabled="true"/>
+ <command id="sel_copy_details" disabled="true"/>
+ <command id="sel_bucket" disabled="true"/>
+ <command id="sel_spine" disabled="true"/>
+ <command id="sel_transit_abort" disabled="true"/>
+ <command id="sel_mark_items_damaged" disabled="true"/>
+
+ </commandset>
+
+ <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties"/>
+ <messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale'-->/cat.properties"/>
+ <messagecatalog id="patronStrings" src="/xul/server/locale/<!--#echo var='locale'-->/patron.properties"/>
+
+ <box id="renew_main" />
+
+</window>
+
Added: trunk/Open-ILS/xul/staff_client/server/circ/renew_overlay.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/renew_overlay.xul (rev 0)
+++ trunk/Open-ILS/xul/staff_client/server/circ/renew_overlay.xul 2009-09-18 20:29:15 UTC (rev 14060)
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- LOCALIZATION -->
+<!DOCTYPE overlay PUBLIC "" ""[
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
+]>
+
+<overlay id="renew_overlay"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<script>dump('loading renew_overlay.xul\n');</script>
+
+<commandset id="renew_cmds" />
+
+<popupset id="copy_status_popupset">
+ <popup id="copy_status_actions" position="at_pointer">
+ <menuitem command="sel_clip" label="&staff.circ.renew_overlay.sel_clip.label;" accesskey="&staff.circ.renew_overlay.sel_clip.accesskey;" />
+ <menuitem command="sel_bucket" label="&staff.circ.renew_overlay.sel_bucket.label;" accesskey="&staff.circ.renew_overlay.sel_bucket.accesskey;"/>
+ <menuitem command="sel_opac" label="&staff.circ.renew_overlay.sel_opac.label;" accesskey="&staff.circ.renew_overlay.sel_opac.accesskey;" />
+ <menuitem command="sel_copy_details" label="&staff.circ.renew_overlay.sel_copy_details.label;" accesskey="&staff.circ.renew_overlay.sel_copy_details.accesskey;" />
+ <menuitem command="sel_patron" label="&staff.circ.renew_overlay.sel_patron.label;" accesskey="&staff.circ.renew_overlay.sel_patron.accesskey;"/>
+ <menuitem command="sel_last_patron" label="&staff.circ.renew_overlay.sel_last_patron.label;" accesskey="&staff.circ.renew_overlay.sel_last_patron.accesskey;"/>
+ <menuseparator/>
+ <menuitem command="sel_edit" label="&staff.circ.renew_overlay.sel_edit.label;" accesskey="&staff.circ.renew_overlay.sel_edit.accesskey;" />
+ <menuseparator />
+ <menuitem command="sel_mark_items_damaged" label="&staff.circ.renew_overlay.sel_mark_items_damaged.label;" accesskey="&staff.circ.renew_overlay.sel_mark_items_damaged.accesskey;"/>
+ <menuseparator />
+ <menuitem command="sel_transit_abort" label="&staff.circ.renew_overlay.sel_transit_abort.label;" />
+ <menuseparator />
+ <menuitem command="sel_spine" label="&staff.circ.renew_overlay.sel_spine.label;" accesskey="&staff.circ.renew_overlay.sel_spine.accesskey;"/>
+ <menuitem command="save_columns" label="&staff.circ.renew_overlay.save_columns.label;"/>
+ </popup>
+</popupset>
+
+<box id="renew_main" flex="1" orient="vertical" class="my_overflow">
+ <vbox id="cmvb1" flex="1"/>
+</box>
+
+<vbox id="cmvb1" flex="1">
+ <hbox id="background" style="background-color: orange;">
+ <spacer flex="1"/>
+ <vbox>
+ <label id="background-text" value="&staff.circ.renew_overlay.background_text;" style="font-size: x-large; font-weight: bold;"/>
+ </vbox>
+ <spacer flex="1"/>
+ </hbox>
+ <groupbox id="cmgb1" flex="2">
+ <caption id="caption" label="&staff.circ.renew.caption;" />
+ <hbox id="renew_top_ui" />
+ <tree id="renew_list" flex="1" enableColumnDrag="true" context="copy_status_actions" />
+ <hbox id="renew_bottom_ui" />
+ </groupbox>
+</vbox>
+
+<hbox id="renew_top_ui">
+ <vbox>
+ <hbox>
+ <label id="renew_scan_barcode_label"
+ value="&staff.circ.renew.scan.label;"
+ accesskey="&staff.circ.renew.scan.accesskey;"
+ control="renew_barcode_entry_textbox"/>
+ <textbox id="renew_barcode_entry_textbox" context="clipboard"/>
+ <button id="renew_submit_barcode_button"
+ label="&staff.circ.renew.submit.label;"
+ command="cmd_renew_submit_barcode"
+ oldaccesskey="&staff.circ.renew.submit.accesskey;"/>
+ </hbox>
+ <label id="no_change_label" value="" style="color: red" hidden="true"/>
+ </vbox>
+ <spacer flex="1"/>
+ <vbox>
+ <hbox>
+ <menubar>
+ <menu label="&staff.circ.renew_overlay.actions.label;" accesskey="&staff.circ.renew_overlay.actions.accesskey;">
+ <menupopup>
+ <menuitem command="sel_clip" label="&staff.circ.renew_overlay.sel_clip.label;" accesskey="&staff.circ.renew_overlay.sel_clip.accesskey;" />
+ <menuitem command="sel_bucket" label="&staff.circ.renew_overlay.sel_bucket.label;" accesskey="&staff.circ.renew_overlay.sel_bucket.accesskey;"/>
+ <menuitem command="sel_opac" label="&staff.circ.renew_overlay.sel_opac.label;" accesskey="&staff.circ.renew_overlay.sel_opac.accesskey;" />
+ <menuitem command="sel_copy_details" label="&staff.circ.renew_overlay.sel_copy_details.label;" accesskey="&staff.circ.renew_overlay.sel_copy_details.accesskey;" />
+ <menuitem command="sel_patron" label="&staff.circ.renew_overlay.sel_patron.label;" accesskey="&staff.circ.renew_overlay.sel_patron.accesskey;"/>
+ <menuitem command="sel_last_patron" label="&staff.circ.renew_overlay.sel_last_patron.label;" accesskey="&staff.circ.renew_overlay.sel_last_patron.accesskey;"/>
+ <menuseparator/>
+ <menuitem command="sel_edit" label="&staff.circ.renew_overlay.sel_edit.label;" accesskey="&staff.circ.renew_overlay.sel_edit.accesskey;" />
+ <menuseparator />
+ <menuitem command="sel_mark_items_damaged" label="&staff.circ.renew_overlay.sel_mark_items_damaged.label;" accesskey="&staff.circ.renew_overlay.sel_mark_items_damaged.accesskey;"/>
+ <menuseparator />
+ <menuitem command="sel_transit_abort" label="&staff.circ.renew_overlay.sel_transit_abort.label;" />
+ <menuseparator />
+ <menuitem command="sel_spine" label="&staff.circ.renew_overlay.sel_spine.label;" accesskey="&staff.circ.renew_overlay.sel_spine.accesskey;"/>
+ <menuitem command="save_columns" label="&staff.circ.renew_overlay.save_columns.label;"/>
+ </menupopup>
+ </menu>
+ </menubar>
+ </hbox>
+ <label id="fine_tally" value="" amount="0.00" style="color: red" hidden="true" />
+ </vbox>
+
+</hbox>
+
+<hbox id="renew_bottom_ui">
+ <button id="list_actions" oncommand="this.firstChild.showPopup();"
+ label="&staff.generic.list_actions.label;"
+ accesskey="&staff.generic.list_actions.accesskey;"
+ type="menu" allowevents="true">
+ <menupopup id="list_actions_popup">
+ <menuitem command="sel_clip" label="&staff.generic.list_actions.sel_clip.label;" accesskey="&staff.generic.list_actions.sel_clip.accesskey;" disabled="true" />
+ <menuitem command="cmd_csv_to_printer" label="&staff.generic.list_actions.csv_to_printer.label;" accesskey="&staff.generic.list_actions.csv_to_printer.accesskey;" />
+ <menuitem command="cmd_csv_to_clipboard" label="&staff.generic.list_actions.csv_to_clipboard.label;" accesskey="&staff.generic.list_actions.csv_to_clipboard.accesskey;" />
+ <menuitem command="cmd_csv_to_file" label="&staff.generic.list_actions.csv_to_file.label;" accesskey="&staff.generic.list_actions.csv_to_file.accesskey;" />
+ <menuitem command="save_columns" label="&staff.generic.list_actions.save_columns.label;" accesskey="&staff.generic.list_actions.save_columns.accesskey;" />
+ </menupopup>
+ </button>
+
+ <button id="renew_print"
+ label="&staff.renew.print_receipt.label;"
+ command="cmd_renew_print"
+ accesskey="&staff.renew.print_receipt.accesskey;"/>
+ <checkbox id="trim_list" label="&staff.circ.renew_overlay.trim_list.label;" checked="true" oils_persist="checked"/>
+ <checkbox id="strict_barcode" label="&staff.circ.renew_overlay.strict_barcode.label;" checked="false" oils_persist="checked"/>
+ <spacer id="pcii3s" flex="1"/>
+</hbox>
+
+</overlay>
Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties 2009-09-18 20:26:54 UTC (rev 14059)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties 2009-09-18 20:29:15 UTC (rev 14060)
@@ -331,6 +331,7 @@
staff.circ.work_log_checkout.message=%1$s circulated %4$s to %3$s (%2$s)
staff.circ.checkin.hold_capture=Hold Capture
staff.circ.checkin.check_in.tab=Item Check In
+staff.circ.renew.tab.label=Renew Items
staff.circ.checkin.error=Check In Failed (in circ.util.checkin) (%1$s):
# "Circulation" - check &staff.main.menu.circ.label; in lang.dtd
# "Offline Interface" - check &staff.main.menu.circ.offline.label; in lang.dtd
@@ -366,4 +367,3 @@
staff.circ.holds.unexpected_error.not_likely_activated=Holds not likely activated.
staff.circ.holds.unexpected_error.not_likely_suspended=Holds not likely suspended.
staff.circ.holds.error.may_not_edit_pickup_lib_for_hold_intransit=You may not edit the pickup library for holds that are in-transit or ready for pickup.
-
More information about the open-ils-commits
mailing list