more search depth fixes
authorberick <berick@esilibrary.com>
Fri, 25 Mar 2011 16:03:38 +0000 (12:03 -0400)
committerberick <berick@esilibrary.com>
Fri, 25 Mar 2011 16:03:38 +0000 (12:03 -0400)
Open-ILS/web/opac/skin/kcls/js/depth_selector.js
Open-ILS/web/opac/skin/kcls/js/search_bar.js

index 46b29ca..51a22fd 100644 (file)
@@ -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;
index 428e634..a4ba7c2 100644 (file)
@@ -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 = {};