[open-ils-commits] r11464 - trunk/Open-ILS/xul/staff_client/server/patron
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Dec 8 22:33:01 EST 2008
Author: miker
Date: 2008-12-08 22:33:00 -0500 (Mon, 08 Dec 2008)
New Revision: 11464
Modified:
trunk/Open-ILS/xul/staff_client/server/patron/summary.js
Log:
initial stab at standing penalty dispaly
Modified: trunk/Open-ILS/xul/staff_client/server/patron/summary.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/summary.js 2008-12-09 02:54:22 UTC (rev 11463)
+++ trunk/Open-ILS/xul/staff_client/server/patron/summary.js 2008-12-09 03:33:00 UTC (rev 11464)
@@ -103,9 +103,24 @@
util.widgets.remove_children(e2);
var penalties = obj.patron.standing_penalties();
for (var i = 0; i < penalties.length; i++) {
+
+ var b = document.createElement('hbox');
+ var r = document.createElement('button');
var x = document.createElement('label');
- x.setAttribute('value',penalties[i].penalty_type());
- e2.appendChild(x);
+
+ //x.setAttribute('value',penalties[i].penalty_type());
+ x.setAttribute('value',penalties[i].standing_penalty().name());
+ b.appendChild(x);
+
+ // XXX check a permission here? How to fire the remove action ??? XXX
+ r.setAttribute('label', $("patronStrings").getString('staff.patron.summary.standing_penalty.remove'));
+ b.appendChild(r);
+
+ if (penalties[i].standing_penalty().block_list().match(/RENEW/)) addCSSClass(b,'PENALTY_RENEW');
+ if (penalties[i].standing_penalty().block_list().match(/HOLD/)) addCSSClass(b,'PENALTY_HOLD');
+ if (penalties[i].standing_penalty().block_list().match(/CIRC/)) addCSSClass(b,'PENALTY_CIRC');
+
+ e2.appendChild(b);
}
};
}
More information about the open-ils-commits
mailing list