diff --git a/html/includes/common/alerts.inc.php b/html/includes/common/alerts.inc.php index 52830fea94..97e4d37fb0 100644 --- a/html/includes/common/alerts.inc.php +++ b/html/includes/common/alerts.inc.php @@ -243,6 +243,7 @@ var alerts_grid = $("#alerts_'.$unique_id.'").bootgrid({ templates: { } }).on("loaded.rs.jquery.bootgrid", function() { + alerts_grid = $(this); alerts_grid.find(".incident-toggle").each( function() { $(this).parent().addClass(\'incident-toggle-td\'); }).on("click", function(e) { @@ -293,8 +294,11 @@ var alerts_grid = $("#alerts_'.$unique_id.'").bootgrid({ success: function(msg){ toastr.success(msg); if(msg.indexOf("ERROR:") <= -1) { - var $sortDictionary = alerts_grid.bootgrid("getSortDictionary"); - alerts_grid.bootgrid("sort", $sortDictionary); + $(".alerts").each(function(index) { + var $sortDictionary = $(this).bootgrid("getSortDictionary"); + $(this).reload; + $(this).bootgrid("sort", $sortDictionary); + }); } }, error: function(){