From 081880142353b99a4e90d7fbb9e9407dabffb9a8 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 14 Aug 2013 09:44:45 -0400 Subject: [PATCH 1/1] Billing UI style lost and longoverdue circulations When a LOST or LONGOVERDUE circulation, which has not yet been returned, appears in the patron's list of billed transactions, style them differently from other not-yet-returned items. Similar to regular not-yet-returned items, display a helpful message to staff indicating what colors map to what types of circulations. The default colors are maroon for LOST and organge for LONGOVERDUE. To change the colors, a change to circ.css (for the style) and lang.dtd (for the hint) are required. Signed-off-by: Bill Erickson Signed-off-by: Mike Rylander --- Open-ILS/web/opac/locale/en-US/lang.dtd | 2 ++ .../xul/staff_client/server/patron/bill2.js | 21 +++++++++++-- .../xul/staff_client/server/patron/bill2.xul | 9 +++++- .../xul/staff_client/server/skin/circ.css | 31 +++++++++++++++++++ 4 files changed, 59 insertions(+), 4 deletions(-) diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 8a653fc74a..6e9e3a5df4 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -3338,6 +3338,8 @@ + + diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.js b/Open-ILS/xul/staff_client/server/patron/bill2.js index a9af71d7ca..dde0fe82c0 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill2.js +++ b/Open-ILS/xul/staff_client/server/patron/bill2.js @@ -564,9 +564,24 @@ function init_lists() { util.widgets.addProperty(params.treeitem_node.firstChild.childNodes[ g.payment_pending_column_idx ],'refundable'); } if ( row && row.my && row.my.circ && ! row.my.circ.checkin_time() ) { - $('circulating_hint').hidden = false; - util.widgets.addProperty(params.treeitem_node.firstChild,'circulating'); - util.widgets.addProperty(params.treeitem_node.firstChild.childNodes[ g.title_column_idx ],'circulating'); + var style_type = 'circulating'; + var stop_fines = row.my.circ.stop_fines() || ''; + + // we have custom syling for these stop-fines reasons + if (stop_fines.match(/LOST|LONGOVERDUE/)) + style_type = stop_fines.toLowerCase(); + + $(style_type + '_hint').hidden = false; + + // style every cell in the row + for (var n in params.treeitem_node.firstChild.childNodes) { + try { + util.widgets.addProperty( + params.treeitem_node.firstChild.childNodes[n], + style_type + ); + } catch(E) {} + } } } catch(E) { g.error.sdump('D_WARN','Error setting list properties in bill2.js: ' + E); diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.xul b/Open-ILS/xul/staff_client/server/patron/bill2.xul index 32f0e0be7a..b0135b4bd9 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill2.xul +++ b/Open-ILS/xul/staff_client/server/patron/bill2.xul @@ -125,7 +125,14 @@