From: Mike Rylander Date: Wed, 22 Apr 2015 21:55:25 +0000 (-0400) Subject: LP#1346381: Allow copy location filters above branches X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=99661230deadd16791634370ed1b7ccece843b9c;p=working%2FEvergreen.git LP#1346381: Allow copy location filters above branches The TPAC, inheriting functionality from the JSPAC, restricted the copy locations one could filter on in the advanced search screen. For installations that have many shared copy locations at the (stock-speak) System level and just a few Branch level special locations, this is sub-optimal. This commit allows the display of System-and-above copy locations for filtering, but excludes Branch-level locations in order to avoid the heretofore protected-against location list explosion. Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/web/js/ui/default/opac/copyloc.js b/Open-ILS/web/js/ui/default/opac/copyloc.js index ddd1a5cf4f..ade6f3beca 100644 --- a/Open-ILS/web/js/ui/default/opac/copyloc.js +++ b/Open-ILS/web/js/ui/default/opac/copyloc.js @@ -10,11 +10,6 @@ function apply_adv_copy_locations() { var selected_id = sel.options[sel.selectedIndex].getAttribute('value'); var org_unit = aou_hash[selected_id]; - if (org_unit.can_have_vols != 't') { - dojo.addClass('adv_chunk_copy_location', 'hidden'); - return; - } - var display_orgs = []; // we want to display copy locations at the selected org, @@ -34,7 +29,9 @@ function apply_adv_copy_locations() { collect_parent_orgs(aou_hash[org_id].parent_ou); } - collect_child_orgs(org_unit.id); + // If the select org unit cannot have copies + // don't show any child org locations. + if (org_unit.can_have_vols == 't') collect_child_orgs(org_unit.id); collect_parent_orgs(org_unit.parent_ou); fetch_adv_copy_locations(display_orgs); }