Merge pull request #1646 from laf/alert-widget-fix

Updated gridster variables to be custom per widget
This commit is contained in:
Daniel Preussker 2015-08-08 09:47:37 +00:00
commit 442af615ba
2 changed files with 5 additions and 5 deletions

View File

@ -22,7 +22,7 @@ $common_output[] = '
</table>
</div>
<script>
var grid = $("#alerts").bootgrid({
var alerts_grid = $("#alerts").bootgrid({
ajax: true,
post: function ()
{
@ -43,14 +43,14 @@ var grid = $("#alerts").bootgrid({
templates: {
}
}).on("loaded.rs.jquery.bootgrid", function() {
grid.find(".incident-toggle").each( function() {
alerts_grid.find(".incident-toggle").each( function() {
$(this).parent().addClass(\'incident-toggle-td\');
}).on("click", function(e) {
var target = $(this).data("target");
$(target).collapse(\'toggle\');
$(this).toggleClass(\'glyphicon-plus glyphicon-minus\');
});
grid.find(".incident").each( function() {
alerts_grid.find(".incident").each( function() {
$(this).parent().addClass(\'col-lg-4 col-md-4 col-sm-4 col-xs-4\');
$(this).parent().parent().on("mouseenter", function() {
$(this).find(".incident-toggle").fadeIn(200);
@ -64,7 +64,7 @@ var grid = $("#alerts").bootgrid({
}
});
});
grid.find(".command-ack-alert").on("click", function(e) {
alerts_grid.find(".command-ack-alert").on("click", function(e) {
e.preventDefault();
var alert_id = $(this).data("alert_id");
var state = $(this).data("state");

View File

@ -14,7 +14,7 @@ $common_output[] = '
<script>
var grid = $("#eventlog").bootgrid({
var eventlog_grid = $("#eventlog").bootgrid({
ajax: true,
post: function ()
{