From 838e8ff8acf105e8dde86933980402c9bb308e6a Mon Sep 17 00:00:00 2001 From: dbs Date: Sat, 6 Jun 2009 01:53:45 +0000 Subject: [PATCH] Add a "Due Time" column. Useful for items that circulate only for hours at a time. Warning: This is a gross hack, doesn't support localized displays, etc. git-svn-id: svn://svn.open-ils.org/ILS/trunk@13336 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/circ/util.js | 36 ++++++++++++++++++++++ .../server/locale/en-US/circ.properties | 1 + 2 files changed, 37 insertions(+) diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index 5e753f7b91..967ec6f916 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -191,7 +191,16 @@ circ.util.offline_checkout_columns = function(modify,params) { 'primary' : false, 'hidden' : false, 'render' : function(my) { return my.due_date; } + }, + { + 'id' : 'due_time', + 'label' : document.getElementById('commonStrings').getString('staff.circ_label_due_time'), + 'flex' : 1, + 'primary' : false, + 'hidden' : false, + 'render' : function(my) { return my.due_time; } } + ]; if (modify) for (var i = 0; i < c.length; i++) { if (modify[ c[i].id ]) { @@ -341,6 +350,14 @@ circ.util.offline_renew_columns = function(modify,params) { 'primary' : false, 'hidden' : false, 'render' : function(my) { return my.due_date; } + }, + { + 'id' : 'due_time', + 'label' : document.getElementById('commonStrings').getString('staff.circ_label_due_time'), + 'flex' : 1, + 'primary' : false, + 'hidden' : false, + 'render' : function(my) { return my.due_time; } } ]; if (modify) for (var i = 0; i < c.length; i++) { @@ -891,6 +908,25 @@ circ.util.columns = function(modify,params) { }, { 'persist' : 'hidden width ordinal', + 'id' : 'due_time', + 'label' : document.getElementById('commonStrings').getString('staff.circ_label_due_time'), + 'flex' : 1, + 'primary' : false, + 'hidden' : true, + 'render' : function(my) { + if (my.circ) { + return my.circ.due_date().substr(11,8); + } else { + if (my.acp.circulations()) { + return my.acp.circulations()[0].due_date().substr(11,8); + } else { + return ""; + } + } + } + }, + { + 'persist' : 'hidden width ordinal', 'id' : 'create_date', 'label' : document.getElementById('circStrings').getString('staff.circ.utils.create_date'), 'flex' : 1, diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties index 7a5fb3360f..8db6b1ad91 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties @@ -200,6 +200,7 @@ staff.circ.utils.offline.count=Count staff.circ.utils.offline.patron_barcode=Patron Barcode staff.circ.utils.offline.item_barcode=Item Barcode staff.circ.utils.offline.due_date=Due Date +staff.circ.utils.offline.due_time=Due Time staff.circ.utils.offline.backdate=Back Date staff.circ.utils.offline.use_time=Use Time staff.circ.utils.not_cataloged=Not Cataloged -- 2.11.0