From 77924e1c87a1beb8b685f1f4726dde6985c0a52e Mon Sep 17 00:00:00 2001 From: phasefx Date: Fri, 16 Dec 2005 19:05:12 +0000 Subject: [PATCH] patron holds git-svn-id: svn://svn.open-ils.org/ILS/trunk@2422 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../chrome/content/evergreen/util/error.js | 2 +- Open-ILS/xul/staff_client/server/circ/util.js | 104 +++++++++++++++++- .../xul/staff_client/server/patron/display.js | 10 +- 3 files changed, 113 insertions(+), 3 deletions(-) diff --git a/Open-ILS/xul/staff_client/chrome/content/evergreen/util/error.js b/Open-ILS/xul/staff_client/chrome/content/evergreen/util/error.js index a1dc3bf991..434959246d 100644 --- a/Open-ILS/xul/staff_client/chrome/content/evergreen/util/error.js +++ b/Open-ILS/xul/staff_client/chrome/content/evergreen/util/error.js @@ -33,7 +33,7 @@ util.error.prototype = { 'sdump_levels' : { - 'D_NONE' : false, 'D_ALL' : true, 'D_ERROR' : true, 'D_DEBUG' : true, 'D_TRACE' : false, + 'D_NONE' : false, 'D_ALL' : true, 'D_ERROR' : true, 'D_DEBUG' : true, 'D_TRACE' : true, 'D_TRACE_ENTER' : false, 'D_TRACE_EXIT' : false, 'D_TIMEOUT' : false, 'D_FILTER' : false, 'D_CONSTRUCTOR' : false, 'D_FIREFOX' : false, 'D_LEGACY' : false, diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index 29e4f9244c..de5beff2ce 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -4,7 +4,7 @@ if (typeof circ == 'undefined') var circ = {}; circ.util = {}; circ.util.EXPORT_OK = [ - 'columns', 'checkin_via_barcode', 'std_map_row_to_column', 'hold_capture_via_copy_barcode' + 'columns', 'hold_columns', 'checkin_via_barcode', 'std_map_row_to_column', 'hold_capture_via_copy_barcode' ]; circ.util.EXPORT_TAGS = { ':all' : circ.util.EXPORT_OK }; @@ -127,6 +127,108 @@ circ.util.columns = function(modify) { return c; } +circ.util.hold_columns = function(modify) { + + JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'}); + + function getString(s) { return data.entities[s]; } + + var c = [ + { + 'id' : 'request_time', 'label' : getString('staff.ahr_request_time_label'), 'flex' : 0, + 'primary' : false, 'hidden' : true, + 'render' : 'my.ahr.request_time().toString().substr(0,10)' + }, + { + 'id' : 'capture_time', 'label' : getString('staff.ahr_capture_time_label'), 'flex' : 1, + 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.capture_time()' + }, + { + 'id' : 'status', 'label' : getString('staff.ahr_status_label'), 'flex' : 1, + 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.status()' + }, + { + 'id' : 'hold_type', 'label' : getString('staff.ahr_hold_type_label'), 'flex' : 0, + 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.hold_type()' + }, + { + 'id' : 'pickup_lib', 'label' : getString('staff.ahr_pickup_lib_label'), 'flex' : 1, + 'primary' : false, 'hidden' : true, + 'render' : 'obj.OpenILS.data.hash.aou[ my.ahr.pickup_lib() ].name()' + }, + { + 'id' : 'pickup_lib_shortname', 'label' : getString('staff.ahr_pickup_lib_label'), 'flex' : 0, + 'primary' : false, 'hidden' : true, + 'render' : 'obj.OpenILS.data.hash.aou[ my.ahr.pickup_lib() ].shortname()' + }, + { + 'id' : 'current_copy', 'label' : getString('staff.ahr_current_copy_label'), 'flex' : 1, + 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.current_copy()' + }, + { + 'id' : 'email_notify', 'label' : getString('staff.ahr_email_notify_label'), 'flex' : 1, + 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.email_notify()' + }, + { + 'id' : 'expire_time', 'label' : getString('staff.ahr_expire_time_label'), 'flex' : 1, + 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.expire_time()' + }, + { + 'id' : 'fulfillment_time', 'label' : getString('staff.ahr_fulfillment_time_label'), 'flex' : 1, + 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.fulfillment_time()' + }, + { + 'id' : 'holdable_formats', 'label' : getString('staff.ahr_holdable_formats_label'), 'flex' : 1, + 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.holdable_formats()' + }, + { + 'id' : 'id', 'label' : getString('staff.ahr_id_label'), 'flex' : 1, + 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.id()' + }, + { + 'id' : 'phone_notify', 'label' : getString('staff.ahr_phone_notify_label'), 'flex' : 1, + 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.phone_notify()' + }, + { + 'id' : 'prev_check_time', 'label' : getString('staff.ahr_prev_check_time_label'), 'flex' : 1, + 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.prev_check_time()' + }, + { + 'id' : 'requestor', 'label' : getString('staff.ahr_requestor_label'), 'flex' : 1, + 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.requestor()' + }, + { + 'id' : 'selection_depth', 'label' : getString('staff.ahr_selection_depth_label'), 'flex' : 1, + 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.selection_depth()' + }, + { + 'id' : 'target', 'label' : getString('staff.ahr_target_label'), 'flex' : 1, + 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.target()' + }, + { + 'id' : 'usr', 'label' : getString('staff.ahr_usr_label'), 'flex' : 1, + 'primary' : false, 'hidden' : true, 'render' : 'my.ahr.usr()' + }, + { + 'id' : 'title', 'label' : getString('staff.mvr_label_title'), 'flex' : 1, + 'primary' : false, 'hidden' : true, 'render' : 'my.mvr.title()' + }, + { + 'id' : 'author', 'label' : getString('staff.mvr_label_author'), 'flex' : 1, + 'primary' : false, 'hidden' : true, 'render' : 'my.mvr.author()' + }, + + ]; + for (var i = 0; i < c.length; i++) { + if (modify[ c[i].id ]) { + for (var j in modify[ c[i].id ]) { + c[i][j] = modify[ c[i].id ][j]; + } + } + } + return c; +} + circ.util.std_map_row_to_column = function() { return function(row,col) { // row contains { 'my' : { 'acp' : {}, 'circ' : {}, 'mvr' : {} } } diff --git a/Open-ILS/xul/staff_client/server/patron/display.js b/Open-ILS/xul/staff_client/server/patron/display.js index 945247fbeb..afc32800d5 100644 --- a/Open-ILS/xul/staff_client/server/patron/display.js +++ b/Open-ILS/xul/staff_client/server/patron/display.js @@ -82,7 +82,15 @@ patron.display.prototype = { 'cmd_patron_holds' : [ ['command'], function(ev) { - obj.right_deck.set_iframe(urls.remote_patron_holds); + obj.right_deck.set_iframe( + urls.remote_patron_holds + + '?session=' + window.escape( obj.session ) + + '&patron_id=' + window.escape( obj.patron.id() ), + {}, + { + //FIXME//'holds' : obj.patron.holds() + } + ); dump('obj.right_deck.node.childNodes.length = ' + obj.right_deck.node.childNodes.length + '\n'); } ], -- 2.43.2