]> git.evergreen-ils.org Git - working/Evergreen.git/commit
Support custom URL mangling in openils.CGI JS lib
authorBill Erickson <berick@esilibrary.com>
Fri, 13 Jul 2012 15:49:00 +0000 (11:49 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 24 Jul 2012 16:46:00 +0000 (12:46 -0400)
commitc108746532548fd8d3fadd15736375a57208d485
tree573af7ac86faa738c4aad523cc1448e9300a0694
parent0438399769af9d9747a0185a8ae73a3cc944c00d
Support custom URL mangling in openils.CGI JS lib

Adds a new optoinal parameter to the openils.CGI constructor called
'args', which currently supports 'url' and 'query' fields.  If the URL
is provided, CGI uses the value from args.url instead of location.href
and location.search.  Additionally, if 'query' is provided, it's used
instead of location.search and takes precedence over any query in
args.url;

It's also now possible to set parameter values.  By default, setting a
value overwrites the full array of values from multi-value params.  You
can use the 'push' argument to push the value onto the list instead of
clobbering it.

There are two new methods, queryString() and url().  The first returns
the query string, the second the full URL with uri-escaped query string
included.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/web/js/dojo/openils/CGI.js