fix library/depth selector in advanced search
authorberick <berick@esilibrary.com>
Tue, 29 Mar 2011 18:24:51 +0000 (14:24 -0400)
committerberick <berick@esilibrary.com>
Tue, 29 Mar 2011 18:24:51 +0000 (14:24 -0400)
Open-ILS/web/opac/skin/kcls/js/adv_global.js
Open-ILS/web/opac/skin/kcls/js/depth_selector.js

index 99fcdd9..35c0bc7 100644 (file)
@@ -228,7 +228,7 @@ function advSubmitGlobal() {
        clearSearchParams();
        
        var depth = depthSelGetDepth();
-       if(depth==1) depth = 0;
+       //if(depth==1) depth = 0;
        var args = {};
        args.page = MRESULT;
        args[PARAM_ITEMFORM] = itemforms;
index 51a22fd..3cc1878 100644 (file)
@@ -41,9 +41,10 @@ function _opacHandleLocationTagClick() {
 }
 
 function depthSelGetDepth() {
-       var depth = parseInt(_ds.options[_ds.selectedIndex].value);
-       if(isNaN(depth)) depth = 0;
-       return depth;
+    // FOR KCLS, depth_select == library selector
+       var org = parseInt(_ds.options[_ds.selectedIndex].value);
+       if(isNaN(org)) return 0;
+    return findOrgDepth(org) || 0;
 }
 
 function getSearchDepth() {