From 809a38e02559680995ababced8cc5663f04e803e Mon Sep 17 00:00:00 2001 From: berick Date: Fri, 25 Mar 2011 11:53:52 -0400 Subject: [PATCH] update search depth to match the selected org unit instead of always searching globally --- Open-ILS/web/opac/skin/kcls/js/depth_selector.js | 1 + Open-ILS/web/opac/skin/kcls/js/search_bar.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/opac/skin/kcls/js/depth_selector.js b/Open-ILS/web/opac/skin/kcls/js/depth_selector.js index 83031bd812..46b29cada9 100644 --- a/Open-ILS/web/opac/skin/kcls/js/depth_selector.js +++ b/Open-ILS/web/opac/skin/kcls/js/depth_selector.js @@ -49,6 +49,7 @@ function depthSelGetDepth() { function depthSelectorChanged() { if(!_ds) return; _newlocation = _ds.options[_ds.selectedIndex].value; + newSearchDepth = findOrgDepth(_newlocation); } var chooseAnotherNode; diff --git a/Open-ILS/web/opac/skin/kcls/js/search_bar.js b/Open-ILS/web/opac/skin/kcls/js/search_bar.js index af36f2d93d..428e634544 100644 --- a/Open-ILS/web/opac/skin/kcls/js/search_bar.js +++ b/Open-ILS/web/opac/skin/kcls/js/search_bar.js @@ -70,8 +70,8 @@ function searchBarSubmit(isFilterSort) { var facet_text = isFrontPage ? '' : G.ui.searchbar.facets.value; clearSearchParams(); if(!text || text == "" || text == "Search Keyword") return; - //var d = (newSearchDepth != null) ? newSearchDepth : depthSelGetDepth(); - var d = getDepth(); + var d = (newSearchDepth != null) ? newSearchDepth : depthSelGetDepth(); + //var d = getDepth(); if(isNaN(d)) d = 0; var args = {}; -- 2.11.0