From 878946096e8ebf0f6d4fb342dd77eb7914a510bc Mon Sep 17 00:00:00 2001 From: phasefx Date: Tue, 26 Jul 2005 16:51:57 +0000 Subject: [PATCH] context checkin tweaks, and columns again git-svn-id: svn://svn.open-ils.org/ILS/trunk@1491 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../content/evergreen/circ/circ_utils.js | 8 +++--- .../evergreen/patron/patron_display.js | 26 +++++++++++++------ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/Evergreen/staff_client/chrome/content/evergreen/circ/circ_utils.js b/Evergreen/staff_client/chrome/content/evergreen/circ/circ_utils.js index d5b54200c8..067d383718 100644 --- a/Evergreen/staff_client/chrome/content/evergreen/circ/circ_utils.js +++ b/Evergreen/staff_client/chrome/content/evergreen/circ/circ_utils.js @@ -389,10 +389,6 @@ function circ_cols() { 'id' : 'xact_finish', 'label' : getString('circ_label_xact_finish'), 'flex' : 1, 'primary' : false, 'hidden' : true, 'fm_class' : 'circ', 'fm_field_render' : '.xact_finish()' }, - { - 'id' : 'renewal_remaining', 'label' : getString('circ_label_renewal_remaining'), 'flex' : 1, - 'primary' : false, 'hidden' : false, 'fm_class' : 'circ', 'fm_field_render' : '.renewal_remaining()' - }, { 'id' : 'due_date', 'label' : getString('circ_label_due_date'), 'flex' : 1, 'primary' : false, 'hidden' : false, 'fm_class' : 'circ', 'fm_field_render' : '.due_date().substr(0,10)' @@ -405,6 +401,10 @@ function circ_cols() { 'id' : 'author', 'label' : getString('mvr_label_author'), 'flex' : 1, 'primary' : false, 'hidden' : false, 'fm_class' : 'mvr', 'fm_field_render' : '.author()' }, + { + 'id' : 'renewal_remaining', 'label' : getString('circ_label_renewal_remaining'), 'flex' : 0, + 'primary' : false, 'hidden' : false, 'fm_class' : 'circ', 'fm_field_render' : '.renewal_remaining()' + }, { 'id' : 'status', 'label' : getString('acp_label_status'), 'flex' : 1, 'primary' : false, 'hidden' : false, 'fm_class' : 'acp', 'fm_field_render' : 'mw.G.ccs_hash[ $$.status() ].name()' diff --git a/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display.js b/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display.js index 8c5fa2108b..1c6e07b5f7 100755 --- a/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display.js +++ b/Evergreen/staff_client/chrome/content/evergreen/patron/patron_display.js @@ -215,10 +215,15 @@ function patron_display_patron_items_init(p) { var idx = patron_items[i].getAttribute('record_id'); var copy = p._patron.checkouts()[ idx ].copy; var check = checkin_by_copy_barcode( copy.barcode(), null ); - if (check.status == 0) { + if (check != null) { + if (parseInt(check.route_to)) { + try { + check.route_to = mw.G.org_tree_hash[check.route_to].shortname(); + } catch(E) { + sdump('D_ERROR',js2JSON(E) + '\n'); + } + } alert('Check In: ' + check.text + ' Route To: ' + check.route_to); - } else { - alert('Check In: ' + check.text + ' Route To: ' + mw.G.org_tree_hash[check.route_to].shortname()); } p.refresh(); } catch(E) { @@ -410,13 +415,18 @@ function patron_display_patron_checkout_items_init(p) { var check = checkin_by_copy_barcode( copy.barcode(), null ); if (check == null) { // change this to whatever it takes keep_these.push( checkouts[ idx ] ); - } - checkouts = keep_these; - if (check.status == 0) { - alert('Check In: ' + check.text + ' Route To: ' + check.route_to); } else { - alert('Check In: ' + check.text + ' Route To: ' + mw.G.org_tree_hash[check.route_to].shortname()); + if (parseInt(check.route_to)) { + try { + check.route_to = mw.G.org_tree_hash[check.route_to].shortname(); + } catch(E) { + sdump('D_ERROR',js2JSON(E) + '\n'); + } + } + alert('Check In: ' + check.text + ' Route To: ' + check.route_to); } + + checkouts = keep_these; p.refresh(); } catch(E) { alert(E); -- 2.43.2