From 2cebe64791d112d3061d25c828b837e11b308ec8 Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 10 Nov 2010 20:51:23 +0000 Subject: [PATCH] replace Cookie.js/cookieManager with dojo.cookie. Some things to watch out for as we review this changeset: In Cookie.js, a -1 passed as the expires parameter indicated a session cookie. We could also specify such things as "+1y" or a specific date. With dojo.cookie, an expires value of -1 deletes a cookie. Not specifying an expires option will create a session cookie. We can enter a date or a number days from today. For the case in the code where we had "+1y", I supplied a value of 365. In the previous code, we used empty strings for a lot of cookie deletion. The canonical dojo example has us using null (with an expires of -1). There were also some cases where it seemed obvious that we were deleting cookies, but were at the same passing an actual value (see base.js). I changed these to nulls. In opac_utils.js, grabFleshedUser(), I fixed a dead code path where a cookie deletion attempt came after a return statement. I ran through the opac within and outside of the staff client, tried all of the acquisition UI's from the Acq menu, and most of the interfaces under Admin, and didn't find any auth cookie errors. git-svn-id: svn://svn.open-ils.org/ILS/trunk@18687 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/conify/global/actor/org_unit.html | 1 - Open-ILS/web/conify/global/actor/org_unit.js | 4 ++-- .../web/conify/global/actor/org_unit_type.html | 1 - Open-ILS/web/conify/global/actor/org_unit_type.js | 4 ++-- Open-ILS/web/conify/global/config/copy_status.html | 1 - Open-ILS/web/conify/global/config/copy_status.js | 4 ++-- .../web/conify/global/config/marc_code_maps.html | 1 - .../web/conify/global/permission/grp_tree.html | 1 - Open-ILS/web/conify/global/permission/grp_tree.js | 4 ++-- .../web/conify/global/permission/perm_list.html | 1 - Open-ILS/web/conify/global/permission/perm_list.js | 4 ++-- Open-ILS/web/js/ui/base.js | 4 ++-- Open-ILS/web/opac/common/js/RemoteRequest.js | 2 +- Open-ILS/web/opac/common/js/opac_utils.js | 27 +++++++++++----------- Open-ILS/web/opac/extras/bbags.xml | 1 - Open-ILS/web/opac/extras/circ/alt_holds_print.html | 1 - Open-ILS/web/opac/extras/selfcheck/selfcheck.js | 11 +++++---- Open-ILS/web/opac/extras/selfcheck/selfcheck.xml | 2 -- Open-ILS/web/opac/skin/craftsman/js/sidebar.js | 3 ++- Open-ILS/web/opac/skin/default/js/adv_global.js | 9 ++++---- Open-ILS/web/opac/skin/default/js/mresult.js | 3 ++- Open-ILS/web/opac/skin/default/js/rresult.js | 7 +++--- Open-ILS/web/opac/skin/default/js/sidebar.js | 3 ++- .../web/opac/skin/default/xml/common/js_common.xml | 1 - Open-ILS/web/reports/oils_rpt.js | 6 ++--- Open-ILS/web/reports/oils_rpt_common.xhtml | 2 +- Open-ILS/web/reports/xul/template_builder.xul | 1 - .../staff_client/server/admin/cash_reports.xhtml | 1 - .../staff_client/server/admin/closed_dates.xhtml | 1 - .../staff_client/server/admin/copy_locations.xhtml | 1 - .../staff_client/server/admin/hold_pull_list.xhtml | 1 - .../server/admin/hold_pull_list_classic.xhtml | 1 - .../staff_client/server/admin/non_cat_types.xhtml | 1 - .../server/admin/stat_cat_editor.xhtml | 1 - Open-ILS/xul/staff_client/server/main/data.xul | 2 -- Open-ILS/xul/staff_client/server/patron/ue.xhtml | 1 - 36 files changed, 51 insertions(+), 68 deletions(-) diff --git a/Open-ILS/web/conify/global/actor/org_unit.html b/Open-ILS/web/conify/global/actor/org_unit.html index 69fbf537c8..4f3de43130 100644 --- a/Open-ILS/web/conify/global/actor/org_unit.html +++ b/Open-ILS/web/conify/global/actor/org_unit.html @@ -48,7 +48,6 @@ - diff --git a/Open-ILS/web/conify/global/actor/org_unit.js b/Open-ILS/web/conify/global/actor/org_unit.js index 7f73391a6b..12f9139113 100644 --- a/Open-ILS/web/conify/global/actor/org_unit.js +++ b/Open-ILS/web/conify/global/actor/org_unit.js @@ -20,6 +20,7 @@ dojo.require('fieldmapper.dojoData'); 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'); @@ -38,8 +39,7 @@ dojo.requireLocalization("openils.conify", "conify"); // 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; diff --git a/Open-ILS/web/conify/global/actor/org_unit_type.html b/Open-ILS/web/conify/global/actor/org_unit_type.html index 2f93934d40..c3d4a5d9a5 100644 --- a/Open-ILS/web/conify/global/actor/org_unit_type.html +++ b/Open-ILS/web/conify/global/actor/org_unit_type.html @@ -50,7 +50,6 @@ - diff --git a/Open-ILS/web/conify/global/actor/org_unit_type.js b/Open-ILS/web/conify/global/actor/org_unit_type.js index f3fb76033a..26cb07d10e 100644 --- a/Open-ILS/web/conify/global/actor/org_unit_type.js +++ b/Open-ILS/web/conify/global/actor/org_unit_type.js @@ -20,6 +20,7 @@ dojo.require('fieldmapper.dojoData'); 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'); @@ -39,8 +40,7 @@ dojo.requireLocalization("openils.conify", "conify"); // 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; diff --git a/Open-ILS/web/conify/global/config/copy_status.html b/Open-ILS/web/conify/global/config/copy_status.html index 71183d7ed5..ef100ca476 100644 --- a/Open-ILS/web/conify/global/config/copy_status.html +++ b/Open-ILS/web/conify/global/config/copy_status.html @@ -51,7 +51,6 @@ - diff --git a/Open-ILS/web/conify/global/config/copy_status.js b/Open-ILS/web/conify/global/config/copy_status.js index a934f1a670..1613ae8eb7 100644 --- a/Open-ILS/web/conify/global/config/copy_status.js +++ b/Open-ILS/web/conify/global/config/copy_status.js @@ -22,6 +22,7 @@ dojo.require('openils.PermaCrud'); 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'); @@ -35,8 +36,7 @@ dojo.requireLocalization("openils.conify", "conify"); // 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; diff --git a/Open-ILS/web/conify/global/config/marc_code_maps.html b/Open-ILS/web/conify/global/config/marc_code_maps.html index 69aa012695..ccc9881e6b 100644 --- a/Open-ILS/web/conify/global/config/marc_code_maps.html +++ b/Open-ILS/web/conify/global/config/marc_code_maps.html @@ -51,7 +51,6 @@ - diff --git a/Open-ILS/web/conify/global/permission/grp_tree.html b/Open-ILS/web/conify/global/permission/grp_tree.html index f55863be5c..5a34f550ba 100644 --- a/Open-ILS/web/conify/global/permission/grp_tree.html +++ b/Open-ILS/web/conify/global/permission/grp_tree.html @@ -61,7 +61,6 @@ - diff --git a/Open-ILS/web/conify/global/permission/grp_tree.js b/Open-ILS/web/conify/global/permission/grp_tree.js index bf6cc77b24..1ee39d3656 100644 --- a/Open-ILS/web/conify/global/permission/grp_tree.js +++ b/Open-ILS/web/conify/global/permission/grp_tree.js @@ -22,6 +22,7 @@ dojo.require('openils.widget.TranslatorPopup'); 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'); @@ -43,8 +44,7 @@ dojo.requireLocalization("openils.conify", "conify"); // 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'); diff --git a/Open-ILS/web/conify/global/permission/perm_list.html b/Open-ILS/web/conify/global/permission/perm_list.html index 342ee81ec0..76bd62731f 100644 --- a/Open-ILS/web/conify/global/permission/perm_list.html +++ b/Open-ILS/web/conify/global/permission/perm_list.html @@ -51,7 +51,6 @@ - diff --git a/Open-ILS/web/conify/global/permission/perm_list.js b/Open-ILS/web/conify/global/permission/perm_list.js index 18c8fce422..ff303f965c 100644 --- a/Open-ILS/web/conify/global/permission/perm_list.js +++ b/Open-ILS/web/conify/global/permission/perm_list.js @@ -21,6 +21,7 @@ dojo.require('openils.widget.TranslatorPopup'); 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'); @@ -35,8 +36,7 @@ dojo.requireLocalization("openils.conify", "conify"); // 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'); diff --git a/Open-ILS/web/js/ui/base.js b/Open-ILS/web/js/ui/base.js index 75cafe79b9..1f5de05e28 100644 --- a/Open-ILS/web/js/ui/base.js +++ b/Open-ILS/web/js/ui/base.js @@ -37,8 +37,8 @@ function oilsSetupUser() { 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()) { diff --git a/Open-ILS/web/opac/common/js/RemoteRequest.js b/Open-ILS/web/opac/common/js/RemoteRequest.js index aff59b4734..125f57ab02 100644 --- a/Open-ILS/web/opac/common/js/RemoteRequest.js +++ b/Open-ILS/web/opac/common/js/RemoteRequest.js @@ -244,7 +244,7 @@ RemoteRequest.prototype.send = function(blocking) { 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); diff --git a/Open-ILS/web/opac/common/js/opac_utils.js b/Open-ILS/web/opac/common/js/opac_utils.js index 9ed6260c9d..8499c5e176 100644 --- a/Open-ILS/web/opac/common/js/opac_utils.js +++ b/Open-ILS/web/opac/common/js/opac_utils.js @@ -5,8 +5,6 @@ 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; @@ -222,13 +220,14 @@ function clearSearchParams() { 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 */ @@ -522,7 +521,7 @@ function buildSearchLink(type, string, linknode, trunc) { } function setSessionCookie(ses) { - cookieManager.write(COOKIE_SES, ses, -1); + dojo.cookie(COOKIE_SES, ses); } @@ -544,7 +543,7 @@ function grabUser(ses, force) { } 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); } @@ -636,8 +635,8 @@ function grabFleshedUser() { 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; @@ -661,7 +660,7 @@ function checkUserSkin(new_skin) { 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 } ); } } } @@ -794,10 +793,10 @@ function doLogout() { /* 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"); @@ -887,7 +886,7 @@ function orgSelect(id) { function setFontSize(size) { scaleFonts(size); - cookieManager.write(COOKIE_FONT, size, '+1y'); + dojo.cookie(COOKIE_FONT, size, { 'expires' : 365}); } var resourceFormats = [ diff --git a/Open-ILS/web/opac/extras/bbags.xml b/Open-ILS/web/opac/extras/bbags.xml index 9e7ebe3ad8..2b6ecf7537 100644 --- a/Open-ILS/web/opac/extras/bbags.xml +++ b/Open-ILS/web/opac/extras/bbags.xml @@ -11,7 +11,6 @@ - diff --git a/Open-ILS/web/opac/extras/circ/alt_holds_print.html b/Open-ILS/web/opac/extras/circ/alt_holds_print.html index 849b3692b0..5c17c365eb 100644 --- a/Open-ILS/web/opac/extras/circ/alt_holds_print.html +++ b/Open-ILS/web/opac/extras/circ/alt_holds_print.html @@ -26,7 +26,6 @@ - diff --git a/Open-ILS/web/opac/extras/selfcheck/selfcheck.js b/Open-ILS/web/opac/extras/selfcheck/selfcheck.js index 9b48c63729..d1b9f08d28 100644 --- a/Open-ILS/web/opac/extras/selfcheck/selfcheck.js +++ b/Open-ILS/web/opac/extras/selfcheck/selfcheck.js @@ -45,8 +45,9 @@ var SET_AUTO_OVERRIDE_EVENTS = 'circ.selfcheck.auto_override_checkout_events'; 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(); @@ -122,9 +123,9 @@ function 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(); } @@ -245,7 +246,7 @@ function selfckPatronLogin(barcode) { } function selfckLogoutStaff() { - cookieManager.remove(STAFF_SES_PARAM); + dojo.cookie(STAFF_SES_PARAM,null,{'expires':-1}); location.reload(true); } @@ -256,7 +257,7 @@ function selfckLogoutStaff() { 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; } diff --git a/Open-ILS/web/opac/extras/selfcheck/selfcheck.xml b/Open-ILS/web/opac/extras/selfcheck/selfcheck.xml index a0418e2bf1..d78f05eb02 100644 --- a/Open-ILS/web/opac/extras/selfcheck/selfcheck.xml +++ b/Open-ILS/web/opac/extras/selfcheck/selfcheck.xml @@ -39,8 +39,6 @@ - diff --git a/Open-ILS/web/opac/skin/craftsman/js/sidebar.js b/Open-ILS/web/opac/skin/craftsman/js/sidebar.js index 45296e41be..8a1777a223 100644 --- a/Open-ILS/web/opac/skin/craftsman/js/sidebar.js +++ b/Open-ILS/web/opac/skin/craftsman/js/sidebar.js @@ -68,7 +68,8 @@ function loginDance() { 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(); diff --git a/Open-ILS/web/opac/skin/default/js/adv_global.js b/Open-ILS/web/opac/skin/default/js/adv_global.js index 74edd3fe61..9fdfca3a11 100644 --- a/Open-ILS/web/opac/skin/default/js/adv_global.js +++ b/Open-ILS/web/opac/skin/default/js/adv_global.js @@ -8,7 +8,8 @@ var advSelectedOrg = null; 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(); @@ -112,7 +113,7 @@ function initSearchBoxes() { /* 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); @@ -260,9 +261,9 @@ function advSubmitGlobal() { } 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)); diff --git a/Open-ILS/web/opac/skin/default/js/mresult.js b/Open-ILS/web/opac/skin/default/js/mresult.js index 98220e7cdc..726f589575 100644 --- a/Open-ILS/web/opac/skin/default/js/mresult.js +++ b/Open-ILS/web/opac/skin/default/js/mresult.js @@ -49,7 +49,8 @@ function mresultHandleMRIds(r) { 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'); diff --git a/Open-ILS/web/opac/skin/default/js/rresult.js b/Open-ILS/web/opac/skin/default/js/rresult.js index 145f06bc5d..30bbbe5930 100644 --- a/Open-ILS/web/opac/skin/default/js/rresult.js +++ b/Open-ILS/web/opac/skin/default/js/rresult.js @@ -38,7 +38,7 @@ function rresultCollectIds() { switch(rtype) { case RTYPE_COOKIE: - ids = JSON2js(cookieManager.read(COOKIE_RIDS)); + ids = JSON2js(dojo.cookie(COOKIE_RIDS)); _rresultHandleIds( ids, ids.length ); break; @@ -245,7 +245,7 @@ function rresultHandleRIds(r) { 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); @@ -321,7 +321,8 @@ function rresultFilterSearchResults(r) { 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 ); } diff --git a/Open-ILS/web/opac/skin/default/js/sidebar.js b/Open-ILS/web/opac/skin/default/js/sidebar.js index c172edf1dd..902175e54f 100644 --- a/Open-ILS/web/opac/skin/default/js/sidebar.js +++ b/Open-ILS/web/opac/skin/default/js/sidebar.js @@ -68,7 +68,8 @@ function loginDance() { 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(); diff --git a/Open-ILS/web/opac/skin/default/xml/common/js_common.xml b/Open-ILS/web/opac/skin/default/xml/common/js_common.xml index a2a428fa28..c36dc06bb0 100644 --- a/Open-ILS/web/opac/skin/default/xml/common/js_common.xml +++ b/Open-ILS/web/opac/skin/default/xml/common/js_common.xml @@ -1,7 +1,6 @@ - diff --git a/Open-ILS/web/reports/oils_rpt.js b/Open-ILS/web/reports/oils_rpt.js index ba542ffb03..835e06ec9b 100644 --- a/Open-ILS/web/reports/oils_rpt.js +++ b/Open-ILS/web/reports/oils_rpt.js @@ -23,10 +23,10 @@ function oilsInitReports() { } - 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() { diff --git a/Open-ILS/web/reports/oils_rpt_common.xhtml b/Open-ILS/web/reports/oils_rpt_common.xhtml index 1715bd39f1..31d4f79f6c 100644 --- a/Open-ILS/web/reports/oils_rpt_common.xhtml +++ b/Open-ILS/web/reports/oils_rpt_common.xhtml @@ -14,6 +14,7 @@ - diff --git a/Open-ILS/web/reports/xul/template_builder.xul b/Open-ILS/web/reports/xul/template_builder.xul index 5815c36503..40ffface0d 100644 --- a/Open-ILS/web/reports/xul/template_builder.xul +++ b/Open-ILS/web/reports/xul/template_builder.xul @@ -36,7 +36,6 @@ - diff --git a/Open-ILS/xul/staff_client/server/admin/closed_dates.xhtml b/Open-ILS/xul/staff_client/server/admin/closed_dates.xhtml index af8ed45866..a3af761c2e 100644 --- a/Open-ILS/xul/staff_client/server/admin/closed_dates.xhtml +++ b/Open-ILS/xul/staff_client/server/admin/closed_dates.xhtml @@ -16,7 +16,6 @@ - diff --git a/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml b/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml index 6f71e57361..a4fb1c8fe3 100644 --- a/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml +++ b/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml @@ -22,7 +22,6 @@ - diff --git a/Open-ILS/xul/staff_client/server/admin/hold_pull_list.xhtml b/Open-ILS/xul/staff_client/server/admin/hold_pull_list.xhtml index 8e4a3e20a5..355c655dc1 100644 --- a/Open-ILS/xul/staff_client/server/admin/hold_pull_list.xhtml +++ b/Open-ILS/xul/staff_client/server/admin/hold_pull_list.xhtml @@ -20,7 +20,6 @@ - diff --git a/Open-ILS/xul/staff_client/server/admin/hold_pull_list_classic.xhtml b/Open-ILS/xul/staff_client/server/admin/hold_pull_list_classic.xhtml index 603b154777..dc00ec3ab2 100644 --- a/Open-ILS/xul/staff_client/server/admin/hold_pull_list_classic.xhtml +++ b/Open-ILS/xul/staff_client/server/admin/hold_pull_list_classic.xhtml @@ -19,7 +19,6 @@ - diff --git a/Open-ILS/xul/staff_client/server/admin/non_cat_types.xhtml b/Open-ILS/xul/staff_client/server/admin/non_cat_types.xhtml index 83f5857f88..0e8b6b0827 100644 --- a/Open-ILS/xul/staff_client/server/admin/non_cat_types.xhtml +++ b/Open-ILS/xul/staff_client/server/admin/non_cat_types.xhtml @@ -18,7 +18,6 @@ - diff --git a/Open-ILS/xul/staff_client/server/admin/stat_cat_editor.xhtml b/Open-ILS/xul/staff_client/server/admin/stat_cat_editor.xhtml index c9c1e09230..b468a97c93 100644 --- a/Open-ILS/xul/staff_client/server/admin/stat_cat_editor.xhtml +++ b/Open-ILS/xul/staff_client/server/admin/stat_cat_editor.xhtml @@ -18,7 +18,6 @@ - diff --git a/Open-ILS/xul/staff_client/server/main/data.xul b/Open-ILS/xul/staff_client/server/main/data.xul index 5d80e27fa4..5f05637c4a 100644 --- a/Open-ILS/xul/staff_client/server/main/data.xul +++ b/Open-ILS/xul/staff_client/server/main/data.xul @@ -129,8 +129,6 @@ //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'); diff --git a/Open-ILS/xul/staff_client/server/patron/ue.xhtml b/Open-ILS/xul/staff_client/server/patron/ue.xhtml index 1039261ca6..37b807db2f 100644 --- a/Open-ILS/xul/staff_client/server/patron/ue.xhtml +++ b/Open-ILS/xul/staff_client/server/patron/ue.xhtml @@ -18,7 +18,6 @@ - -- 2.11.0