From 99661230deadd16791634370ed1b7ccece843b9c Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Wed, 22 Apr 2015 17:55:25 -0400 Subject: [PATCH] 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 --- Open-ILS/web/js/ui/default/opac/copyloc.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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); } -- 2.11.0