[#135] fix expire date of the flash notify message
This commit is contained in:
parent
d01e8fa954
commit
8135f69438
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -7,4 +7,3 @@
|
|||
|
||||
:javascript
|
||||
var FLASH_HASH_ID = "#{flash_notify.hash_id}";
|
||||
var FLASH_EXPIRES_AT = "#{Date.today + 1.year}";
|
||||
|
|
Loading…
Reference in New Issue