From: Gautam J. <ga...@us...> - 2005-11-17 20:56:44
|
Update of /cvsroot/jaffa/JaffaCore/source/html/jaffa/js/panels In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8022/source/html/jaffa/js/panels Modified Files: footer.js Log Message: Fixed the footer.js to not write cookies with datestamps anymore. A browser typically limits the number of cookies to 20, after which it starts truncating them. It may even remove the JSESSIONID cookie, which can mess up the session. Index: footer.js =================================================================== RCS file: /cvsroot/jaffa/JaffaCore/source/html/jaffa/js/panels/footer.js,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** footer.js 21 Oct 2005 14:28:49 -0000 1.14 --- footer.js 17 Nov 2005 20:56:35 -0000 1.15 *************** *** 65,110 **** } ! function getDateCookie(dateCookie) { ! var data; ! if (document.cookie) { ! index = document.cookie.indexOf(dateCookie); ! if (index != - 1) { ! namestart = (document.cookie.indexOf("=", index) + 1); ! nameend = document.cookie.indexOf(";", index); ! if (nameend == - 1) { ! nameend = document.cookie.length; ! } ! data = document.cookie.substring(namestart, nameend); ! return data; ! } ! } ! return null; ! } ! ! var dateTimeStampEl = document.getElementById('dateTimeStamp'); ! if (dateTimeStampEl != null && ! (getDateCookie(dateTimeStampEl.value) != dateTimeStampEl.value)) ! { ! if (messageList.length > 0) { ! if (windowType != "true") { ! document.getElementById("errorBox").style.display = "block"; ! document.getElementById("errorBox").style.left = "" + ( ! (document.body.clientWidth) / 2) - 150; ! document.getElementById("errorBox").style.top = "" + ( ! (document.body.clientHeight) / 2) - 120; ! if (messageList.length < 2) { ! document.getElementById("previous").style.visibility = "hidden"; ! document.getElementById("next").style.visibility = "hidden"; ! } ! showMessages(0); ! } else { ! if (document.getElementById("calendardd") != null) ! document.getElementById("calendardd").disabled = true; ! openDOMBrowser('_document'); ! document.cookie = "" + dateTimeStampEl.value + "=" + dateTimeStampEl.value; } } else { if (document.getElementById("calendardd") != null) document.getElementById("calendardd").disabled = true; } } --- 65,87 ---- } ! if (messageList.length > 0) { ! if (windowType != "true") { ! document.getElementById("errorBox").style.display = "block"; ! document.getElementById("errorBox").style.left = "" + ( ! (document.body.clientWidth) / 2) - 150; ! document.getElementById("errorBox").style.top = "" + ( ! (document.body.clientHeight) / 2) - 120; ! if (messageList.length < 2) { ! document.getElementById("previous").style.visibility = "hidden"; ! document.getElementById("next").style.visibility = "hidden"; } + showMessages(0); } else { if (document.getElementById("calendardd") != null) document.getElementById("calendardd").disabled = true; + openDOMBrowser('_document'); } + } else { + if (document.getElementById("calendardd") != null) + document.getElementById("calendardd").disabled = true; } |