mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[enh] move to new js-cookie API
This commit is contained in:
parent
98bbda57c0
commit
1ed953f90c
1 changed files with 4 additions and 5 deletions
|
@ -27,8 +27,7 @@
|
|||
})
|
||||
.done(function(xml){
|
||||
// Get viewed security alerts from cookie
|
||||
$.cookie.json = true;
|
||||
var viewedItems = $.cookie('ynhSecurityViewedItems') || [];
|
||||
var viewedItems = Cookies.get('ynhSecurityViewedItems') || [];
|
||||
|
||||
// Loop through items
|
||||
$('item', xml).each(function(k, v) {
|
||||
|
@ -57,8 +56,8 @@
|
|||
}
|
||||
});
|
||||
// Saved viewed items to cookie
|
||||
$.cookie('ynhSecurityViewedItems', viewedItems, {
|
||||
expire: 7
|
||||
Cookies.set('ynhSecurityViewedItems', viewedItems, {
|
||||
expires: 7
|
||||
});
|
||||
})
|
||||
.fail(function() {
|
||||
|
|
Loading…
Reference in a new issue