[enh] move to new js-cookie API

This commit is contained in:
Julien Malik 2016-03-05 12:10:41 +01:00
parent 98bbda57c0
commit 1ed953f90c

View file

@ -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() {
@ -158,4 +157,4 @@
}, 'GET', {}, false);
});
})();
})();