[open-ils-commits] r17839 - branches/rel_2_0/Open-ILS/xul/staff_client/server/patron (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Sep 20 13:33:04 EDT 2010
Author: phasefx
Date: 2010-09-20 13:33:00 -0400 (Mon, 20 Sep 2010)
New Revision: 17839
Modified:
branches/rel_2_0/Open-ILS/xul/staff_client/server/patron/summary.js
branches/rel_2_0/Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul
Log:
merge r17838 from trunk, change to stat cat display in horizontal patron summary
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/server/patron/summary.js
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/server/patron/summary.js 2010-09-20 17:31:51 UTC (rev 17838)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/server/patron/summary.js 2010-09-20 17:33:00 UTC (rev 17839)
@@ -126,6 +126,7 @@
['command'],
function() {
try {
+ var rows = $('patron_info_rows');
obj.stat_cat_list.clear();
var entries = obj.patron.stat_cat_entries();
for (var i = 0; i < entries.length; i++) {
@@ -134,15 +135,35 @@
stat_cat = obj.OpenILS.data.lookup('actsc',entries[i].stat_cat());
}
if (!stat_cat) { continue; }
- if (get_bool( stat_cat.usr_summary() )) {
- obj.stat_cat_list.append( {
- 'row' : {
- 'my' : {
- 'actsc' : stat_cat,
- 'actscecm' : entries[i],
- }
+ // Every stat cat gets rendered in the Stat Cats tab
+ obj.stat_cat_list.append( {
+ 'row' : {
+ 'my' : {
+ 'actsc' : stat_cat,
+ 'actscecm' : entries[i],
}
- } );
+ }
+ } );
+ // But only a proud few share the Patron Info pane
+ if (rows && get_bool( stat_cat.usr_summary() )) {
+ var row_id = 'stat_cat_id_' + stat_cat.id();
+ var row; var label1; var label2;
+ if ($(row_id)) {
+ row = $(row_id);
+ label1 = row.firstChild;
+ label2 = row.lastChild;
+ } else {
+ row = document.createElement('row');
+ row.setAttribute('id',row_id);
+ label1 = document.createElement('label');
+ label2 = document.createElement('label');
+ row.appendChild(label1);
+ row.appendChild(label2);
+ rows.appendChild(row);
+ }
+ label1.setAttribute('value',stat_cat.name());
+ label1.setAttribute('tooltiptext','stat cat id ' + stat_cat.id());
+ label2.setAttribute('value',entries[i].stat_cat_entry());
}
}
} catch(E) {
@@ -943,7 +964,12 @@
*/
// Update the screen
- chain.push( function() { obj.controller.render(); } );
+ chain.push( function() {
+ obj.controller.render();
+ if ($('stat_cat_tab')) {
+ util.widgets.dispatch('command','stat_cat_tab');
+ }
+ } );
// On Complete
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul 2010-09-20 17:31:51 UTC (rev 17838)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul 2010-09-20 17:33:00 UTC (rev 17839)
@@ -100,7 +100,7 @@
<column/>
<column/>
</columns>
- <rows>
+ <rows id="patron_info_rows">
<row>
<label id="PatronSummaryContact_date_of_birth_label" click_to_hide_dob="true" class="copyable text_left dob label click_link" value="&staff.patron_display.date_of_birth.label;"/>
<description id="patron_date_of_birth" class="copyable dob value" hide_value="true" oils_persist="hide_value"/>
More information about the open-ils-commits
mailing list