read format value from selector on page load in addition to onchange, since the brows...
authorberick <berick@esilibrary.com>
Thu, 24 Mar 2011 20:21:52 +0000 (16:21 -0400)
committerberick <berick@esilibrary.com>
Thu, 24 Mar 2011 20:21:52 +0000 (16:21 -0400)
Open-ILS/web/opac/skin/kcls/js/search_bar.js

index 61f136e..af36f2d 100644 (file)
@@ -27,6 +27,14 @@ function searchBarInit() {
                G.ui.searchbar.facets.value = val==''?'':"identifier|mattype["+val+"]";
        };
 
+    setTimeout(
+        function() {
+            var format = getSelectorVal(G.ui.searchbar.form_selector);
+            if(format != '') 
+                G.ui.searchbar.facets.value = "identifier|mattype["+format+"]";
+        },0
+    );
+
        /* set up the selector objects, etc */
        var txtVal = (getTerm() != null) ? getTerm() : "";
        if(getStype()=="cn") txtVal = txtVal.replace(/identifier\|bibcn:/, "");