[open-ils-commits] r13559 - trunk/Open-ILS/xul/staff_client/server/admin (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jul 9 17:19:08 EDT 2009
Author: erickson
Date: 2009-07-09 17:19:04 -0400 (Thu, 09 Jul 2009)
New Revision: 13559
Modified:
trunk/Open-ILS/xul/staff_client/server/admin/stat_cat_editor.js
trunk/Open-ILS/xul/staff_client/server/admin/stat_cat_editor.xhtml
Log:
added support for setting usr_summary column on actor stat cats
Modified: trunk/Open-ILS/xul/staff_client/server/admin/stat_cat_editor.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/admin/stat_cat_editor.js 2009-07-09 20:10:48 UTC (rev 13558)
+++ trunk/Open-ILS/xul/staff_client/server/admin/stat_cat_editor.js 2009-07-09 21:19:04 UTC (rev 13559)
@@ -140,6 +140,11 @@
hideMe($('sc_none'));
unHideMe($('sc_table'));
+ if(type == 'actor')
+ unHideMe($('sc_usr_summary_label'));
+ else
+ hideMe($('sc_usr_summary_label'));
+
scCounter = 0;
for( var c in cats ) scInsertCat( tbody, cats[c], type );
}
@@ -158,9 +163,21 @@
$n(row, 'sc_edit').onclick = function(){ scEdit(tbody, type, cat); };
$n(row, 'sc_owning_lib').appendChild( text( findOrgUnit(cat.owner()).name() ));
- if( cat.opac_visible() != 0 && cat.opac_visible() != '0' ) unHideMe($n(row, 'sc_opac_visible'));
- else unHideMe($n(row, 'sc_opac_invisible'));
+ if(isTrue(cat.opac_visible()))
+ unHideMe($n(row, 'sc_opac_visible'));
+ else
+ unHideMe($n(row, 'sc_opac_invisible'));
+ if(type == 'actor') {
+ if(isTrue(cat.usr_summary()))
+ unHideMe($n(row, 'sc_usr_summary_on'));
+ else
+ unHideMe($n(row, 'sc_usr_summary'));
+
+ } else {
+ hideMe($n(row, 'sc_usr_summary_td'));
+ }
+
tbody.appendChild(row);
scEntryCounter = 0;
@@ -303,6 +320,13 @@
$n(row, 'sc_edit_name').value = cat.name();
+ if(type == 'actor') {
+ var cb = $n(row, 'sc_edit_usr_summary');
+ cb.checked = isTrue(cat.usr_summary());
+ } else {
+ hideMe($n(row, 'sc_edit_usr_summary_td'));
+ }
+
var name = $n(row, 'sc_edit_cancel');
name.onclick = function() { tbody.removeChild(row); };
@@ -361,14 +385,20 @@
var isvisible = false;
if( cat.opac_visible() != 0 && cat.opac_visible() != '0' ) isvisible = true;
- if( (name == cat.name()) && (visible == isvisible)
- && (newlib == cat.owner()) ) { return true; }
+ var usr_summary = $n(row, 'sc_edit_usr_summary').checked;
+ if( (name == cat.name()) &&
+ (visible == isvisible) &&
+ (newlib == cat.owner()) &&
+ (usr_summary == isTrue(cat.usr_summary())) )
+ return true;
+
cat.name( name );
cat.owner( newlib );
cat.entries(null);
cat.opac_visible(0);
if( visible ) cat.opac_visible(1);
+ cat.usr_summary( (usr_summary) ? 1 : 0 );
var req = new Request( SC_UPDATE.replace(/TYPE/,type), session, cat );
req.send(true);
Modified: trunk/Open-ILS/xul/staff_client/server/admin/stat_cat_editor.xhtml
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/admin/stat_cat_editor.xhtml 2009-07-09 20:10:48 UTC (rev 13558)
+++ trunk/Open-ILS/xul/staff_client/server/admin/stat_cat_editor.xhtml 2009-07-09 21:19:04 UTC (rev 13559)
@@ -129,6 +129,7 @@
<td>&staff.server.admin.stat_cat.name.label;</td>
<td>&staff.server.admin.stat_cat.owning_library.label;</td>
<td>&staff.server.admin.stat_cat.opac_visibility.label;</td>
+ <td id='sc_usr_summary_label'>&staff.server.admin.stat_cat.usr_summary.label;</td>
<td>&staff.server.admin.stat_cat.entries.label;</td>
<td>&staff.server.admin.stat_cat.add_entry;</td>
<td>&staff.server.admin.stat_cat.edit;</td>
@@ -144,7 +145,10 @@
<span class='hide_me' name='sc_opac_visible'>&staff.server.admin.stat_cat.on;</span>
<span class='hide_me' name='sc_opac_invisible'>&staff.server.admin.stat_cat.off;</span>
</td>
-
+ <td name='sc_usr_summary_td'>
+ <span class='hide_me' name='sc_usr_summary_on'>&staff.server.admin.stat_cat.on;</span>
+ <span class='hide_me' name='sc_usr_summary'>&staff.server.admin.stat_cat.off;</span>
+ </td>
<td>
<select class='selector' name='sc_entries_selector'>
<option>&staff.server.admin.stat_cat.none;</option>
@@ -194,6 +198,9 @@
<input type='radio' name='sc_edit_opac_visibility'> </input>
</span>
</td>
+ <td name='sc_edit_usr_summary_td'>
+ <input type='checkbox' name='sc_edit_usr_summary'/>
+ </td>
<td colspan='4'>
<span class='padded'>
<input type='submit' value='&staff.server.admin.stat_cat.edit_submit;' name='sc_edit_submit'/>
More information about the open-ils-commits
mailing list