From 956b43afce5c3681c1c67b24106fc038bf1ce38d Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 17 Apr 2006 05:11:27 +0000 Subject: [PATCH] consolidate patron css class manipulation. tweak styles. add indicators next to patron name for barred, inactive, expired, juvenille, alert git-svn-id: svn://svn.open-ils.org/ILS/trunk@3709 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../xul/staff_client/server/patron/display.js | 16 +---------- .../server/patron/display_overlay.xul | 11 ++++++-- .../xul/staff_client/server/patron/util.js | 6 ++++ .../server/skin/patron_display.css | 28 +++++++++++++------ 4 files changed, 36 insertions(+), 25 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/patron/display.js b/Open-ILS/xul/staff_client/server/patron/display.js index e86ae3639b..5fb3015bdd 100644 --- a/Open-ILS/xul/staff_client/server/patron/display.js +++ b/Open-ILS/xul/staff_client/server/patron/display.js @@ -208,21 +208,7 @@ patron.display.prototype = { obj.patron.family_name() + ', ' + obj.patron.first_given_name() + ' ' + ( obj.patron.second_given_name() ? obj.patron.second_given_name() : '' ) ); - removeCSSClass(e,'NO_PENALTIES'); - removeCSSClass(e,'ONE_PENALTY'); - removeCSSClass(e,'MULTIPLE_PENALTIES'); - addCSSClass(e,'patron_name'); - switch(obj.patron.standing_penalties().length) { - case 0: - addCSSClass(e,'NO_PENALTIES'); - break; - case 1: - addCSSClass(e,'ONE_PENALTY'); - break; - default: - addCSSClass(e,'MULTIPLE_PENALTIES'); - break; - } + JSAN.use('patron.util'); patron.util.set_penalty_css(obj.patron); }; } ], diff --git a/Open-ILS/xul/staff_client/server/patron/display_overlay.xul b/Open-ILS/xul/staff_client/server/patron/display_overlay.xul index b48fafe329..d5f22eea74 100644 --- a/Open-ILS/xul/staff_client/server/patron/display_overlay.xul +++ b/Open-ILS/xul/staff_client/server/patron/display_overlay.xul @@ -12,8 +12,15 @@ - diff --git a/Open-ILS/xul/staff_client/server/patron/util.js b/Open-ILS/xul/staff_client/server/patron/util.js index 7b93993966..67811be7f9 100644 --- a/Open-ILS/xul/staff_client/server/patron/util.js +++ b/Open-ILS/xul/staff_client/server/patron/util.js @@ -187,6 +187,12 @@ patron.util.set_penalty_css = function(patron) { addCSSClass(document.documentElement,penalties[i].penalty_type()); } + switch(penalties.length) { + case 0: addCSSClass(document.documentElement,'NO_PENALTIES'); break; + case 1: addCSSClass(document.documentElement,'ONE_PENALTY'); break; + default: addCSSClass(document.documentElement,'MULTIPLE_PENALTIES'); break; + } + if (patron.alert_message()) { addCSSClass(document.documentElement,'PATRON_HAS_ALERT'); } diff --git a/Open-ILS/xul/staff_client/server/skin/patron_display.css b/Open-ILS/xul/staff_client/server/skin/patron_display.css index 6749de82f5..25e15c2c71 100755 --- a/Open-ILS/xul/staff_client/server/skin/patron_display.css +++ b/Open-ILS/xul/staff_client/server/skin/patron_display.css @@ -1,13 +1,15 @@ @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace html url("http://www.w3.org/TR/REC-html40"); +.hideme { display: none; } + hbox#PatronNotNavBar { border-top: solid thin black; } deck#patron_deck { border-left: solid thin black; } .patronNameLarge { font-size: large; font-family: bold; } -.NO_PENALTIES { background-color: lime; } -.ONE_PENALTY { background-color: orange; } -.MULTIPLE_PENALTIES { background-color: red; } +.NO_PENALTIES .patronNameLarge { background-color: lime; } +.ONE_PENALTY .patronNameLarge { background-color: fuchsia; } +.MULTIPLE_PENALTIES .patronNameLarge { background-color: red; } .TEST label.bill { color: red; } .TEST label.bill.label { text-decoration: underline; } @@ -32,10 +34,20 @@ deck#patron_deck { border-left: solid thin black; } .TEST label.holds_ready.label { text-decoration: underline; } .TEST label.holds_ready.value { } -.PATRON_AGE_LT_18 #PatronSummaryContact_groupbox { border: solid thick green; } +.PATRON_AGE_LT_18 .dob { text-decoration: underline; color: purple; } +.PATRON_AGE_LT_18 label.juvenille_indicator { display: inline; text-decoration: underline; color: purple; } + +.PATRON_HAS_ALERT .patronNameLarge, +.PATRON_HAS_ALERT groupbox.alert { background-color: yellow; } +.PATRON_HAS_ALERT label.alert_indicator { display: inline; text-decoration: underline; color: olive } + +.PATRON_INACTIVE .patronNameLarge { background-color: gray; } +.PATRON_INACTIVE label.inactive_indicator { display: inline; text-decoration: underline; color: gray; } + +.PATRON_EXPIRED .patronNameLarge { background-color: fuchsia; } +.PATRON_EXPIRED label.expired_indicator { display: inline; text-decoration: underline; color: fuchsia; } + +.PATRON_BARRED .patronNameLarge { background-color: red; } +.PATRON_BARRED label.barred_indicator { display: inline; text-decoration: underline; color: red; } -.PATRON_HAS_ALERT .patronNameLarge, .PATRON_HAS_ALERT #PatronSummaryStatus_groupbox { background-color: yellow; } -.PATRON_INACTIVE .patronNameLarge, .PATRON_INACTIVE #PatronSummaryStatus_groupbox { background-color: darkgray; } -.PATRON_EXPIRED .patronNameLarge, .PATRON_EXPIRED #PatronSummaryStatus_groupbox { background-color: orange; } -.PATRON_BARRED .patronNameLarge, .PATRON_BARRED #PatronSummaryStatus_groupbox { background-color: red; } -- 2.43.2