diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/mwg/sismica/bo/util/MappeUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/mwg/sismica/bo/util/MappeUtil.java index 8ceaa64a..effdcc05 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/mwg/sismica/bo/util/MappeUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/mwg/sismica/bo/util/MappeUtil.java @@ -19,35 +19,59 @@ import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.kernel.util.WebKeys; +import com.liferay.portal.theme.ThemeDisplay; public class MappeUtil { private final static Log _log = LogFactoryUtil.getLog(MappeUtil.class); - public static String getUrlFe(HttpServletRequest request, DettPratica dettPratica, Comune comune) + public static String getUrlFe(HttpServletRequest request, DettPratica dettPratica, Comune comune, boolean readOnly) throws UnsupportedEncodingException, PortalException, SystemException { - String baseUrl = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(comune.getCompanyId(), + + ThemeDisplay td = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY); + long companyId = td.getCompanyId(); + + String baseUrl = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(companyId, ConfigurazioneConstants.MAPPE_URL_IFRAME_FE); - return getUrlComune(request, baseUrl, dettPratica, comune); + return getUrlComune(request, baseUrl, dettPratica, comune, readOnly); } - public static String getUrlBo(HttpServletRequest request, DettPratica dettPratica, Comune comune) + public static String getUrlBo(HttpServletRequest request, DettPratica dettPratica, Comune comune, boolean readOnly) throws UnsupportedEncodingException, PortalException, SystemException { - String baseUrl = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(comune.getCompanyId(), + + ThemeDisplay td = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY); + long companyId = td.getCompanyId(); + + String baseUrl = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(companyId, ConfigurazioneConstants.MAPPE_URL_IFRAME_BO); - return getUrlComune(request, baseUrl, dettPratica, comune); + return getUrlComune(request, baseUrl, dettPratica, comune, readOnly); } private static String getUrlComune(HttpServletRequest request, String baseUrl, DettPratica dettPratica, - Comune comune) throws UnsupportedEncodingException, PortalException, SystemException { - long companyId = comune.getCompanyId(); + Comune comune, boolean readOnly) throws UnsupportedEncodingException, PortalException, SystemException { + + ThemeDisplay td = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY); + long companyId = td.getCompanyId(); String sharedSecret = ConfigurazioneLocalServiceUtil.findByC_ChiaveString(companyId, ConfigurazioneConstants.MAPPE_SHARED_SECRET); long date = new Date().getTime() / 1000; String auth = DigestUtils.sha256Hex(date + sharedSecret + request.getServerName()); - String url = baseUrl.replace("{{COD_BELFIORE}}", urlEncode(comune.getCodiceBelfiore())).replace( - "{{ESTREMI_CAT}}", urlEncode(dettPratica.getEstremiCatastali())); + String url = baseUrl; + + if(Validator.isNotNull(comune)) + url = url.replace("{{COD_BELFIORE}}", urlEncode(comune.getCodiceBelfiore())); + else + url = url.replace("{{COD_BELFIORE}}", ""); + + if(Validator.isNotNull(dettPratica)) + url = url.replace("{{ESTREMI_CAT}}", urlEncode(dettPratica.getEstremiCatastali())); + else + url = url.replace("{{ESTREMI_CAT}}", ""); + + url = url.replace("{{READONLY}}", (readOnly ? "true" : "false")); String query = StringPool.BLANK; String[] parti = StringUtils.split(url, StringPool.QUESTION); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties index 11e81bf2..4bf3e497 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties @@ -199,7 +199,6 @@ dp-ppp = Piano paesaggistico provinciale dett-principali = Dettagli principali dp = Piano paesaggistico provinciale piano-paesaggistico = Piano paesaggistico provinciale -dp-zona-sismica = Livello di tutela paesaggio-locale = Contesto paesaggistico livello-di-tutela = Livello di tutela vincoli = Vincoli diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties index b906d2fa..f482e965 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=portos_bo - build.number=3148 - build.date=1621869003568 + build.number=3150 + build.date=1621937915972 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_dettagli_principali.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_dettagli_principali.jsp index 5e0dcd52..04e1393a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_dettagli_principali.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_dettagli_principali.jsp @@ -24,7 +24,7 @@ Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getT Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId()); Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), territorio.getCodiceProvincia()); boolean isDisabledMap = ParamUtil.getBoolean(request, "isDisabledMap", false); -String urlIframeMappe = MappeUtil.getUrlBo(request, dettPratica, comune); +String urlIframeMappe = MappeUtil.getUrlBo(request, dettPratica, comune, true); %> @@ -218,7 +218,7 @@ String urlIframeMappe = MappeUtil.getUrlBo(request, dettPratica, comune);
-
+
<% String[] geolocalization = dettPratica.getLocalizzazioneGeografica().split(Pattern.quote("|")); %> @@ -229,7 +229,7 @@ String urlIframeMappe = MappeUtil.getUrlBo(request, dettPratica, comune);
- +
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/ricerca-posizione/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/ricerca-posizione/view.jsp index e3d115c4..4a06365a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/ricerca-posizione/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/ricerca-posizione/view.jsp @@ -10,6 +10,8 @@ <%@page import="java.util.ArrayList"%> <%@page import="java.util.Locale"%> <%@page import="javax.portlet.PortletURL"%> +<%@page import="it.mwg.sismica.bo.util.MappeUtil"%> + <% String numeroProgetto = ParamUtil.getString(request, "numeroProgetto", StringPool.BLANK); @@ -51,6 +53,8 @@ DecimalFormat fmt = (DecimalFormat) NumberFormat.getInstance(Locale.ITALY); boolean showNotes = false; int[] raggi = { 500, 1000, 2000, 3000, 5000, 10000 }; +String urlIframeMappe = MappeUtil.getUrlBo(request, null, null, false); + %> @@ -120,14 +124,69 @@ int[] raggi = { 500, 1000, 2000, 3000, 5000, 10000 };
-
- - - - - - +
+ + + +
+ +
+
+
+
+ +
+ +
+
+
+
+
+ + + + + + + + + +
+ +
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/js/main.js b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/js/main.js index acb433cb..1efedd7d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/js/main.js +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/js/main.js @@ -100,4 +100,19 @@ var sliderVersion = { }); }, } -*/ \ No newline at end of file +*/ + +if($('.cont_maps').length){ + $('.cont_maps ul li').click(function(){ + var map = mapItMap.getInstance(); + setTimeout(function(){ + map.updateSize(); + if(map.layers.length > 0) + map.layers[0].redraw(); + }, 100); + }); +} + + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp index b20ee955..902444b4 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp @@ -44,7 +44,7 @@ boolean enabledByIntegrazione = DelegheUtil.hasDelegaCompilazioneDomanda(user.ge && TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE.equals(dettPratica.getTipoIntegrazione()); boolean isDisabled = disabledInput && !enabledByIntegrazione; boolean isNewVariante = ParamUtil.getBoolean(request, "isNewVariante"); -String urlIframeMappe = MappeUtil.getUrlFe(request, dettPratica, comune); +String urlIframeMappe = MappeUtil.getUrlFe(request, dettPratica, comune, (disabledInput || isGeoEditable)); %> @@ -226,9 +226,9 @@ String urlIframeMappe = MappeUtil.getUrlFe(request, dettPratica, comune);
-
+
+ refresh="false" value="mappe-bbcc">
@@ -268,7 +268,7 @@ function messageListener(event) { } } if (trasferiti.length > 0) { - console.log('Trasferiti correttamente: ' + trasferiti.join(', ')); + //console.log('Trasferiti correttamente: ' + trasferiti.join(', ')); } } @@ -282,6 +282,7 @@ function messageListener(event) {
+
@@ -341,7 +342,7 @@ function messageListener(event) {
-
+
@@ -350,15 +351,15 @@ function messageListener(event) {
- +
- +
- +
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/view_fascicolo_dettagli.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/view_fascicolo_dettagli.jsp index 24cd8a06..ceddd765 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/view_fascicolo_dettagli.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/view_fascicolo_dettagli.jsp @@ -38,6 +38,7 @@ <%@page import="java.util.ArrayList"%> <%@page import="com.liferay.portal.kernel.util.KeyValuePair"%> <%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%> +<%@page import="it.mwg.sismica.bo.util.MappeUtil" %> <% @@ -62,6 +63,8 @@ Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId()); Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), territorio.getCodiceProvincia()); + + String urlIframeMappe = MappeUtil.getUrlFe(request, dettPratica, comune, true); %> @@ -273,7 +276,7 @@
-
+
<% String[] geolocalization = BeanPropertiesUtil.getString(dettPratica, "localizzazioneGeografica","").split(Pattern.quote("|")); %> @@ -287,8 +290,26 @@
- - + + +
+ +
+
+
+ +
+
+
+
+
+ + +
+ +
+
+
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/view_fascicolo_riepilogo.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/view_fascicolo_riepilogo.jsp index c48d56c2..57528adc 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/view_fascicolo_riepilogo.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/view_fascicolo_riepilogo.jsp @@ -121,7 +121,7 @@
-
+
@@ -334,7 +334,7 @@
-
+
@@ -451,23 +451,6 @@
-
-
- <% - String[] geolocalization = BeanPropertiesUtil.getString(dettPratica, "localizzazioneGeografica","").split(Pattern.quote("|")); - %> -
- -
-
- -
- - -
-
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/js/main.js b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/js/main.js index b81bd2bb..6e4ab7c5 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/js/main.js +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/js/main.js @@ -93,3 +93,14 @@ $('body').on('mouseup', 'label.radio', function(){ if(radio.length) uncheck_radio_before_click(radio); }) + +if($('.cont_maps').length){ + $('.cont_maps ul li').click(function(){ + var map = mapItMap.getInstance(); + setTimeout(function(){ + map.updateSize(); + if(map.layers.length > 0) + map.layers[0].redraw(); + }, 100); + }); +} \ No newline at end of file