From: phasefx Date: Wed, 19 Jul 2006 21:05:25 +0000 (+0000) Subject: patron styling.. but the extra async calls might be a bit much X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=fbef56cde08e54bb2d8586a4f8c5167691c292f9;p=Evergreen.git patron styling.. but the extra async calls might be a bit much git-svn-id: svn://svn.open-ils.org/ILS/trunk@5095 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/patron/util.js b/Open-ILS/xul/staff_client/server/patron/util.js index fcf704477e..a5cf3995df 100644 --- a/Open-ILS/xul/staff_client/server/patron/util.js +++ b/Open-ILS/xul/staff_client/server/patron/util.js @@ -415,6 +415,16 @@ var TIME = { minute : 60, hour : 60*60, day : 60*60*24, year : 60*60*24*365 }; patron.util.set_penalty_css = function(patron) { try { + + JSAN.use('util.network'); var net = new util.network(); + net.simple_request('FM_MOBTS_TOTAL_HAVING_BALANCE',[ ses(), patron.id() ], function(req) { + if (req.getResultObject() > 0) addCSSClass(document.documentElement,'PATRON_HAS_BILLS'); + }); + net.simple_request('FM_CIRC_COUNT_RETRIEVE_VIA_USER',[ ses(), patron.id() ], function(req) { + var co = req.getResultObject(); + if (co.overdue > 0 || co.long_overdue > 0) addCSSClass(document.documentElement,'PATRON_HAS_OVERDUES'); + }); + JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'}); data.last_patron = patron.id(); data.stash('last_patron'); @@ -434,11 +444,11 @@ patron.util.set_penalty_css = function(patron) { addCSSClass(document.documentElement,'PATRON_HAS_ALERT'); } - if (patron.barred() > 0) { + if (get_bool( patron.barred() )) { addCSSClass(document.documentElement,'PATRON_BARRED'); } - if (patron.active() == 0) { + if (!get_bool( patron.active() )) { addCSSClass(document.documentElement,'PATRON_INACTIVE'); } 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 b97cf56943..385b2a56cf 100755 --- a/Open-ILS/xul/staff_client/server/skin/patron_display.css +++ b/Open-ILS/xul/staff_client/server/skin/patron_display.css @@ -13,28 +13,30 @@ deck#patron_deck { border-left: solid thin black; } .MULTIPLE_PENALTIES .patronNameLarge { background-color: red; } */ -.TEST label.bill { color: red; } -.TEST label.bill.label { text-decoration: underline; } - -.TEST label.credit { color: red; } -.TEST label.credit.label { text-decoration: underline; } -.TEST label.credit.value { } - -.PATRON_EXCEEDS_CHECKOUT_COUNT label.items_out { color: red; } +.PATRON_HAS_BILLS .patronNameLarge { background-color: #FF9900; } +.PATRON_HAS_BILLS label.bill { color: #FF9900; } +.PATRON_HAS_BILLS label.bill.label { text-decoration: underline; } +.PATRON_HAS_BILLS label.bill.value { } + +.PATRON_HAS_OVERDUES .patronNameLarge { background-color: #FF9900; } +.PATRON_HAS_OVERDUES label.items_overdue { color: #FF9900; } +.PATRON_HAS_OVERDUES label.items_overdue.label { text-decoration: underline; } +.PATRON_HAS_OVERDUES label.items_overdue.value { } + +.PATRON_EXCEEDS_CHECKOUT_COUNT .patronNameLarge { background-color: purple; } +.PATRON_EXCEEDS_CHECKOUT_COUNT label.items_out { color: purple; } .PATRON_EXCEEDS_CHECKOUT_COUNT label.items_out.label { text-decoration: underline; } .PATRON_EXCEEDS_CHECKOUT_COUNT label.items_out.value { } -.TEST label.items_overdue { color: red; } -.TEST label.items_overdue.label { text-decoration: underline; } -.TEST label.items_overdue.value { } - -.TEST label.holds { color: blue; } -.TEST label.holds.label { text-decoration: underline; } -.TEST label.holds.value { } +.PATRON_EXCEEDS_OVERDUE_COUNT .patronNameLarge { background-color: purple; } +.PATRON_EXCEEDS_OVERDUE_COUNT label.items_overdue { color: purple; } +.PATRON_EXCEEDS_OVERDUE_COUNT label.items_overdue.label { text-decoration: underline; } +.PATRON_EXCEEDS_OVERDUE_COUNT label.items_overdue.value { } -.TEST label.holds_ready { color: blue; } -.TEST label.holds_ready.label { text-decoration: underline; } -.TEST label.holds_ready.value { } +.PATRON_EXCEEDS_FINES .patronNameLarge { background-color: purple; } +.PATRON_EXCEEDS_FINES label.bill { color: purple; } +.PATRON_EXCEEDS_FINES label.bill.label { text-decoration: underline; } +.PATRON_EXCEEDS_FINES label.bill.value { } .PATRON_AGE_LT_18 .dob { text-decoration: underline; color: purple; } .PATRON_AGE_LT_18 label.juvenile_indicator { display: inline; text-decoration: underline; color: purple; } @@ -43,10 +45,10 @@ deck#patron_deck { border-left: solid thin black; } .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 .patronNameLarge { background-color: #333333; } .PATRON_INACTIVE label.inactive_indicator { display: inline; text-decoration: underline; color: gray; } -.PATRON_EXPIRED .patronNameLarge { background-color: fuchsia; } +.PATRON_EXPIRED .patronNameLarge { background-color: #666666; } .PATRON_EXPIRED label.expired_indicator { display: inline; text-decoration: underline; color: fuchsia; } .PATRON_BARRED .patronNameLarge { background-color: red; }