[open-ils-commits] r10817 -
trunk/Open-ILS/xul/staff_client/server/admin
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Oct 10 13:06:57 EDT 2008
Author: erickson
Date: 2008-10-10 13:06:54 -0400 (Fri, 10 Oct 2008)
New Revision: 10817
Modified:
trunk/Open-ILS/xul/staff_client/server/admin/copy_locations.js
trunk/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml
Log:
added hold-verify flag to copy editor. while i was in there, added checkmark/x (true/false) colored glyphs instead of yes vs. no for easier eyeballing
Modified: trunk/Open-ILS/xul/staff_client/server/admin/copy_locations.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/admin/copy_locations.js 2008-10-10 16:40:14 UTC (rev 10816)
+++ trunk/Open-ILS/xul/staff_client/server/admin/copy_locations.js 2008-10-10 17:06:54 UTC (rev 10817)
@@ -6,6 +6,8 @@
var YES;
var NO;
+var _TRUE;
+var _FALSE;
var locationSet;
var focusOrg;
@@ -23,6 +25,8 @@
$('user').appendChild(text(USER.usrname()));
YES = $('yes').innerHTML;
NO = $('no').innerHTML;
+ _TRUE = $('true');
+ _FALSE = $('false');
locationSet = [];
setTimeout(
@@ -78,8 +82,8 @@
return;
var selector = $('cl_new_owner');
var fselector = $('cl_org_filter');
- buildMergedOrgSel(selector, org_list, 0);
- buildMergedOrgSel(fselector, org_list, 0);
+ buildMergedOrgSel(selector, org_list, 0, 'shortname');
+ buildMergedOrgSel(fselector, org_list, 0, 'shortname');
var org = findOrgUnit(org_list[0]);
if(org_list.length > 1 || (org.children() && org.children()[0])) {
selector.disabled = false;
@@ -107,6 +111,7 @@
cl.name( $('cl_new_name').value );
cl.owning_lib( getSelectorVal( $('cl_new_owner')));
cl.holdable( ($('cl_new_hold_yes').checked) ? 1 : 0 );
+ cl.hold_verify( ($('cl_new_hold_verify_yes').checked) ? 1 : 0 );
cl.opac_visible( ($('cl_new_vis_yes').checked) ? 1 : 0 );
cl.circulate( ($('cl_new_circulate_yes').checked) ? 1 : 0 );
@@ -149,11 +154,13 @@
function clBuildRow( tbody, row, cl ) {
$n( row, 'cl_name').appendChild(text(cl.name()));
- $n( row, 'cl_owner').appendChild(text(findOrgUnit(cl.owning_lib()).name()));
- $n( row, 'cl_holdable').appendChild(text( (cl.holdable()) ? YES : NO ) );
- $n( row, 'cl_visible').appendChild(text( (cl.opac_visible()) ? YES : NO ) );
- $n( row, 'cl_circulate').appendChild(text( (cl.circulate()) ? YES : NO ) );
+ $n( row, 'cl_owner').appendChild(text(findOrgUnit(cl.owning_lib()).shortname()));
+ appendClear($n( row, 'cl_holdable'), (isTrue(cl.holdable())) ? _TRUE.cloneNode(true) : _FALSE.cloneNode(true) );
+ appendClear($n( row, 'cl_hold_verify'), (isTrue(cl.hold_verify())) ? _TRUE.cloneNode(true) : _FALSE.cloneNode(true) );
+ appendClear($n( row, 'cl_visible'), (isTrue(cl.opac_visible())) ? _TRUE.cloneNode(true) : _FALSE.cloneNode(true) );
+ appendClear($n( row, 'cl_circulate'), (isTrue(cl.circulate())) ? _TRUE.cloneNode(true) : _FALSE.cloneNode(true) );
+
var edit = $n( row, 'cl_edit');
edit.onclick = function() { clEdit( cl, tbody, row ); };
checkPermOrgDisabled(edit, cl.owning_lib(), 'UPDATE_COPY_LOCATION');
@@ -173,15 +180,17 @@
name.setAttribute('size', cl.name().length + 3);
name.value = cl.name();
- $n(r, 'cl_edit_owner').appendChild(text(findOrgUnit(cl.owning_lib()).name()));
+ $n(r, 'cl_edit_owner').appendChild(text(findOrgUnit(cl.owning_lib()).shortname()));
var arr = _clOptions(r);
- if(cl.holdable()) arr[0].checked = true;
+ if(isTrue(cl.holdable())) arr[0].checked = true;
else arr[1].checked = true;
- if(cl.opac_visible()) arr[2].checked = true;
+ if(isTrue(cl.opac_visible())) arr[2].checked = true;
else arr[3].checked = true;
- if(cl.circulate()) arr[4].checked = true;
+ if(isTrue(cl.circulate())) arr[4].checked = true;
else arr[5].checked = true;
+ if(isTrue(cl.hold_verify())) arr[6].checked = true;
+ else arr[7].checked = true;
$n(r, 'cl_edit_cancel').onclick = function(){cleanTbody(tbody,'edit');}
$n(r, 'cl_edit_commit').onclick = function(){clEditCommit( tbody, r, cl ); }
@@ -199,6 +208,8 @@
arr[3] = $n( $n(r,'cl_edit_visible_no'), 'cl_edit_visible');
arr[4] = $n( $n(r,'cl_edit_circulate_yes'), 'cl_edit_circulate');
arr[5] = $n( $n(r,'cl_edit_circulate_no'), 'cl_edit_circulate');
+ arr[6] = $n( $n(r,'cl_edit_hold_verify_yes'), 'cl_edit_hold_verify');
+ arr[7] = $n( $n(r,'cl_edit_hold_verify_no'), 'cl_edit_hold_verify');
return arr;
}
@@ -211,6 +222,8 @@
else cl.opac_visible(0);
if(arr[4].checked) cl.circulate(1);
else cl.circulate(0);
+ if(arr[6].checked) cl.hold_verify(1);
+ else cl.hold_verify(0);
cl.name($n(r, 'cl_edit_name').value);
var req = new Request( UPDATE_CL, SESSION, cl );
Modified: trunk/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml 2008-10-10 16:40:14 UTC (rev 10816)
+++ trunk/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml 2008-10-10 17:06:54 UTC (rev 10817)
@@ -78,12 +78,22 @@
</td>
</tr>
<tr>
+ <td>&staff.server.admin.copy_locations.editor.hold_verify.label;</td>
+ <td>
+ <span>&staff.server.admin.copy_locations.editor.yes;</span>
+ <input type='radio' name='cl_new_hold' id='cl_new_hold_verify_yes'/>
+ <span>&staff.server.admin.copy_locations.editor.no;</span>
+ <input type='radio' name='cl_new_hold_verify'
+ id='cl_new_hold_verify_no' checked='checked'> </input>
+ </td>
<td>&staff.server.admin.copy_locations.editor.library;</td>
- <td colspan='2' >
+ <td>
<select id='cl_new_owner' disabled='disabled' style='width:auto;'> </select>
</td>
- <td><input id='sc_new_submit' type='submit' value='Create' disabled='disabled'/></td>
</tr>
+ <tr>
+ <td colspan='4'><input id='sc_new_submit' type='submit' value='Create' disabled='disabled'/></td>
+ </tr>
</tbody>
</table>
@@ -96,16 +106,14 @@
<table class='data_grid data_grid_center' style='width: 95%'>
<thead>
<tr>
- <td width='15%'>&staff.server.admin.copy_locations.editor.name;</td>
- <td width='20%'>&staff.server.admin.copy_locations.editor.library;</td>
- <td width='15%'>
- <span>&staff.server.admin.copy_locations.editor.holdable;</span>
- <a class='context_help' href='javascript:clHoldMsg();'></a>
- </td>
- <td width='15%'>&staff.server.admin.copy_locations.editor.opac_visible;</td>
- <td width='15%'>&staff.server.admin.copy_locations.editor.circulate;</td>
- <td width='10%'>&staff.server.admin.copy_locations.editor.edit;</td>
- <td width='10%'>&staff.server.admin.copy_locations.editor.delete;</td>
+ <td width=''>&staff.server.admin.copy_locations.editor.name;</td>
+ <td width=''>&staff.server.admin.copy_locations.editor.library;</td>
+ <td width=''>&staff.server.admin.copy_locations.editor.holdable;</td>
+ <td width=''>&staff.server.admin.copy_locations.editor.hold_verify;</td>
+ <td width=''>&staff.server.admin.copy_locations.editor.opac_visible;</td>
+ <td width=''>&staff.server.admin.copy_locations.editor.circulate;</td>
+ <td width=''>&staff.server.admin.copy_locations.editor.edit;</td>
+ <td width=''>&staff.server.admin.copy_locations.editor.delete;</td>
</tr>
</thead>
<tbody id='cl_tbody'>
@@ -113,6 +121,7 @@
<td name='cl_name'> </td>
<td name='cl_owner'> </td>
<td name='cl_holdable'> </td>
+ <td name='cl_hold_verify'> </td>
<td name='cl_visible'> </td>
<td name='cl_circulate'> </td>
<td><input type='submit' value='Edit' name='cl_edit' disabled='disabled'> </input></td>
@@ -123,6 +132,8 @@
</center>
<div class='hide_me'>
+ <span id='true' style='color:green;'>✓</span>
+ <span id='false' style='color:red;'>✗</span>
<span id='yes'>&staff.server.admin.copy_locations.editor.yes;</span>
<span id='no'>&staff.server.admin.copy_locations.editor.no;</span>
<span id='cl_hold_msg'>
@@ -148,6 +159,16 @@
</td>
<td>
<span>&staff.server.admin.copy_locations.editor.yes;</span>
+ <span name='cl_edit_hold_verify_yes'>
+ <input type='radio' name='cl_edit_hold_verify'/>
+ </span>
+ <span>&staff.server.admin.copy_locations.editor.no;</span>
+ <span name='cl_edit_hold_verify_no'>
+ <input type='radio' name='cl_edit_hold_verify'/>
+ </span>
+ </td>
+ <td>
+ <span>&staff.server.admin.copy_locations.editor.yes;</span>
<span name='cl_edit_visible_yes'>
<input type='radio' name='cl_edit_visible'/>
</span>
More information about the open-ils-commits
mailing list