mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
14 lines
539 B
JavaScript
14 lines
539 B
JavaScript
// Toggle the display of device images within an SVG rack elevation
|
|
$('button.toggle-images').click(function() {
|
|
var selected = $(this).attr('selected');
|
|
var rack_elevation = $(".rack_elevation");
|
|
if (selected) {
|
|
$('.device-image', rack_elevation.contents()).addClass('hidden');
|
|
} else {
|
|
$('.device-image', rack_elevation.contents()).removeClass('hidden');
|
|
}
|
|
$(this).attr('selected', !selected);
|
|
$(this).children('span').toggleClass('glyphicon-check glyphicon-unchecked');
|
|
return false;
|
|
});
|