diff --git a/modules/interventi/header.php b/modules/interventi/header.php index 666dac446..d49679f38 100644 --- a/modules/interventi/header.php +++ b/modules/interventi/header.php @@ -244,9 +244,10 @@ if (!empty($sede_cliente->gaddress) || (!empty($sede_cliente->lat) && !empty($se
'; // Navigazione diretta verso l'indirizzo echo ' - - '.tr('Carica mappa').' - +
'; @@ -345,6 +346,16 @@ echo ' var map = null; function caricaMappa() { + const $map_container = $(".module-header:visible .card").eq(2); + + // Ingrandimento area mappa + $map_container.css("height", "300px"); + alignMaxHeight(".module-header .card"); + $("#map-edit").css("height", "80%"); + + $map_container.find(".load").addClass("hidden"); + $map_container.find(".go-to").removeClass("hidden"); + const lat = parseFloat("'.$sede_cliente->lat.'"); const lng = parseFloat("'.$sede_cliente->lng.'"); @@ -393,11 +404,15 @@ echo ' map.setView([lat, lng], 10); } - max_height = 0; - $(".module-header .card").each( function(){ - if($(this).height() > max_height){ - max_height = $(this).height(); - } - }); - $(".module-header .card").height(max_height); + function alignMaxHeight(element){ + max_height = 0; + $(element).each( function(){ + if($(this).height() > max_height){ + max_height = $(this).height(); + } + }); + $(element).height(max_height); + } + + alignMaxHeight(".module-header .card"); ';