[open-ils-commits] r9868 - in trunk/Open-ILS/web/opac: common/js
skin/default/js
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jun 19 09:31:29 EDT 2008
Author: erickson
Date: 2008-06-19 09:31:28 -0400 (Thu, 19 Jun 2008)
New Revision: 9868
Modified:
trunk/Open-ILS/web/opac/common/js/config.js
trunk/Open-ILS/web/opac/common/js/opac_utils.js
trunk/Open-ILS/web/opac/skin/default/js/result_common.js
Log:
plugging in copy location search param logic
Modified: trunk/Open-ILS/web/opac/common/js/config.js
===================================================================
--- trunk/Open-ILS/web/opac/common/js/config.js 2008-06-19 13:10:56 UTC (rev 9867)
+++ trunk/Open-ILS/web/opac/common/js/config.js 2008-06-19 13:31:28 UTC (rev 9868)
@@ -38,6 +38,7 @@
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;
@@ -73,6 +74,7 @@
var TFORM;
var RDEPTH;
var AVAIL;
+var COPYLOCS;
/* cookie values */
var SBEXTRAS;
Modified: trunk/Open-ILS/web/opac/common/js/opac_utils.js
===================================================================
--- trunk/Open-ILS/web/opac/common/js/opac_utils.js 2008-06-19 13:10:56 UTC (rev 9867)
+++ trunk/Open-ILS/web/opac/common/js/opac_utils.js 2008-06-19 13:31:28 UTC (rev 9868)
@@ -166,6 +166,8 @@
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;
@@ -205,6 +207,7 @@
LANGUAGE = null;
RDEPTH = null;
AVAIL = null;
+ COPYLOCS = null;
}
@@ -254,6 +257,7 @@
function getLanguage() { return LANGUAGE; }
function getRdepth() { return RDEPTH; }
function getAvail() { return AVAIL; }
+function getCopyLocs() { return COPYLOCS; }
function findBasePath() {
@@ -406,6 +410,8 @@
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(/\?\&/,"?");
}
Modified: trunk/Open-ILS/web/opac/skin/default/js/result_common.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/result_common.js 2008-06-19 13:10:56 UTC (rev 9867)
+++ trunk/Open-ILS/web/opac/skin/default/js/result_common.js 2008-06-19 13:31:28 UTC (rev 9868)
@@ -85,6 +85,7 @@
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());
More information about the open-ils-commits
mailing list