<!-- The OpenSRF API writ JS -->
<script language='javascript' src='/opac/common/js/utils.js' type='text/javascript'></script>
- <script language='javascript' src='/opac/common/js/Cookies.js' type='text/javascript'></script>
<script language='javascript' src='/opac/common/js/CGI.js' type='text/javascript'></script>
<script language='javascript' src='/opac/common/js/JSON_v1.js' type='text/javascript'></script>
dojo.require('openils.widget.TranslatorPopup');
dojo.require('openils.PermaCrud');
dojo.require('dojo.parser');
+dojo.require('dojo.cookie');
dojo.require('dojo.data.ItemFileWriteStore');
dojo.require('dojo.date.stamp');
dojo.require('dijit.form.TextBox');
// some handy globals
var cgi = new CGI();
-var cookieManager = new HTTP.Cookies();
-var ses = cookieManager.read('ses') || cgi.param('ses');
+var ses = dojo.cookie('ses') || cgi.param('ses');
var pcrud = new openils.PermaCrud({ authtoken : ses });
var current_ou, current_ou_hoo, ou_list_store;
<!-- The OpenSRF API writ JS -->
<script language='javascript' src='/opac/common/js/utils.js' type='text/javascript'></script>
- <script language='javascript' src='/opac/common/js/Cookies.js' type='text/javascript'></script>
<script language='javascript' src='/opac/common/js/CGI.js' type='text/javascript'></script>
<script language='javascript' src='/opac/common/js/JSON_v1.js' type='text/javascript'></script>
dojo.require('openils.widget.TranslatorPopup');
dojo.require('openils.PermaCrud');
dojo.require('dojo.parser');
+dojo.require('dojo.cookie');
dojo.require('dojo.data.ItemFileWriteStore');
dojo.require('dojo.date.stamp');
dojo.require('dijit.form.NumberSpinner');
// some handy globals
var cgi = new CGI();
-var cookieManager = new HTTP.Cookies();
-var ses = cookieManager.read('ses') || cgi.param('ses');
+var ses = dojo.cookie('ses') || cgi.param('ses');
var pCRUD = new openils.PermaCrud({authtoken:ses});
var current_type;
<!-- The OpenSRF API writ JS -->
<script language='javascript' src='/opac/common/js/utils.js' type='text/javascript'></script>
- <script language='javascript' src='/opac/common/js/Cookies.js' type='text/javascript'></script>
<script language='javascript' src='/opac/common/js/CGI.js' type='text/javascript'></script>
<script language='javascript' src='/opac/common/js/JSON_v1.js' type='text/javascript'></script>
dojo.require('dojo.parser');
dojo.require('dojo.string');
dojo.require('dojo.data.ItemFileWriteStore');
+dojo.require('dojo.cookie');
dojo.require('dijit.form.TextBox');
dojo.require('dijit.form.ValidationTextBox');
dojo.require('dijit.form.Textarea');
// some handy globals
var cgi = new CGI();
-var cookieManager = new HTTP.Cookies();
-var ses = cookieManager.read('ses') || cgi.param('ses');
+var ses = dojo.cookie('ses') || cgi.param('ses');
var pCRUD = new openils.PermaCrud({authtoken:ses});
var current_status;
<!-- The OpenSRF API writ JS -->
<script language='javascript' src='/opac/common/js/utils.js' type='text/javascript'></script>
- <script language='javascript' src='/opac/common/js/Cookies.js' type='text/javascript'></script>
<script language='javascript' src='/opac/common/js/CGI.js' type='text/javascript'></script>
<script language='javascript' src='/opac/common/js/JSON_v1.js' type='text/javascript'></script>
<!-- The OpenSRF API writ JS -->
<script language='javascript' src='/opac/common/js/utils.js' type='text/javascript'></script>
- <script language='javascript' src='/opac/common/js/Cookies.js' type='text/javascript'></script>
<script language='javascript' src='/opac/common/js/CGI.js' type='text/javascript'></script>
<script language='javascript' src='/opac/common/js/JSON_v1.js' type='text/javascript'></script>
dojo.require('dojo.parser');
dojo.require('dojo.data.ItemFileWriteStore');
dojo.require('dojo.date.stamp');
+dojo.require('dojo.cookie');
dojo.require('dijit.form.NumberSpinner');
dojo.require('dijit.form.TextBox');
dojo.require('dijit.form.TimeTextBox');
// some handy globals
var cgi = new CGI();
-var cookieManager = new HTTP.Cookies();
-var ses = cookieManager.read('ses') || cgi.param('ses');
+var ses = dojo.cookie('ses') || cgi.param('ses');
var server = {};
server.pcrud = new openils.PermaCrud({ authtoken : ses });
server.actor = new OpenSRF.ClientSession('open-ils.actor');
<!-- The OpenSRF API writ JS -->
<script language='javascript' src='/opac/common/js/utils.js' type='text/javascript'></script>
- <script language='javascript' src='/opac/common/js/Cookies.js' type='text/javascript'></script>
<script language='javascript' src='/opac/common/js/CGI.js' type='text/javascript'></script>
<script language='javascript' src='/opac/common/js/JSON_v1.js' type='text/javascript'></script>
dojo.require('openils.PermaCrud');
dojo.require('dojo.parser');
dojo.require('dojo.string');
+dojo.require('dojo.cookie');
dojo.require('dojo.data.ItemFileWriteStore');
dojo.require('dijit.form.TextBox');
dojo.require('dijit.form.ValidationTextBox');
// some handy globals
var cgi = new CGI();
-var cookieManager = new HTTP.Cookies();
-var ses = cookieManager.read('ses') || cgi.param('ses');
+var ses = dojo.cookie('ses') || cgi.param('ses');
var pCRUD = new openils.PermaCrud({authtoken : ses});
var ppl_strings = dojo.i18n.getLocalization('openils.conify', 'conify');
if(!authtoken) {
- dojo.cookie('ses', openils.User.authtoken, {expires:-1, path:'/'}); // remove the cookie
- dojo.cookie('ses', openils.User.authtoken, {expires:-1, path:oilsBasePath}); // remove the cookie
+ dojo.cookie('ses', null, {expires:-1, path:'/'}); // remove the cookie
+ dojo.cookie('ses', null, {expires:-1, path:oilsBasePath}); // remove the cookie
dojo.addOnLoad(function(){
if(openils.XUL.isXUL()) {
try {
var auth;
- try { auth = cookieManager.read(COOKIE_SES) } catch(ee) {}
+ try { dojo.require('dojo.cookie'); auth = dojo.cookie(COOKIE_SES) } catch(ee) {}
if( isXUL() ) auth = fetchXULStash().session.key;
if( auth )
this.xmlhttp.setRequestHeader('X-OILS-Authtoken', auth);
function isXUL() { try { if(IAMXUL) return true;}catch(e){return false;}; }
-var cookieManager = new HTTP.Cookies();
-
var __ilsEvent; /* the last event the occurred */
var DEBUGSLIM;
function initCookies() {
+ dojo.require('dojo.cookie');
FONTSIZE = "regular";
- var font = cookieManager.read(COOKIE_FONT);
+ var font = dojo.cookie(COOKIE_FONT);
scaleFonts(font);
if(font) FONTSIZE = font;
- SKIN = cookieManager.read(COOKIE_SKIN);
+ SKIN = dojo.cookie(COOKIE_SKIN);
if(findCurrentPage() == HOME)
- cookieManager.remove(COOKIE_SEARCH);
+ dojo.cookie(COOKIE_SEARCH,null,{'expires':-1});
}
/* URL param accessors */
}
function setSessionCookie(ses) {
- cookieManager.write(COOKIE_SES, ses, -1);
+ dojo.cookie(COOKIE_SES, ses);
}
}
if(!ses) {
- ses = cookieManager.read(COOKIE_SES);
+ ses = dojo.cookie(COOKIE_SES);
/* https cookies don't show up in http servers.. */
_debug("cookie auth token = " + ses);
}
G.user = req.result();
if(!G.user || G.user.length == 0) {
+ dojo.cookie(COOKIE_SES,null,{'expires':-1});
G.user = null; return false;
- cookieManager.write(COOKIE_SES,"");
}
G.user.session = ses;
if(grabUser()) {
if(grabUserPrefs()) {
user_skin = G.user.prefs["opac.skin"];
- cookieManager.write( COOKIE_SKIN, user_skin, '+1y' );
+ dojo.cookie( COOKIE_SKIN, user_skin, { 'expires' : 365 } );
}
}
}
/* remove any cached data */
dojo.require('dojo.cookie');
- dojo.cookie(COOKIE_SES, '', {expires:-1});
- dojo.cookie(COOKIE_RIDS, '', {expires:-1});
- dojo.cookie(COOKIE_SKIN, '', {expires:-1});
- dojo.cookie(COOKIE_SEARCH, '', {expires:-1});
+ dojo.cookie(COOKIE_SES, null, {expires:-1});
+ dojo.cookie(COOKIE_RIDS, null, {expires:-1});
+ dojo.cookie(COOKIE_SKIN, null, {expires:-1});
+ dojo.cookie(COOKIE_SEARCH, null, {expires:-1});
checkUserSkin("default");
function setFontSize(size) {
scaleFonts(size);
- cookieManager.write(COOKIE_FONT, size, '+1y');
+ dojo.cookie(COOKIE_FONT, size, { 'expires' : 365});
}
var resourceFormats = [
<script language='javascript' src='/opac/common/js/utils.js'> </script>
<script language='javascript' src='/opac/common/js//config.js'> </script>
<script language='javascript' src='/opac/common/js/CGI.js'> </script>
- <script language='javascript' src='/opac/common/js/Cookies.js'> </script>
<script language='javascript' src='/opac/common/js/slimtree.js'> </script>
<script language='javascript' src='/opac/common/js/JSON_v1.js'> </script>
</style>
<!-- The OpenSRF API writ JS -->
<script language='javascript' src='/opac/common/js/utils.js' type='text/javascript'></script>
- <script language='javascript' src='/opac/common/js/Cookies.js' type='text/javascript'></script>
<script language='javascript' src='/opac/common/js/CGI.js' type='text/javascript'></script>
<script language='javascript' src='/opac/common/js/JSON_v1.js' type='text/javascript'></script>
<!-- Dojo goodness -->
function selfckInit() {
+ dojo.require('dojo.cookie');
var cgi = new CGI();
- var staff = grabUser(cookieManager.read(STAFF_SES_PARAM) || cgi.param(STAFF_SES_PARAM));
+ var staff = grabUser(dojo.cookie(STAFF_SES_PARAM) || cgi.param(STAFF_SES_PARAM));
selfckSetupPrinter();
}
function selfckTryPatronCookie() {
- var pb = cookieManager.read(PATRON_BARCODE_COOKIE);
+ var pb = dojo.cookie(PATRON_BARCODE_COOKIE);
if(pb) {
- cookieManager.write(PATRON_BARCODE_COOKIE, '');
+ dojo.cookie(PATRON_BARCODE_COOKIE, null, {'expires':-1});
$('selfck-patron-login-input').value = pb;
selfckPatronLogin();
}
}
function selfckLogoutStaff() {
- cookieManager.remove(STAFF_SES_PARAM);
+ dojo.cookie(STAFF_SES_PARAM,null,{'expires':-1});
location.reload(true);
}
function selfckCheckPatronBarcode(itemBc) {
if(patronBarcodeRegex) {
if(itemBc.match(patronBarcodeRegex)) {
- cookieManager.write(PATRON_BARCODE_COOKIE, itemBc, -1);
+ dojo.cookie(PATRON_BARCODE_COOKIE, itemBc);
selfckLogoutPatron();
return true;
}
<script language='javascript' type='text/javascript'
src='<!--#echo var="OILS_OPAC_JS_HOST"-->/common/js/CGI.js'></script>
<script language='javascript' type='text/javascript'
- src='<!--#echo var="OILS_OPAC_JS_HOST"-->/common/js/Cookies.js'></script>
- <script language='javascript' type='text/javascript'
src='<!--#echo var="OILS_OPAC_JS_HOST"-->/common/js/md5.js'></script>
<script language='javascript' type='text/javascript'
src='<!--#echo var="OILS_OPAC_JS_HOST"-->/common/js/JSON_v1.js'></script>
if(!strongPassword( G.ui.login.password.value ) ) {
- cookieManager.write(COOKIE_SES, "");
+ dojo.require('dojo.cookie');
+ dojo.cookie(COOKIE_SES, "");
hideMe($('login_table'));
unHideMe($('change_pw_table'));
$('change_pw_current').focus();
function advgInit() {
/* XXX */
- if( cookieManager.read(COOKIE_NOGROUP_RECORDS) || SHOW_MR_DEFAULT )
+ dojo.require('dojo.cookie');
+ if( dojo.cookie(COOKIE_NOGROUP_RECORDS) || SHOW_MR_DEFAULT )
$('adv_group_titles').checked = true;
$n($('adv_global_tbody'), 'term').focus();
/* loads the compiled search from the search cookie
and sets the widgets accordingly */
- search = cookieManager.read(COOKIE_SEARCH);
+ search = dojo.cookie(COOKIE_SEARCH);
if(!search) return;
_debug("loaded compiled search cookie: " + search);
}
if($('adv_group_titles').checked )
- cookieManager.write(COOKIE_NOGROUP_RECORDS,'1',-1);
+ dojo.cookie(COOKIE_NOGROUP_RECORDS,'1');
else
- cookieManager.write(COOKIE_NOGROUP_RECORDS,'');
+ dojo.cookie(COOKIE_NOGROUP_RECORDS,null,{'expires':-1});
goTo(buildOPACLink(args));
var res = r.getResultObject();
resultFacetKey = res.facet_key;
resultCompiledSearch = res.compiled_search;
- cookieManager.write(COOKIE_SEARCH, js2JSON(res.compiled_search), -1);
+ dojo.require('dojo.cookie');
+ dojo.cookie(COOKIE_SEARCH, js2JSON(res.compiled_search));
if(res.count != null) {
if( getOffset() == 0 ) HITCOUNT = res.count;
runEvt('result', 'hitCountReceived');
switch(rtype) {
case RTYPE_COOKIE:
- ids = JSON2js(cookieManager.read(COOKIE_RIDS));
+ ids = JSON2js(dojo.cookie(COOKIE_RIDS));
_rresultHandleIds( ids, ids.length );
break;
function _rresultHandleIds(ids, count) {
//var json = js2JSON({ids:ids,count:count});
/*
- cookieManager.write(COOKIE_SRIDS, json, '+1d');
+ dojo.cookie(COOKIE_SRIDS, json, {'expires':1});
*/
HITCOUNT = parseInt(count);
resultFacetKey = result.facet_key;
resultCompiledSearch = result.compiled_search;
- cookieManager.write(COOKIE_SEARCH, js2JSON(result.compiled_search), -1);
+ dojo.require('dojo.cookie');
+ dojo.cookie(COOKIE_SEARCH, js2JSON(result.compiled_search));
_rresultHandleIds( ids, result.count );
}
if(!strongPassword( G.ui.login.password.value ) ) {
- cookieManager.write(COOKIE_SES, "");
+ dojo.require('dojo.cookie');
+ dojo.cookie(COOKIE_SES, "");
hideMe($('login_table'));
unHideMe($('change_pw_table'));
$('change_pw_current').focus();
<script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/utils.js' type='text/javascript'></script>
<script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/config.js' type='text/javascript'></script>
<script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/CGI.js' type='text/javascript'></script>
- <script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/Cookies.js' type='text/javascript'></script>
<script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/md5.js' type='text/javascript'></script>
<script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/slimtree.js' type='text/javascript'></script>
}
- oilsRptCookie = new HTTP.Cookies();
+ dojo.require('dojo.cookie');
oilsRptCurrentOrg = USER.ws_ou();
- cookieManager.write(COOKIE_SES, SESSION, -1, '/');
- cookieManager.write('ws_ou', USER.ws_ou(), -1, '/');
+ dojo.cookie(COOKIE_SES, SESSION, { 'path' : '/'});
+ dojo.cookie('ws_ou', USER.ws_ou(), { 'path' : '/'});
oilsRptFetchOrgTree(
function() {
<script type="text/javascript">
dojo.require('dojo.parser');
dojo.require('dojo.string');
+ dojo.require('dojo.cookie');
function status_update (markup) {
dojo.byId('status_text').innerHTML = markup;
<script type='text/javascript' src='/opac/common/js/JSON_v1.js'> </script>
<script type='text/javascript' src='/opac/common/js/fmall.js'> </script>
<script type='text/javascript' src='/opac/common/js/fmgen.js'> </script>
-<script type='text/javascript' src='/opac/common/js/Cookies.js'> </script>
<script type='text/javascript' src='/opac/common/js/opac_utils.js'> </script>
<script type='text/javascript' src='/opac/common/js/<!--#echo var="locale"-->/OrgTree.js'> </script>
<script type='text/javascript' src='/opac/common/js/org_utils.js'> </script>
<script src='/opac/common/js/JSON_v1.js' type="application/x-javascript; e4x=1"/>
<script src='/opac/common/js/fmall.js' type="application/x-javascript; e4x=1"/>
<script src='/opac/common/js/fmgen.js' type="application/x-javascript; e4x=1"/>
-<script src='/opac/common/js/Cookies.js' type="application/x-javascript; e4x=1"/>
<script src='/opac/common/js/opac_utils.js' type="application/x-javascript; e4x=1"/>
<script src='/opac/common/js/<!--#echo var="locale"-->/OrgTree.js' type="application/x-javascript; e4x=1"/>
<script src='/opac/common/js/org_utils.js' type="application/x-javascript; e4x=1"/>
<script language='javascript' src='/opac/common/js/JSON_v1.js'> </script>
<script language='javascript' src='/opac/common/js/fmall.js'> </script>
<script language='javascript' src='/opac/common/js/fmgen.js'> </script>
- <script language='javascript' src='/opac/common/js/Cookies.js'> </script>
<script language='javascript' src='/opac/common/js/opac_utils.js'> </script>
<script language='javascript' src='/opac/common/js/<!--#echo var="locale"-->/OrgTree.js'> </script>
<script language='javascript' src='/opac/common/js/org_utils.js'> </script>
<script type='text/javascript' src='/opac/common/js/JSON_v1.js'> </script>
<script type='text/javascript' src='/opac/common/js/fmall.js'> </script>
<script type='text/javascript' src='/opac/common/js/fmgen.js'> </script>
- <script type='text/javascript' src='/opac/common/js/Cookies.js'> </script>
<script type='text/javascript' src='/opac/common/js/opac_utils.js'> </script>
<script type='text/javascript' src='/opac/common/js/<!--#echo var="locale"-->/OrgTree.js'> </script>
<script type='text/javascript' src='/opac/common/js/org_utils.js'> </script>
<script language='javascript' src='/opac/common/js/Cookie.js'> </script>
<script language='javascript' src='/opac/common/js/JSON_v1.js'> </script>
- <script language='javascript' src='/opac/common/js/Cookies.js'> </script>
<script language='javascript' src='/opac/common/js/opac_utils.js'> </script>
<script language='javascript' src='/opac/common/js/<!--#echo var="locale"-->/OrgTree.js'> </script>
<script language='javascript' src='/opac/common/js/org_utils.js'> </script>
<script language='javascript' src='/opac/common/js/JSON_v1.js'> </script>
<script language='javascript' src='/opac/common/js/fmall.js'> </script>
<script language='javascript' src='/opac/common/js/fmgen.js'> </script>
- <script language='javascript' src='/opac/common/js/Cookies.js'> </script>
<script language='javascript' src='/opac/common/js/opac_utils.js'> </script>
<script language='javascript' src='/opac/common/js/<!--#echo var="locale"-->/OrgTree.js'> </script>
<script language='javascript' src='/opac/common/js/org_utils.js'> </script>
<script language='javascript' src='/opac/common/js/JSON_v1.js'> </script>
<script language='javascript' src='/opac/common/js/fmall.js'> </script>
<script language='javascript' src='/opac/common/js/fmgen.js'> </script>
- <script language='javascript' src='/opac/common/js/Cookies.js'> </script>
<script language='javascript' src='/opac/common/js/opac_utils.js'> </script>
<script language='javascript' src='/opac/common/js/<!--#echo var="locale"-->/OrgTree.js'> </script>
<script language='javascript' src='/opac/common/js/org_utils.js'> </script>
<script language='javascript' src='/opac/common/js/JSON_v1.js'> </script>
<script language='javascript' src='/opac/common/js/fmall.js'> </script>
<script language='javascript' src='/opac/common/js/fmgen.js'> </script>
- <script language='javascript' src='/opac/common/js/Cookies.js'> </script>
<script language='javascript' src='/opac/common/js/opac_utils.js'> </script>
<script language='javascript' src='/opac/common/js/<!--#echo var="locale"-->/OrgTree.js'> </script>
<script language='javascript' src='/opac/common/js/org_utils.js'> </script>
<script language='javascript' src='/opac/common/js/JSON_v1.js'> </script>
<script language='javascript' src='/opac/common/js/fmall.js'> </script>
<script language='javascript' src='/opac/common/js/fmgen.js'> </script>
- <script language='javascript' src='/opac/common/js/Cookies.js'> </script>
<script language='javascript' src='/opac/common/js/opac_utils.js'> </script>
<script language='javascript' src='/opac/common/js/<!--#echo var="locale"-->/OrgTree.js'> </script>
<script language='javascript' src='/opac/common/js/org_utils.js'> </script>
//cache_me('/xul/server/patron/ue_ui.js','http');
//cache_me('/xul/server/patron/ue.js','http');
//cache_me('/opac/common/js//config.js','http');
- //cache_me('/opac/common/js/Cookie.js','http');
- //cache_me('/opac/common/js/Cookies.js','http');
//cache_me('/opac/common/js/opac_utils.js','http');
//cache_me('/opac/common/js/init.js','http');
//cache_me('/opac/common/js/jscalendar/calendar-brown.css','http');
<script language='javascript' src='/opac/common/js/JSON_v1.js'> </script>
<script language='javascript' src='/opac/common/js/fmall.js'> </script>
<script language='javascript' src='/opac/common/js/fmgen.js'> </script>
- <script language='javascript' src='/opac/common/js/Cookies.js'> </script>
<script language='javascript' src='/opac/common/js/opac_utils.js'> </script>
<script language='javascript' src='/opac/common/js/<!--#echo var="locale"-->/OrgTree.js'> </script>
<script language='javascript' src='/opac/common/js/org_utils.js'> </script>