[open-ils-commits] r1364 - conifer/branches/rel_2_0/web/opac/skin/lul/js (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Apr 14 23:36:48 EDT 2011


Author: dbs
Date: 2011-04-14 23:36:45 -0400 (Thu, 14 Apr 2011)
New Revision: 1364

Modified:
   conifer/branches/rel_2_0/web/opac/skin/lul/js/search_bar.js
Log:
Restore journal title search to LU skin


Modified: conifer/branches/rel_2_0/web/opac/skin/lul/js/search_bar.js
===================================================================
--- conifer/branches/rel_2_0/web/opac/skin/lul/js/search_bar.js	2011-04-15 03:29:17 UTC (rev 1363)
+++ conifer/branches/rel_2_0/web/opac/skin/lul/js/search_bar.js	2011-04-15 03:36:45 UTC (rev 1364)
@@ -31,13 +31,14 @@
 
 	/* set up the selector objects, etc */
 	G.ui.searchbar.text.value = (getTerm() != null) ? getTerm() : "";
+	if (!isFrontPage) G.ui.searchbar.facets.value = (getFacet() != null) ? getFacet() : "";
 	setSelector(_ts,	getStype());
 	setSelector(_fs,	getForm());
 
-    /* If searching for journal title, set it to journal title */
-    if (getStype() == 'title' && getBibLevel() == 's') {
-        dojo.byId('jtitle').selected = true;
-    }
+	/* If searching for journal title, set it to journal title */
+	if (getStype() == 'title' && getBibLevel() == 's') {
+		dojo.byId('jtitle').selected = true;
+	}
 
 	depthSelInit();
 
@@ -56,6 +57,7 @@
 function searchBarSubmit(isFilterSort) {
 
 	var text = G.ui.searchbar.text.value;
+	var facet_text = isFrontPage ? '' : G.ui.searchbar.facets.value;
 
 	clearSearchParams();
 
@@ -66,7 +68,7 @@
 
 	var args = {};
 
-	if(SHOW_MR_DEFAULT || (isFilterSort && findCurrentPage() == MRESULT)) {
+	if(SHOW_MR_DEFAULT || findCurrentPage() == MRESULT) {
 		args.page				= MRESULT;
 	} else {
 		args.page				= RRESULT;
@@ -75,6 +77,7 @@
 
 	args[PARAM_STYPE]		= _ts.options[_ts.selectedIndex].value;
 	args[PARAM_TERM]		= text;
+	args[PARAM_FACET]		= facet_text;
 	args[PARAM_LOCATION] = depthSelGetNewLoc();
 	args[PARAM_DEPTH]		= d;
 	args[PARAM_FORM]		= _fs.options[_fs.selectedIndex].value;
@@ -84,7 +87,6 @@
         args[PARAM_BIBLEVEL] = 's';
     }
 
-
     if($('opac.result.limit2avail')) {
         args[PARAM_AVAIL] = ($('opac.result.limit2avail').checked) ? 1 : '';
         if( (val = getSelectorVal($('opac.result.sort'))) ) {



More information about the open-ils-commits mailing list