1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-18 16:36:15 +00:00

[cookie]modified for ie

This commit is contained in:
llj
2012-08-22 16:22:10 +08:00
parent 7c1ec76dce
commit 85b10baa2f

View File

@@ -135,9 +135,12 @@
$('#info-bar .close').click(function() {
$('#info-bar').addClass('hide');
if (navigator.cookieEnabled) {
var cookies = document.cookie.split('; '),
var date = new Date(),
cookies = document.cookie.split('; '),
note_id_exist = false,
new_note_id = $(this).attr('data') + ',' + '; max-age=' + 14*24*60*60 + '; path=' + '{{ SITE_ROOT }}';
new_note_id = $(this).attr('data') + ',';
date.setTime(date.getTime() + 14*24*60*60*1000);
new_note_id += '; expires=' + date.toGMTString() + '; path=' + '{{ SITE_ROOT }}';
for (var i = 0, len = cookies.length; i < len; i++) {
if (cookies[i].split('=')[0] == 'note_id') {
note_id_exist = true;