15.06.2022, 10:31
Custom JS - adds off class to <body> element when 1/1/1 is off.
Custom CSS - applies to additional class global-off. When <body> element has off class it hides the icon image and sets the background image to a custom icon (change URL as needed).
Code:
$(function(){
if (window.grp) {
grp.listen('1/1/1', function(object) {
$('body').toggleClass('off', object.value == false);
});
}
});
Custom CSS - applies to additional class global-off. When <body> element has off class it hides the icon image and sets the background image to a custom icon (change URL as needed).
Code:
body.off .global-off .icon {
background-image: url('/scada/resources/icons/control-stop.svg');
}
body.off .global-off .icon img {
visibility: hidden;
}