Sfoglia il codice sorgente

Versionamento JS e CSS

master
Salvatore La Manna 3 anni fa
parent
commit
5f2a38ac0f
  1. 120
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-portlet.xml
  2. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties
  3. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_dettagli_principali.jsp
  4. 113
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/js/main.js
  5. 20
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/liferay-portlet.xml
  6. 11
      liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp

120
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-portlet.xml

@ -70,160 +70,112 @@
</scheduler-entry>
<asset-renderer-factory>it.tref.liferay.portos.bo.asset.ControlloPraticaAssetRendererFactory</asset-renderer-factory>
<workflow-handler>it.tref.liferay.portos.bo.workflow.ControlloPraticaWorkflowHandler</workflow-handler>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<header-portlet-css>/css/main.css?v=1</header-portlet-css>
<footer-portlet-javascript>/js/main.js?v=2</footer-portlet-javascript>
<css-class-wrapper>fascicolo-portlet</css-class-wrapper>
</portlet>
<portlet>
<portlet-name>2</portlet-name>
<icon>/icon.png</icon>
<control-panel-entry-category>
configuration
</control-panel-entry-category>
<control-panel-entry-category>configuration</control-panel-entry-category>
<control-panel-entry-weight>1.5</control-panel-entry-weight>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<css-class-wrapper>
tabelle-di-sistema-portlet
</css-class-wrapper>
<header-portlet-css>/css/main.css?v=1</header-portlet-css>
<footer-portlet-javascript>/js/main.js?v=2</footer-portlet-javascript>
<css-class-wrapper>tabelle-di-sistema-portlet</css-class-wrapper>
</portlet>
<portlet>
<portlet-name>4</portlet-name>
<icon>/icon.png</icon>
<render-weight>0</render-weight>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<css-class-wrapper>
gestione-firme-portlet
</css-class-wrapper>
<header-portlet-css>/css/main.css?v=1</header-portlet-css>
<footer-portlet-javascript>/js/main.js?v=2</footer-portlet-javascript>
<css-class-wrapper>gestione-firme-portlet</css-class-wrapper>
<add-default-resource>true</add-default-resource>
</portlet>
<portlet>
<portlet-name>5</portlet-name>
<icon>/icon.png</icon>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<css-class-wrapper>
doc-aggiuntiva-portlet
</css-class-wrapper>
<header-portlet-css>/css/main.css?v=1</header-portlet-css>
<footer-portlet-javascript>/js/main.js?v=2</footer-portlet-javascript>
<css-class-wrapper>doc-aggiuntiva-portlet</css-class-wrapper>
</portlet>
<portlet>
<portlet-name>6</portlet-name>
<icon>/icon.png</icon>
<render-weight>0</render-weight>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<css-class-wrapper>
gestione-attivita
</css-class-wrapper>
<header-portlet-css>/css/main.css?v=1</header-portlet-css>
<footer-portlet-javascript>/js/main.js?v=2</footer-portlet-javascript>
<css-class-wrapper>gestione-attivita</css-class-wrapper>
</portlet>
<portlet>
<portlet-name>7</portlet-name>
<icon>/icon.png</icon>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<css-class-wrapper>
allegati-manuali-portlet
</css-class-wrapper>
<header-portlet-css>/css/main.css?v=1</header-portlet-css>
<footer-portlet-javascript>/js/main.js?v=2</footer-portlet-javascript>
<css-class-wrapper>allegati-manuali-portlet</css-class-wrapper>
</portlet>
<portlet>
<portlet-name>8</portlet-name>
<icon>/icon.png</icon>
<render-weight>0</render-weight>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<css-class-wrapper>
gestione-attivita-istruttore-portlet
</css-class-wrapper>
<header-portlet-css>/css/main.css?v=1</header-portlet-css>
<footer-portlet-javascript>/js/main.js?v=2</footer-portlet-javascript>
<css-class-wrapper>gestione-attivita-istruttore-portlet</css-class-wrapper>
</portlet>
<portlet>
<portlet-name>9</portlet-name>
<icon>/icon.png</icon>
<css-class-wrapper>
carichi-di-lavoro-portlet
</css-class-wrapper>
<css-class-wrapper>carichi-di-lavoro-portlet</css-class-wrapper>
<add-default-resource>true</add-default-resource>
<system>true</system>
</portlet>
<portlet>
<portlet-name>10</portlet-name>
<icon>/icon.png</icon>
<css-class-wrapper>
tempistiche-portlet
</css-class-wrapper>
<css-class-wrapper>tempistiche-portlet</css-class-wrapper>
<add-default-resource>true</add-default-resource>
</portlet>
<portlet>
<portlet-name>11</portlet-name>
<icon>/icon.png</icon>
<css-class-wrapper>
generate-protocollo-csv-portlet
</css-class-wrapper>
<css-class-wrapper>generate-protocollo-csv-portlet</css-class-wrapper>
<add-default-resource>true</add-default-resource>
</portlet>
<portlet>
<portlet-name>12</portlet-name>
<icon>/icon.png</icon>
<control-panel-entry-category>
configuration
</control-panel-entry-category>
<control-panel-entry-category>configuration</control-panel-entry-category>
<control-panel-entry-weight>1.6</control-panel-entry-weight>
<css-class-wrapper>
pending-pagamenti-portlet
</css-class-wrapper>
<css-class-wrapper>pending-pagamenti-portlet</css-class-wrapper>
</portlet>
<portlet>
<portlet-name>portos-administration</portlet-name>
<icon>/icon.png</icon>
<control-panel-entry-category>
configuration
</control-panel-entry-category>
<control-panel-entry-category>configuration</control-panel-entry-category>
<control-panel-entry-weight>1.6</control-panel-entry-weight>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<css-class-wrapper>
portos-administration-portlet
</css-class-wrapper>
<header-portlet-css>/css/main.css?v=1</header-portlet-css>
<footer-portlet-javascript>/js/main.js?v=2</footer-portlet-javascript>
<css-class-wrapper>portos-administration-portlet</css-class-wrapper>
</portlet>
<portlet>
<portlet-name>ricerca-posizione</portlet-name>
<icon>/icon.png</icon>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>/js/main.js</footer-portlet-javascript>
<header-portlet-css>/css/main.css?v=1</header-portlet-css>
<footer-portlet-javascript>/js/main.js?v=2</footer-portlet-javascript>
<css-class-wrapper>ricerca-posizione-portlet</css-class-wrapper>
</portlet>
<portlet>
<portlet-name>22</portlet-name>
<icon>/icon.png</icon>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<header-portlet-css>/css/main.css?v=1</header-portlet-css>
<footer-portlet-javascript>/js/main.js?v=2</footer-portlet-javascript>
<css-class-wrapper>22-portlet</css-class-wrapper>
</portlet>
<portlet>
<portlet-name>13</portlet-name>
<icon>/icon.png</icon>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<header-portlet-css>/css/main.css?v=1</header-portlet-css>
<footer-portlet-javascript>/js/main.js?v=2</footer-portlet-javascript>
<css-class-wrapper>13-portlet</css-class-wrapper>
</portlet>
<role-mapper>

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/content/Portal.properties

