|
|
@ -691,7 +691,7 @@ Liferay.on('mapIt-ready',function(event) { |
|
|
|
|| ('' == $('#<portlet:namespace/>long').val().trim())) { |
|
|
|
|| ('' == $('#<portlet:namespace/>long').val().trim())) { |
|
|
|
localize(false); |
|
|
|
localize(false); |
|
|
|
} |
|
|
|
} |
|
|
|
var isActivable = <%= !disabledInput && !isGeoEditable %> |
|
|
|
var isActivable = <%= !disabledInput && !isGeoEditable %>; |
|
|
|
if (isActivable) { |
|
|
|
if (isActivable) { |
|
|
|
AUI().one('#<portlet:namespace/>localizzaBtn').set('disabled', false).removeClass('disabled'); |
|
|
|
AUI().one('#<portlet:namespace/>localizzaBtn').set('disabled', false).removeClass('disabled'); |
|
|
|
AUI().one('#_<%= PortletKeys.MAPIT %>_container_btn .bloccamap').set('disabled', false).removeClass('disabled'); |
|
|
|
AUI().one('#_<%= PortletKeys.MAPIT %>_container_btn .bloccamap').set('disabled', false).removeClass('disabled'); |
|
|
@ -767,7 +767,7 @@ $('#<portlet:namespace/>long, #<portlet:namespace/>lat').on('change', function() |
|
|
|
$('#sistemi_costruttivi input').on('change', function() { |
|
|
|
$('#sistemi_costruttivi input').on('change', function() { |
|
|
|
var _this = $(this); |
|
|
|
var _this = $(this); |
|
|
|
if(_this.attr('id')=='<portlet:namespace/>tcInterventiCheckbox'){ |
|
|
|
if(_this.attr('id')=='<portlet:namespace/>tcInterventiCheckbox'){ |
|
|
|
if(!_this.is(":checked")) |
|
|
|
if(!_this.is(":checked")){ |
|
|
|
$('.costruzioni_esistenti ul input[type="checkbox"]').prop("checked", false).attr("disabled", true); |
|
|
|
$('.costruzioni_esistenti ul input[type="checkbox"]').prop("checked", false).attr("disabled", true); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$('.costruzioni_esistenti ul input[type="checkbox"]').attr("disabled", false).removeClass("disabled"); |
|
|
|
$('.costruzioni_esistenti ul input[type="checkbox"]').attr("disabled", false).removeClass("disabled"); |
|
|
@ -802,98 +802,15 @@ $('#destinazioneinazione input[type="radio"]').on('click', function() { |
|
|
|
checkIfDisableInfrastrutture(); |
|
|
|
checkIfDisableInfrastrutture(); |
|
|
|
var el = $(this); |
|
|
|
var el = $(this); |
|
|
|
setTimeout(function() { |
|
|
|
setTimeout(function() { |
|
|
|
if (el.val() == "3" && el.is(':checked')) { |
|
|
|
if (el.val() == "3" && el.is(':checked')) |
|
|
|
$('input[name="<portlet:namespace/>destinazioneAltroIntervento"]').prop('disabled', false); |
|
|
|
$('input[name="<portlet:namespace/>destinazioneAltroIntervento"]').prop('disabled', false); |
|
|
|
else |
|
|
|
else |
|
|
|
$('input[name="<portlet:namespace/>destinazioneAltroIntervento"]').prop('disabled', true); |
|
|
|
$('input[name="<portlet:namespace/>destinazioneAltroIntervento"]').prop('disabled', true); |
|
|
|
}, 100); |
|
|
|
}, 100); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
var agMin = parseFloat("<%= territorio.getAgMin() %>"), |
|
|
|
|
|
|
|
agMax = parseFloat("<%= territorio.getAgMax() %>"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _this = $(this), |
|
|
|
|
|
|
|
checked = _this.prop('checked'), |
|
|
|
|
|
|
|
sibling, sibling_hidden; |
|
|
|
|
|
|
|
if(_this.attr('id')=="<portlet:namespace/>normDpr01DepCheckbox"){ |
|
|
|
|
|
|
|
sibling = $("#<portlet:namespace/>normDpr02DepCheckbox"); |
|
|
|
|
|
|
|
sibling_hidden = $("#<portlet:namespace/>normDpr02Dep"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if(_this.attr('id')=="<portlet:namespace/>normDpr02DepCheckbox"){ |
|
|
|
|
|
|
|
sibling = $("#<portlet:namespace/>normDpr01DepCheckbox"); |
|
|
|
|
|
|
|
sibling_hidden = $("#<portlet:namespace/>normDpr01Dep"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if(_this.attr('id')=="<portlet:namespace/>normDpr02AutCheckbox"){ |
|
|
|
|
|
|
|
sibling = $("#<portlet:namespace/>normDpr01AutCheckbox"); |
|
|
|
|
|
|
|
sibling_hidden = $("#<portlet:namespace/>normDpr01Aut"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if(_this.attr('id')=="<portlet:namespace/>normDpr02AutCheckbox"){ |
|
|
|
|
|
|
|
sibling = $("#<portlet:namespace/>normDpr01AutCheckbox"); |
|
|
|
|
|
|
|
sibling_hidden = $("#<portlet:namespace/>normDpr01Aut"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(_this.is(":checked")){ |
|
|
|
|
|
|
|
sibling.prop("checked", false); |
|
|
|
|
|
|
|
sibling_hidden.val(false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
</script> |
|
|
|
</script> |
|
|
|
<script type="text/javascript" > |
|
|
|
|
|
|
|
var agMin = parseFloat("<%=territorio.getAgMin()%>"), |
|
|
|
|
|
|
|
agMax = parseFloat("<%=territorio.getAgMax()%>"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#<portlet:namespace/>ag').keypress(function (e) { |
|
|
|
|
|
|
|
if (e.which != 8 && e.which != 0 && (e.which < 44 || e.which > 57)) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (e.keyCode == 8){ |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#<portlet:namespace/>ag').keyup(function(e) { |
|
|
|
|
|
|
|
if (e.keyCode == 8){ |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
if(matching($(this).val())){ |
|
|
|
|
|
|
|
var value = range($(this).val(), agMin, agMax); |
|
|
|
|
|
|
|
$(this).val(value); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
$(this).val($(this).val().substr(0, $(this).val().length-1)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
$('#<portlet:namespace/>ag').change(function(e) { |
|
|
|
|
|
|
|
if (e.keyCode == 8){ |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
var value = range($(this).val(), agMin, agMax); |
|
|
|
|
|
|
|
$(this).val(value); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#<portlet:namespace/>ag').change(function(e) { |
|
|
|
|
|
|
|
if (e.keyCode == 8) { |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
var value = range($(this).val(), agMin, agMax); |
|
|
|
|
|
|
|
$(this).val(value); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function matching(val){ |
|
|
|
|
|
|
|
var match = val.match(/[0-9]+[\.,\,]?[0-9]*/g); |
|
|
|
|
|
|
|
return match != null && val == match[0]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function range(val, min, max){ |
|
|
|
|
|
|
|
if ( parseFloat(val) > max) { |
|
|
|
|
|
|
|
return max; |
|
|
|
|
|
|
|
} else if ( parseFloat(val) < min) { |
|
|
|
|
|
|
|
return min; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return val; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
<script type="text/javascript" > |
|
|
|
<script type="text/javascript" > |
|
|
|
Liferay.provide( |
|
|
|
Liferay.provide( |
|
|
|
window, |
|
|
|
window, |
|
|
|