var PARAM_RDEPTH = 'rd';
var PARAM_REDIR = 're'; /* true if we have been redirected by IP (we're at a real lib) */
var PARAM_AVAIL = 'av'; /* limit search results to available items */
+var PARAM_COPYLOCS = 'cl'; // copy (shelving) locations
/* URL param values (see comments above) */
var TERM;
var TFORM;
var RDEPTH;
var AVAIL;
+var COPYLOCS;
/* cookie values */
var SBEXTRAS;
TFORM = cgi.param(PARAM_TFORM);
RDEPTH = cgi.param(PARAM_RDEPTH);
AVAIL = cgi.param(PARAM_AVAIL);
+ COPYLOCS = cgi.param(PARAM_COPYLOCS);
+
/* set up some sane defaults */
//if(isNaN(DEPTH)) DEPTH = 0;
LANGUAGE = null;
RDEPTH = null;
AVAIL = null;
+ COPYLOCS = null;
}
function getLanguage() { return LANGUAGE; }
function getRdepth() { return RDEPTH; }
function getAvail() { return AVAIL; }
+function getCopyLocs() { return COPYLOCS; }
function findBasePath() {
string += _appendParam(SORT_DIR, PARAM_SORT_DIR, args, getSortDir, string);
if(getAvail())
string += _appendParam(AVAIL, PARAM_AVAIL, args, getAvail, string);
+ if(getCopyLocs())
+ string += _appendParam(COPYLOCS, PARAM_COPYLOCS, args, getCopyLocs, string);
return string.replace(/\&$/,'').replace(/\?\&/,"?");
}
if(getLitForm()) args.lit_form = getLitForm().split(/,/);
if(getLanguage()) args.language = getLanguage().split(/,/);
if(getBibLevel()) args.bib_level = getBibLevel().split(/,/);
+ if(getCopyLocs()) args.locations = getCopyLocs().split(/,/);
_debug('Search args: ' + js2JSON(args));
_debug('Raw query: ' + getTerm());