From b6edc9dec33b36af79dfe209851b8795c0cf5e76 Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 3 Nov 2008 19:14:43 +0000 Subject: [PATCH] backport hold verify setting UI git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@11044 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../staff_client/server/admin/copy_locations.js | 29 ++++++++++----- .../staff_client/server/admin/copy_locations.xhtml | 42 +++++++++++++++++----- 2 files changed, 54 insertions(+), 17 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/admin/copy_locations.js b/Open-ILS/xul/staff_client/server/admin/copy_locations.js index 0516e008b5..df2a89c55e 100644 --- a/Open-ILS/xul/staff_client/server/admin/copy_locations.js +++ b/Open-ILS/xul/staff_client/server/admin/copy_locations.js @@ -6,6 +6,8 @@ var DELETE_CL = 'open-ils.circ:open-ils.circ.copy_location.delete'; var YES; var NO; +var _TRUE; +var _FALSE; var myPerms = [ 'CREATE_COPY_LOCATION', @@ -21,6 +23,8 @@ function clEditorInit() { $('user').appendChild(text(USER.usrname())); YES = $('yes').innerHTML; NO = $('no').innerHTML; + _TRUE = $('true'); + _FALSE = $('false'); setTimeout( function() { @@ -61,6 +65,7 @@ function clCreateNew() { 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 ); @@ -102,10 +107,12 @@ function clDraw(r) { 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 ); }; @@ -126,15 +133,17 @@ function clEdit( cl, tbody, row ) { 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 ); } @@ -152,6 +161,8 @@ function _clOptions(r) { 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; } @@ -164,6 +175,8 @@ function clEditCommit( tbody, r, cl ) { 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 ); diff --git a/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml b/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml index 133c995efc..80570ca10a 100644 --- a/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml +++ b/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml @@ -71,12 +71,22 @@ + Hold Verify + + Yes + + No + + Owning Library: - + - + + + @@ -86,16 +96,17 @@ - - - + + - - - - + + + + + @@ -103,6 +114,7 @@ + @@ -115,6 +127,8 @@
Yes No + + If a copy location is "Holdable", copies in that location may have holds placed on them. @@ -139,6 +153,16 @@
+
NameOwning Library + NameOwning Library Holdable ?? OPAC VisibleCirculateEditDeleteHold VerifyOPAC VisibleCirculateEditDelete
Yes + + + + No + + + + + Yes -- 2.11.0