@ -1279,8 +1279,6 @@ tipo_procedura_P8 = 7) Accertamento di compatibilità paesaggistica (D.Lgs. 42/2
tipo_procedura_P9 = 8) Accertamento di compatibilità paesaggistica per Sanatorie Edilizie (L. 47/1985 e L.R. 37/1985 – L. 724/1994 – L. 326/2003 e L.R. 15/2004)
tipo_procedura_P10 = 9) Certificazione di sussistenza vincoli
sanatoria-edilizia = Sanatoria edilizia
mappe-bbcc = Mappe BBCC
mappe-openstreetmap = OpenStreetmap
#tipo_procedura_Q11 = 1) Autorizzazione per interventi su Beni Culturali mobili

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/fascicolo/navigator/page_dettagli_principali.jsp

@ -229,7 +229,7 @@ String urlIframeMappe = MappeUtil.getUrlBo(request, dettPratica, comune, true);
<liferay-ui:tabs names="mappe-bbcc,mappe-openstreetmap" refresh="false">
<liferay-ui:section>
<div class="col-xs-12">
<!-- Integrazione geoporta l -->
<!-- Integrazione geoportal -->
<div class="container-fluid">
<div class="row">
<div class="col-xs-12">

113
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/js/main.js

@ -1,113 +1,9 @@
/*
var versionamento = {
changes : [],
init : function(idPratica, lastVersion, currentVersion) {
var scope = this;
this.loadJsonVersion(idPratica, lastVersion, true);
if (currentVersion > 0) {
this.loadJsonVersion(idPratica, currentVersion, false);
setTimeout(function() {
scope.getChanges(idPratica, currentVersion);
}, 300)
} else {
$('#_1_WAR_portosboportlet_version_number .version_body').html(
"<p class=\"text-center version_item\">Nessuna Versione precedente all'attuale</p>")
}
},
sliderChange : function(idPratica, currentVersion) {
var scope = this;
this.loadJsonVersion(idPratica, currentVersion, false);
setTimeout(function() {
scope.getChanges(idPratica, currentVersion);
}, 300)
},
loadJsonVersion : function(idPratica, versionNumber, last) {
var scope = this;
Liferay.Service('/portos-bo-portlet.dettpratica/get-json-version', {
intPraticaId : idPratica,
version : versionNumber
}, function(obj) {
var item = last ? "_1_WAR_portosboportlet_version_last" : "_1_WAR_portosboportlet_version_number";
scope.updateHTML(JSON.parse(obj), item, last ? false : versionNumber);
});
},
getChanges : function(idPratica, versionNumber) {
var scope = this;
Liferay.Service('/portos-bo-portlet.dettpratica/call-for-changes',
{
intPraticaId : idPratica,
version : versionNumber
},
function(obj) {
var arr = JSON.parse(obj);
$("#_1_WAR_portosboportlet_version_number .version_item").removeClass("background-red")
$("#_1_WAR_portosboportlet_version_last .version_item").removeClass("background-green")
for (index in arr) {
var key = arr[index];
var left = $("#_1_WAR_portosboportlet_version_number .item_" + key), right = $("#_1_WAR_portosboportlet_version_last .item_"
+ key);
left.addClass("background-red")
right.addClass("background-green")
var heights = [ left, right ].map(function(item) {
return $(item).outerHeight();
});
left.css('height', Math.max.apply(null, heights));
right.css('height', Math.max.apply(null, heights));
}
}
);
},
updateHTML : function(obj, containerId, versionNumber) {
var scope = this;
var version_container = $('#' + containerId);
if (versionNumber) {
version_container.find(".number").html(versionNumber);
}
for (item in obj) {
var item_value = obj[item].replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&#034;/g, "\"");
version_container.find('.item_' + item + " .item_value").html("<strong>" + item_value + "</strong>")
}
}
}
var sliderVersion = {
init : function(val, idPratica) {
var initialValue = val;
var min = 1;
var maxValue = (val - 1) > 0 ? val - 1 : 0;
versionamento.init(idPratica, val, maxValue);
$("#label-slider").text(maxValue);
if (maxValue <= 1) {
$("#label-slider").css("margin-left", '0');
}
$(function() {
$("#slider").slider({
value : val,
min : 1,
max : maxValue,
step : 1,
slide : function(event, ui) {
$("#label-slider").text(ui.value);
if (maxValue == 0) {
$("#label-slider").css("margin-left", '0');
} else {
$("#label-slider").css("margin-left", (ui.value - min) / (maxValue - min) * 100 + '%');
}
$("#label-slider").css("left", "-15px");
versionamento.sliderChange(idPratica, ui.value);
}
});
});
},
}
*/
if($('.cont_maps').length){
$('.cont_maps ul li').click(function(){
if ($('.cont_maps').length) {
$('.cont_maps ul li').click(function () {
var map = mapItMap.getInstance();
setTimeout(function(){
setTimeout(function () {
map.updateSize();
if(map.layers.length > 0)
if (map.layers.length > 0)
map.layers[0].redraw();
}, 100);
});
@ -115,4 +11,3 @@ if($('.cont_maps').length){

20
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/liferay-portlet.xml

@ -10,18 +10,14 @@
com.liferay.portal.kernel.portlet.DefaultConfigurationAction
</configuration-action-class>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<footer-portlet-javascript>/js/main.js?v=2</footer-portlet-javascript>
<css-class-wrapper>1-portlet</css-class-wrapper>
</portlet>
<portlet>
<portlet-name>2</portlet-name>
<icon>/icon.png</icon>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<footer-portlet-javascript>/js/main.js?v=2</footer-portlet-javascript>
<css-class-wrapper>
ricerca-pratiche-portlet
</css-class-wrapper>
@ -31,9 +27,7 @@
<icon>/icon.png</icon>
<render-weight>0</render-weight>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<footer-portlet-javascript>/js/main.js?v=2</footer-portlet-javascript>
<css-class-wrapper>
soggetti-pratica-portlet
</css-class-wrapper>
@ -45,9 +39,7 @@
<instanceable>true</instanceable>
<render-weight>0</render-weight>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<footer-portlet-javascript>/js/main.js?v=2</footer-portlet-javascript>
<css-class-wrapper>
alegati-pratica-portlet
</css-class-wrapper>
@ -59,9 +51,7 @@
<instanceable>true</instanceable>
<render-weight>0</render-weight>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<footer-portlet-javascript>/js/main.js?v=2</footer-portlet-javascript>
<css-class-wrapper>
parere-geologo-portlet
</css-class-wrapper>

11
liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp

@ -177,17 +177,6 @@ String urlIframeMappe = MappeUtil.getUrlFe(request, dettPratica, comune, (disabl
</div>
</div>
</div>
<!-- <div class="row">
<div class="col-xs-12">
<div class="container-fluid">
<div class="row row-padding-custom ">
<div class="col-xs-12 col-md-4">
<aui:input disabled="<%=disabledInput %>" name="suap" label="suap"/>
</div>
</div>
</div>
</div>
</div>-->
<div class="row">
<div class="col-xs-12">
<div class="container-fluid">

Caricamento…
Annulla
Salva