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');
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');
}
.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; }
.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; }