Use php json_encode to properly encode notifications - 2

This commit is contained in:
gfjardim
2020-01-14 11:51:55 -03:00
parent 38c86a2b41
commit 9d45301512
@@ -335,8 +335,7 @@ function digits(number) {
function openNotifier(filter) {
$.post('/webGui/include/Notify.php',{cmd:'get'},function(json) {
var data = $.parseJSON(json);
$.each(data, function(i, object) {
var notify = $.parseJSON(object);
$.each(data, function(i, notify) {
if (notify.importance == filter) {
$.jGrowl(notify.subject+'<br>'+notify.description, {
group: notify.importance,
@@ -353,8 +352,7 @@ function closeNotifier(filter) {
clearTimeout(timers.notifier);
$.post('/webGui/include/Notify.php',{cmd:'get'},function(json) {
var data = $.parseJSON(json);
$.each(data, function(i, object) {
var notify = $.parseJSON(object);
$.each(data, function(i, notify) {
if (notify.importance == filter) $.post('/webGui/include/Notify.php',{cmd:'archive',file:notify.file});
});
$('div.jGrowl').find('.'+filter).find('div.jGrowl-close').trigger('click');