collapsable area in agents ips

This commit is contained in:
alejandro.campos@artica.es 2024-03-18 14:31:18 +01:00
parent 87368fb9a3
commit 32159b771d
1 changed files with 17 additions and 3 deletions

View File

@ -155,10 +155,14 @@ if (empty($address) === false) {
$address_text = '<span class="bolder" >'.$address.'</span>'; $address_text = '<span class="bolder" >'.$address.'</span>';
if (!empty($addresses) === true) { if (!empty($addresses) === true) {
if (count($addresses) > 3) { if (count($addresses) > 3) {
$address_text .= '&nbsp&nbsp<span id="deploy_sec_ips">'.html_print_image( $address_text .= '&nbsp&nbsp<span id="deploy_sec_ips_down">'.html_print_image(
'images/sort_down_black.png', 'images/sort_down_black.png',
true, true,
['alt' => 'down'] ['alt' => 'down']
).'</span><span id="deploy_sec_ips_up" style="display: none;">'.html_print_image(
'images/sort_up_black.png',
true,
['alt' => 'up']
).'</span>'; ).'</span>';
$address_text .= '<div id="secondary_ips" class="invisible">'; $address_text .= '<div id="secondary_ips" class="invisible">';
} }
@ -661,8 +665,18 @@ if (isset($table_interface) === true) {
<script type="text/javascript"> <script type="text/javascript">
$(document).ready (function () { $(document).ready (function () {
$('#deploy_sec_ips').on('click', function() { $('#deploy_sec_ips_up').on('click', function() {
$('#secondary_ips').toggle(); $('#secondary_ips').hide();
// Avoid setting display block property with show/hide methods.
$('#deploy_sec_ips_up').css('display', 'none');
$('#deploy_sec_ips_down').css('display', '');
});
$('#deploy_sec_ips_down').on('click', function() {
$('#secondary_ips').show();
// Avoid setting display block property with show/hide methods.
$('#deploy_sec_ips_down').css('display', 'none');
$('#deploy_sec_ips_up').css('display', '');
}); });
}); });
</script> </script>