/* 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();
function searchBarSubmit(isFilterSort) {
var text = G.ui.searchbar.text.value;
+ var facet_text = isFrontPage ? '' : G.ui.searchbar.facets.value;
clearSearchParams();
var args = {};
- if(SHOW_MR_DEFAULT || (isFilterSort && findCurrentPage() == MRESULT)) {
+ if(SHOW_MR_DEFAULT || findCurrentPage() == MRESULT) {
args.page = MRESULT;
} else {
args.page = RRESULT;
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;
args[PARAM_BIBLEVEL] = 's';
}
-
if($('opac.result.limit2avail')) {
args[PARAM_AVAIL] = ($('opac.result.limit2avail').checked) ? 1 : '';
if( (val = getSelectorVal($('opac.result.sort'))) ) {