From 187af30f6dd217af0e42a21abf13fdfc4f388867 Mon Sep 17 00:00:00 2001 From: dbs Date: Fri, 15 Apr 2011 03:36:45 +0000 Subject: [PATCH] Restore journal title search to LU skin git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/branches/rel_2_0@1364 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- web/opac/skin/lul/js/search_bar.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/web/opac/skin/lul/js/search_bar.js b/web/opac/skin/lul/js/search_bar.js index 67369f3425..a8ebca1615 100644 --- a/web/opac/skin/lul/js/search_bar.js +++ b/web/opac/skin/lul/js/search_bar.js @@ -31,13 +31,14 @@ function searchBarInit() { /* 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 searchBarInit() { function searchBarSubmit(isFilterSort) { var text = G.ui.searchbar.text.value; + var facet_text = isFrontPage ? '' : G.ui.searchbar.facets.value; clearSearchParams(); @@ -66,7 +68,7 @@ function searchBarSubmit(isFilterSort) { 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 @@ function searchBarSubmit(isFilterSort) { 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 @@ function searchBarSubmit(isFilterSort) { args[PARAM_BIBLEVEL] = 's'; } - if($('opac.result.limit2avail')) { args[PARAM_AVAIL] = ($('opac.result.limit2avail').checked) ? 1 : ''; if( (val = getSelectorVal($('opac.result.sort'))) ) { -- 2.11.0