update search depth to match the selected org unit instead of always searching globally
authorberick <berick@esilibrary.com>
Fri, 25 Mar 2011 15:53:52 +0000 (11:53 -0400)
committerberick <berick@esilibrary.com>
Fri, 25 Mar 2011 15:53:52 +0000 (11:53 -0400)
Open-ILS/web/opac/skin/kcls/js/depth_selector.js
Open-ILS/web/opac/skin/kcls/js/search_bar.js

index 83031bd..46b29ca 100644 (file)
@@ -49,6 +49,7 @@ function depthSelGetDepth() {
 function depthSelectorChanged() {
        if(!_ds) return;
        _newlocation = _ds.options[_ds.selectedIndex].value;
+    newSearchDepth = findOrgDepth(_newlocation);
 }
 
 var chooseAnotherNode;
index af36f2d..428e634 100644 (file)
@@ -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 = {};