mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
JS Update
This commit is contained in:
@@ -40,23 +40,27 @@ var grid = $("#alerts").bootgrid({
|
|||||||
templates: {
|
templates: {
|
||||||
}
|
}
|
||||||
}).on("loaded.rs.jquery.bootgrid", function() {
|
}).on("loaded.rs.jquery.bootgrid", function() {
|
||||||
|
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() {
|
grid.find(".incident").each( function() {
|
||||||
$(this).parent().addClass('col-md-12 col-sm-12 col-xs-12');
|
$(this).parent().addClass('col-md-12 col-sm-12 col-xs-12');
|
||||||
$(this).parent().parent().on("mouseenter", function() {
|
$(this).parent().parent().on("mouseenter", function() {
|
||||||
$(this).find(".incident-toggle").fadeIn(200);
|
$(this).find(".incident-toggle").fadeIn(200);
|
||||||
}).on("mouseleave", function() {
|
}).on("mouseleave", function() {
|
||||||
$(this).find(".incident-toggle").fadeOut(200);
|
$(this).find(".incident-toggle").fadeOut(200);
|
||||||
}).on("click", function() {
|
}).on("click", "td:not(.incident-toggle-td)", function() {
|
||||||
var target = $(this).find(".incident-toggle").data("target");
|
var target = $(this).parent().find(".incident-toggle").data("target");
|
||||||
$(this).find(".incident-toggle").toggleClass('glyphicon-plus glyphicon-minus');
|
if( $(this).parent().find(".incident-toggle").hasClass('glyphicon-plus') ) {
|
||||||
$(target).collapse('toggle');
|
$(this).parent().find(".incident-toggle").toggleClass('glyphicon-plus glyphicon-minus');
|
||||||
|
$(target).collapse('toggle');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
grid.find(".incident-toggle").on("click", function(e) {
|
|
||||||
var target = $(this).data("target");
|
|
||||||
$(this).toggleClass('glyphicon-plus glyphicon-minus');
|
|
||||||
$(target).collapse('toggle');
|
|
||||||
});
|
|
||||||
grid.find(".command-ack-alert").on("click", function(e) {
|
grid.find(".command-ack-alert").on("click", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var alert_id = $(this).data("alert_id");
|
var alert_id = $(this).data("alert_id");
|
||||||
|
Reference in New Issue
Block a user