Use unique id for bootgrid table in alert widget so there can be more than one

This commit is contained in:
Eldon Koyle
2016-02-17 15:04:50 -07:00
parent b5ebaf3135
commit 22a81e0424

View File

@@ -148,6 +148,7 @@ else {
$widget_settings['title'] = $title; $widget_settings['title'] = $title;
$group = $widget_settings['group']; $group = $widget_settings['group'];
$widget_id = (int)$_POST['id'];
$common_output[] = ' $common_output[] = '
<div class="row"> <div class="row">
@@ -156,7 +157,7 @@ else {
</div> </div>
</div> </div>
<div class="table-responsive"> <div class="table-responsive">
<table id="alerts" class="table table-hover table-condensed alerts"> <table id="alerts_'.$widget_id.'" class="table table-hover table-condensed alerts">
<thead> <thead>
<tr> <tr>
<th data-column-id="status" data-formatter="status" data-sortable="false">Status</th> <th data-column-id="status" data-formatter="status" data-sortable="false">Status</th>
@@ -171,7 +172,7 @@ else {
</table> </table>
</div> </div>
<script> <script>
var alerts_grid = $("#alerts").bootgrid({ var alerts_grid = $("#alerts_'.$widget_id.'").bootgrid({
ajax: true, ajax: true,
post: function () post: function ()
{ {