From 78541a053d9cac7c0b51de7081a0427f696455b6 Mon Sep 17 00:00:00 2001 From: berick Date: Fri, 25 Mar 2011 12:03:38 -0400 Subject: [PATCH] more search depth fixes --- Open-ILS/web/opac/skin/kcls/js/depth_selector.js | 8 +++++++- Open-ILS/web/opac/skin/kcls/js/search_bar.js | 2 +- 2 files changed, 8 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 46b29cada9..51a22fdc9b 100644 --- a/Open-ILS/web/opac/skin/kcls/js/depth_selector.js +++ b/Open-ILS/web/opac/skin/kcls/js/depth_selector.js @@ -46,10 +46,16 @@ function depthSelGetDepth() { return depth; } +function getSearchDepth() { + org = _ds.options[_ds.selectedIndex].value + newSearchDepth = findOrgDepth(org); + return newSearchDepth; +} + function depthSelectorChanged() { if(!_ds) return; _newlocation = _ds.options[_ds.selectedIndex].value; - newSearchDepth = findOrgDepth(_newlocation); + newSearchDepth = getSearchDepth(); } 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 428e634544..a4ba7c21bb 100644 --- a/Open-ILS/web/opac/skin/kcls/js/search_bar.js +++ b/Open-ILS/web/opac/skin/kcls/js/search_bar.js @@ -70,7 +70,7 @@ 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 = (newSearchDepth != null) ? newSearchDepth : getSearchDepth(); //var d = getDepth(); if(isNaN(d)) d = 0; var args = {}; -- 2.11.0