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){
|
.done(function(xml){
|
||||||
// Get viewed security alerts from cookie
|
// Get viewed security alerts from cookie
|
||||||
$.cookie.json = true;
|
var viewedItems = Cookies.get('ynhSecurityViewedItems') || [];
|
||||||
var viewedItems = $.cookie('ynhSecurityViewedItems') || [];
|
|
||||||
|
|
||||||
// Loop through items
|
// Loop through items
|
||||||
$('item', xml).each(function(k, v) {
|
$('item', xml).each(function(k, v) {
|
||||||
|
@ -57,8 +56,8 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Saved viewed items to cookie
|
// Saved viewed items to cookie
|
||||||
$.cookie('ynhSecurityViewedItems', viewedItems, {
|
Cookies.set('ynhSecurityViewedItems', viewedItems, {
|
||||||
expire: 7
|
expires: 7
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.fail(function() {
|
.fail(function() {
|
||||||
|
|
Loading…
Reference in a new issue