[#135] fix expire date of the flash notify message

This commit is contained in:
Alexander Machehin 2013-06-10 21:07:19 +06:00
parent d01e8fa954
commit 8135f69438
2 changed files with 4 additions and 2 deletions

View File

@ -12,7 +12,10 @@ $(document).ready(function() {
}
$('#close-alert').click(function () {
setCookie("flash_notify_hash", FLASH_HASH_ID, FLASH_EXPIRES_AT);
var exdate=new Date();
exdate.setDate(exdate.getDate() + 365);
var expires="expires="+exdate.toUTCString();
setCookie("flash_notify_hash", FLASH_HASH_ID, expires);
});
});

View File

@ -7,4 +7,3 @@
:javascript
var FLASH_HASH_ID = "#{flash_notify.hash_id}";
var FLASH_EXPIRES_AT = "#{Date.today + 1.year}";