sito per le richieste......
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

735 righe
28 KiB

<%@page import="it.tref.liferay.portos.bo.service.ControlloPraticaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.DettPraticaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.DettPratica"%>
<%@page import="com.liferay.portal.model.User"%>
<%@page import="com.liferay.portal.service.UserLocalServiceUtil"%>
<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%>
<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%>
<%@page import="javax.portlet.PortletMode"%>
<%@page import="com.liferay.portal.model.GroupConstants"%>
<%@page import="com.liferay.portal.model.Group"%>
<%@page import="com.liferay.portal.util.PortletKeys"%>
<%@page import="javax.portlet.PortletRequest"%>
<%@page import="javax.portlet.PortletURL"%>
<%@page import="com.liferay.portlet.PortletURLFactoryUtil"%>
<%@page import="com.liferay.portal.service.LayoutLocalServiceUtil"%>
<%@page import="com.liferay.portal.service.GroupLocalServiceUtil"%>
<%@page import="com.liferay.portal.kernel.workflow.WorkflowTask"%>
<%@page import="it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil"%>
<%@page import="com.liferay.portal.kernel.util.DateFormatFactoryUtil"%>
<%@page import="java.util.Date"%>
<%@page import="com.liferay.portal.util.PortalUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.DocPratica"%>
<%@page import="java.util.List"%>
<%@page import="it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil"%>
<%@page import="com.liferay.portal.kernel.util.StringPool"%>
<%@page import="it.nextmind.liferay.portos.advanced.operation.util.AdvancedOperationUtil"%>
<%@page import="com.liferay.portal.kernel.workflow.WorkflowHandlerUtil"%>
<%@page import="com.liferay.portal.kernel.util.Validator"%>
<%@page import="it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.IntPratica"%>
<%@page import="com.liferay.portal.kernel.util.ParamUtil"%>
<%@ include file="/html/init.jsp"%>
<%
long intPraticaId = ParamUtil.getLong(request, "intPraticaId");
String numeroProgetto = ParamUtil.getString(request, "numeroProgetto", StringPool.BLANK);
boolean isBrokenUO = ParamUtil.getBoolean(request, "brokenUO", false);
List<IntPratica> brokenUOList = null;
int brokenUOnum = 0;
if(isBrokenUO){
brokenUOList = AdvancedOperationUtil.getBrokenUOList();
brokenUOnum = brokenUOList.size();
if(brokenUOnum > 20){
brokenUOList = brokenUOList.subList(0, 20);
}
}
IntPratica intPratica = IntPraticaLocalServiceUtil.fetchIntPratica(intPraticaId);
%>
<liferay-portlet:actionURL
name="findIntPratica"
var="findIntPraticaURL" >
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<aui:container id="adv-operation-portlet">
<aui:row>
<liferay-ui:error key="nessuna-pratica-trovata" message="Nessuna pratica trovata" />
<liferay-ui:error key="operazione-impossibile" message="Impossibile eseguire questa azione su questa Pratica" />
<liferay-ui:error key="operazione-non-permessa" message="Non ha i permessi per effettuare questa operazione" />
<liferay-ui:error key="operazione-non-riuscita" message="Errore imprevisto durante l'operazione" />
</aui:row>
<h1>Gestisci pratica</h1>
<aui:row style="margin-top: 10px">
<aui:col span="12">
<aui:row style="font-weight: bold; font-size: 18px; margin-bottom: 10px;">
Form per trovare una pratica
</aui:row>
<aui:form action="<%= findIntPraticaURL %>" method="post" name="fmFindIntPratica">
<aui:row style="font-weight: bold; font-size: 18px; margin-bottom: 10px;">
<aui:col span="3">
<aui:input name="intPraticaId" label="IntPraticaId:" inlineLabel="left">
<aui:validator name="number" />
</aui:input>
</aui:col>
<aui:col span="3">
<aui:input name="numeroProgetto" label="Numero progetto:" inlineLabel="left">
<aui:validator name="number" />
</aui:input>
</aui:col>
<aui:col span="2">
<aui:button
name="trovaPraticaBtn"
type="submit"
value="Trova Pratica" />
</aui:col>
</aui:row>
</aui:form>
<aui:row>
<liferay-portlet:renderURL varImpl="brokenUOURL" />
<aui:form action="<%= brokenUOURL %>" name="brokenUOfm">
<aui:input name="brokenUO" type="hidden" value="<%= true %>"></aui:input>
<aui:button
name="brokenUOBtn"
type="submit"
value="Trova Problemi Unit<EFBFBD> Operative" />
</aui:form>
</aui:row>
</aui:col>
</aui:row>
<c:if test="<%= isBrokenUO %>">
<liferay-ui:panel title="UNITA OPERATIVE" defaultState="closed" collapsible="true" extended="true">
<aui:row>
<p>
<b>Numero IntPratica con problemi di Unit<EFBFBD> Operativa:</b>
<span id="brokenUOnum"><%= brokenUOnum %></span>
</p>
<div id="brokenUOList">
<liferay-ui:search-container emptyResultsMessage="Nessun soggetto disponibile">
<liferay-ui:search-container-results
results="<%= brokenUOList %>"
total="<%= brokenUOList.size() %>"
/>
<liferay-ui:search-container-row className="it.tref.liferay.portos.bo.model.IntPratica" modelVar="scIntPratica">
<liferay-ui:search-container-column-text name="ID">
<%= scIntPratica.getIntPraticaId() %>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="UNITA OPERATIVA PRATICA">
<%= scIntPratica.getUnitaOperativa() %>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="UNITA OPERATIVA ISTRUTTORE">
<%= AdvancedOperationUtil.getDestinationUO(scIntPratica) %>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-jsp path="/html/brokenUOactions.jsp" />
</liferay-ui:search-container-row>
<liferay-ui:search-iterator paginate="false" />
</liferay-ui:search-container>
</div>
</aui:row>
</liferay-ui:panel>
</c:if>
<% if(Validator.isNotNull(intPratica)){ %>
<aui:row style="margin-top: 10px" id="praticaAdminDiv">
<aui:row id="praticaRecapDiv">
<aui:row>
<aui:col span="3">
<p style="font-size: 30px; margin: 20px 0;">
<b>Pratica:</b> <%= intPraticaId %>
</p>
</aui:col>
</aui:row>
<aui:row>
<div class="module-group">
<liferay-ui:panel title="DETTAGLI" collapsible="false" extended="true">
<aui:row>
<aui:col span="2">
<p><b>Numero Progetto:</b> <%= intPratica.getNumeroProgetto() %></p>
</aui:col>
<aui:col span="2">
<p><b>Username:</b> <%= intPratica.getUserName() %></p>
</aui:col>
<aui:col span="2">
<p><b>Tipo Pratica:</b> <%= intPratica.getTipoPratica() %></p>
</aui:col>
<aui:col span="2">
<p><b>ID Territorio:</b> <%= intPratica.getTerritorioId() %></p>
</aui:col>
</aui:row>
<aui:row>
<aui:col span="2">
<p><b>Tipo Procedura:</b> <%= intPratica.getTipoProcedura() %></p>
</aui:col>
<aui:col span="2">
<p><b>Stato Pratica:</b> <%= intPratica.getStatoPratica() %></p>
</aui:col>
<aui:col span="2">
<p><b>Validata:</b> <%= intPratica.getValidata() %></p>
</aui:col>
<aui:col span="2">
<p><b>Esito Controllo:</b> <%= intPratica.getEsitoControllo() %></p>
</aui:col>
</aui:row>
<aui:row>
<aui:col span="2">
<p><b>Status:</b>
<aui:workflow-status status="<%= intPratica.getStatus() %>"></aui:workflow-status>
(<%= intPratica.getStatus() %>)
</p>
</aui:col>
</aui:row>
<aui:row>
<div style="display:flex;">
<% if(AdvancedOperationUtil.isStatoPraticaIN(intPratica)){ %>
<aui:col span="3">
<liferay-portlet:actionURL
name="fixStatusPratica"
var="fixStatusPraticaURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
String functionStatus = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"fixStatusPratica','Sei sicuro di voler modificare lo status di questa pratica?')";
%>
<aui:form action="<%= fixStatusPraticaURL %>" method="post" name="fixStatusPratica">
<aui:button
type="button"
cssClass="btn-primary"
name="fixStatusPraticaBtn"
onClick='<%= functionStatus %>'
value="Fixa lo STATUS"
>
</aui:button>
</aui:form>
</aui:col>
<% } %>
<% if(AdvancedOperationUtil.hasDettPratica(intPraticaId)
&& !AdvancedOperationUtil.evalInt_Dett_UserID(intPratica)){
%>
<div style="margin-right: 50px;">
<liferay-portlet:actionURL
name="fixUserID"
var="fixUserIDURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
String functionFixUserID = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"fixUserID','Sei sicuro di voler cambiare lo User dell'ultimo dettPratica?')";
%>
<aui:form action="<%= fixUserIDURL %>" method="post" name="fixCollaudoStatico">
<aui:button
name="fixUserIDBtn"
cssClass="btn-primary"
type="button"
value="FIXA User ID"
onClick='<%= functionFixUserID %>'/>
</aui:form>
</div>
<% } %>
<% if(AdvancedOperationUtil.isPraticaAnnullata(intPratica)){ %>
<aui:col span="3">
<liferay-portlet:actionURL
name="ripristinaPraticaVidimata"
var="ripristinaPraticaVidimataURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
String functionRipristinaVidimata = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"ripristinaPraticaVidimata','Sei sicuro di voler ripristinare questa pratica come VIDIMATA?')";
%>
<aui:form action="<%= ripristinaPraticaVidimataURL %>" method="post" name="ripristinaPraticaVidimata">
<aui:button
type="button"
cssClass="btn-primary"
name="ripristinaPraticaVidimataBtn"
onClick='<%= functionRipristinaVidimata %>'
value="Ripristina come VIDIMATA"
>
</aui:button>
</aui:form>
</aui:col>
<aui:col span="3">
<liferay-portlet:actionURL
name="ripristinaPraticaConforme"
var="ripristinaPraticaConformeURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
String functionRipristinaConforme = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"ripristinaPraticaConforme','Sei sicuro di voler ripristinare questa pratica come AUTORIZZATA/CONFORME?')";
%>
<aui:form action="<%= ripristinaPraticaConformeURL %>" method="post" name="ripristinaPraticaConforme">
<aui:button
type="button"
cssClass="btn-primary"
name="ripristinaPraticaConformeBtn"
onClick='<%= functionRipristinaConforme %>'
value="Ripristina come AUTORIZZATA/CONFORME"
>
</aui:button>
</aui:form>
</aui:col>
<% } %>
</div>
</aui:row>
</liferay-ui:panel>
</div>
<div class="module-group">
<liferay-ui:panel title="REINDICIZZAZIONE" extended="true" collapsible="false">
<aui:row>
<liferay-portlet:actionURL
name="reindexPratica"
var="reindexPraticaURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
String functionReindex = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"reindexPratica','Sei sicuro di voler reindicizzare questa pratica?')";
%>
<aui:form action="<%= reindexPraticaURL %>" method="post" name="reindexPratica">
<aui:button
type="button"
cssClass="btn-primary"
name="reindexPraticaBtn"
onClick='<%= functionReindex %>'
value="Reindicizza Pratica"
>
</aui:button>
</aui:form>
</aui:row>
</liferay-ui:panel>
</div>
<% if(AdvancedOperationUtil.evalUO(intPratica)){ %>
<div class="module-group">
<liferay-ui:panel title="UNITA OPERATIVA" extended="true" collapsible="false">
<aui:row>
<aui:col span="3">
<p><b>UO pratica</b> <%= intPratica.getUnitaOperativa() %></p>
</aui:col>
<aui:col span="3">
<p><b>UO istruttore:</b> <%= AdvancedOperationUtil.getDestinationUO(intPratica) %></p>
</aui:col>
</aui:row>
<aui:row>
<liferay-portlet:actionURL
name="fixUO"
var="fixUOURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
String functionfixUO = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"fixUO','Sei sicuro di voler cambiare l unita operativa di questa pratica?')";
%>
<aui:form action="<%= fixUOURL %>" method="post" name="fixUO">
<aui:button
type="button"
cssClass="btn-primary"
name="fixUOBtn"
onClick='<%= functionfixUO %>'
value="Fixa l'unita operativa"
>
</aui:button>
</aui:form>
</aui:row>
</liferay-ui:panel>
</div>
<% } %>
<div class="module-group">
<liferay-ui:panel title="IMPERSONAMENTO" extended="true" collapsible="false">
<aui:row>
<div style="display:flex;">
<liferay-security:doAsURL
doAsUserId="<%= intPratica.getUserId() %>"
var="impersonateUserURL">
</liferay-security:doAsURL>
<div style=" margin-right: 15px;">
<p><b>Impersona titolare:</b></p>
</div>
<liferay-ui:icon
image="impersonate_user"
target="_blank"
url="<%= impersonateUserURL %>">
</liferay-ui:icon>
</div>
</aui:row>
<% if(SoggettoLocalServiceUtil.countByIntPratica(intPraticaId) > 1){ %>
<aui:row>
<div style="display:flex;">
<div style=" margin-right: 15px;">
<p><b>Impersona soggetti:</b></p>
</div>
<liferay-ui:icon
id="impersonaSoggettiBtn"
image="team_icon"
message="Visualizza Soggetti"
target="_blank"
>
</liferay-ui:icon>
</div>
</aui:row>
<aui:row>
<div id="sc-soggetti-da-impersonare" class="hide">
<liferay-ui:search-container emptyResultsMessage="Nessun soggetto disponibile">
<liferay-ui:search-container-results
results="<%= SoggettoLocalServiceUtil.findByIntPratica(intPraticaId) %>"
total="<%= SoggettoLocalServiceUtil.countByIntPratica(intPraticaId) %>"
/>
<liferay-ui:search-container-row className="it.tref.liferay.portos.bo.model.Soggetto" modelVar="soggetto">
<liferay-security:doAsURL
doAsUserId="<%= soggetto.getUserId() %>"
var="impersonateSoggettoURL">
</liferay-security:doAsURL>
<liferay-ui:search-container-column-text name="RUOLO">
<%= soggetto.getFullTipologiaSoggetto() %>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="DENOMINAZIONE">
<%= soggetto.getDescrizioneCompleta() %>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="AGGIUNTO DA">
<%
DettPratica adding = DettPraticaLocalServiceUtil.fetchDettPratica(soggetto.getDettPraticaId());
if (adding != null) {
out.print(adding.getFullDescription());
}
%>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="IMPERSONA" cssClass="text-center text-nowrap">
<liferay-ui:icon
image="impersonate_user"
message="Impersona Soggetto"
target="_blank"
url="<%= impersonateSoggettoURL %>"
>
</liferay-ui:icon>
</liferay-ui:search-container-column-text>
</liferay-ui:search-container-row>
<liferay-ui:search-iterator paginate="false" />
</liferay-ui:search-container>
</div>
</aui:row>
<% } %>
</liferay-ui:panel>
</div>
<div class="module-group">
<%
List<WorkflowTask> listaTask = AdvancedOperationUtil.getListaTask(intPratica);
if(Validator.isNotNull(listaTask) && !listaTask.isEmpty()){
long currentAssigneeId = AdvancedOperationUtil.getCurrentAssignee(intPratica);
%>
<liferay-ui:panel title="GESTIONE ATTIVIT<EFBFBD>" extended="true" collapsible="false">
<aui:row>
<div style="display:flex;">
<div style=" margin-right: 15px;">
<p><b>Gestisci ultima attivit<EFBFBD>:</b></p>
</div>
<%
Group controlPanelGroup = GroupLocalServiceUtil.getGroup(company.getCompanyId(), GroupConstants.CONTROL_PANEL);
long controlPanelPlid = LayoutLocalServiceUtil.getDefaultPlid(controlPanelGroup.getGroupId(),true);
PortletURL workflowTaskURL = PortletURLFactoryUtil.create(request, PortletKeys.MY_WORKFLOW_TASKS,
controlPanelPlid, PortletRequest.RENDER_PHASE);
workflowTaskURL.setParameter("struts_action", "/my_workflow_tasks/edit_workflow_task");
workflowTaskURL.setParameter("workflowTaskId", String.valueOf(listaTask.get(0).getWorkflowTaskId()));
workflowTaskURL.setPortletMode(PortletMode.VIEW);
workflowTaskURL.setWindowState(LiferayWindowState.POP_UP);
%>
<div title='<%= LanguageUtil.get(pageContext,"workflow-action-manage") %>' class="tooltip-info">
<liferay-ui:icon
useDialog="true"
image="action_right"
message="Gestisci Attivit<EFBFBD>"
url='<%= workflowTaskURL.toString() + "&controlPanelCategory=my" %>'
/>
</div>
</div>
</aui:row>
<%
if(intPratica.getStatusByUserId() >= 0L ){
User tecnico = UserLocalServiceUtil.fetchUser(intPratica.getStatusByUserId());
if (Validator.isNotNull(tecnico)) {
%>
<aui:row>
<div style="display:flex;">
<liferay-security:doAsURL
doAsUserId="<%= tecnico.getUserId() %>"
var="impersonateIstruttoreURL">
</liferay-security:doAsURL>
<div style=" margin-right: 15px;">
<p><b>Impersona Istruttore:</b></p>
</div>
<liferay-ui:icon
image="impersonate_user"
target="_blank"
message="Impersona Istruttore"
url="<%= impersonateIstruttoreURL %>">
</liferay-ui:icon>
</div>
<c:if test="<%= AdvancedOperationUtil.evalCurrentAssignee(intPratica, tecnico) %>">
<%
String currentAssigneeName = StringPool.BLANK;
if(currentAssigneeId > 0L){
currentAssigneeName = UserLocalServiceUtil.getUser(currentAssigneeId).getFullName();
}
String cambiaIstruttoreMsg = currentAssigneeId != 0 ? "Pratica attualmente assegnata a " + currentAssigneeName : "Pratica attualmente senza assegnatario";
String cambiaIstruttoreBtnLabelPrefix = currentAssigneeId != 0 ? "Riassegna" : "Assegna";
%>
<div>
<liferay-portlet:actionURL
name="cambiaIstruttore"
var="cambiaIstruttoreURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="istruttoreId" value="<%= String.valueOf(tecnico.getUserId()) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<%
String functionCambiaIstruttore = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"cambiaIstruttore','Sei sicuro di voler riassegnare la pratica all istruttore?')";
%>
<aui:form action="<%= cambiaIstruttoreURL %>" method="post" name="cambiaIstruttore">
<aui:button
type="button"
cssClass="btn-primary"
name="cambiaIstruttoreBtn"
onClick="<%= functionCambiaIstruttore %>"
value='<%= cambiaIstruttoreBtnLabelPrefix + " Pratica a " + tecnico.getFullName() %>'
>
</aui:button>
<span>
(<%= cambiaIstruttoreMsg %>)
</span>
</aui:form>
</div>
</c:if>
</aui:row>
<%
}
}
%>
</liferay-ui:panel>
<%
}
%>
</div>
</aui:row>
<aui:row id="docPraticaDiv">
<div class="module-group">
<liferay-ui:panel title="DOCUMENTI ORFANI" collapsible="false" extended="true">
<%
List<DocPratica> docPraticaList = DocPraticaLocalServiceUtil.findByIntPratica(intPraticaId);
%>
<h2>Documenti Totali: <%= docPraticaList.size() %></h2>
<%
List<DocPratica> docPraticaOrfaniList = AdvancedOperationUtil.getDocPraticaOrfani(intPraticaId);
if(!docPraticaOrfaniList.isEmpty()){
%>
<liferay-portlet:actionURL
name="deleteDocPratica"
var="deleteDocPraticaURL" >
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"/>
<liferay-portlet:param name="mvcPath" value="/html/view.jsp"/>
</liferay-portlet:actionURL>
<aui:row>
<h2>Documenti orfani di DettPratica: <%= docPraticaOrfaniList.size() %></h2>
<aui:row>
<aui:col span="2">
<h3>DlFileEntryId</h3>
</aui:col>
<aui:col span="2">
<h3>docPraticaId</h3>
</aui:col>
<aui:col span="2">
<h3>dettPraticaId</h3>
</aui:col>
<aui:col span="6">
<h3>FileName</h3>
</aui:col>
</aui:row>
<%
for(DocPratica docPratica : docPraticaOrfaniList){
if(Validator.isNotNull(docPratica)){
%>
<aui:row>
<aui:col span="2">
<p><%= docPratica.getDlFileEntryId() %></p>
</aui:col>
<aui:col span="2">
<p><%= docPratica.getDocPraticaId() %></p>
</aui:col>
<aui:col span="2">
<p><%= docPratica.getClassPk() %></p>
</aui:col>
<aui:col span="6">
<p><%= docPratica.getFileName() %></p>
</aui:col>
</aui:row>
<%
}
}
%>
<%
String functionEliminaDoc = "javascript:"+renderResponse.getNamespace()+"openConfirmationDialog('"+renderResponse.getNamespace()+"deleteDocPratica','Sei sicuro di voler eliminare tutti i documenti?')";
%>
<aui:form action="<%= deleteDocPraticaURL %>" method="post" name="deleteDocPratica">
<aui:button-row>
<aui:button
type="button"
name="deleteDocPraticaBtn"
cssClass="btn-primary"
onClick='<%= functionEliminaDoc %>'
value="Elimina tutti">
</aui:button>
</aui:button-row>
</aui:form>
</aui:row>
</liferay-ui:panel>
</div>
<%
}
%>
</aui:row>
</aui:row>
</aui:row>
<% } %>
</aui:container>
<div id ='<%= renderResponse.getNamespace()+"confirmationModal" %>'>
</div>
<div id ='<%= renderResponse.getNamespace()+"confirmationModalDiv" %>' class="hide" style="display:block;">
</div>
<div id="<portlet:namespace/>gestioneAttivitaId">
<liferay-util:include page="/html/altri_task.jsp">
<liferay-util:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>"></liferay-util:param>
</liferay-util:include>
<%-- <jsp:include page='/html/altri_task.jsp'/> --%>
</div>
<aui:script use="event-valuechange,aui-modal,aui-io-request">
/*
var getBrokenUO = function (url) {
A.io.request(url, {
on: {
success: function () {
var responseData = this.get('responseData');
var brokenUOList = JSON.parse(responseData);
var brokenUOnum = Object.keys(intPraticaList).length;
A.one('#brokenUOnum').text(brokenUOnum);
if(0 < brokenUOnum){
$each(brokenUOList, function(i, value){
var rowId = createRow(A.one('#brokenUOList'), value.id);
createCol(rowId, 'UO', value.UO);
createCol(rowId, 'UO', value.UO);
createCol(rowId, 'destUO', value.destUO);
});
};
},
},
});
};
var createRow = function(container, UOid){
var id = 'brokenUO-'+ UOid ;
container.append('<aui:row id="'+ id +'"></aui:row>');
return id;
};
var createCol = function(container, colName, colVal){
container.append('<aui:col span="2" id="brokenUO-'colName + '">' +
'<p><b>'+ colName +':</b> '+ colVal +'</p>' +
'</aui:col>');
};
A.one('#brokenUOBtn').on('click', function(){
this.preventDefault();
var url = this.attr('href');
// getBrokenUO(url);
});
*/
<% if(Validator.isNotNull(intPratica)){ %>
A.one('#impersonaSoggettiBtn').on('click', function(){
var soggettoDiv = A.one('#sc-soggetti-da-impersonare');
if(soggettoDiv.hasClass('hide')){
soggettoDiv.show();
} else {
soggettoDiv.hide();
}
});
<% } %>
A.one('#<portlet:namespace />intPraticaId').on('valuechange', function(e){
if(e.newVal <= 0 ){
A.one('#<portlet:namespace />numeroProgetto').attr('disabled', false);
} else {
A.one('#<portlet:namespace />numeroProgetto').attr('disabled', true);
A.one('#<portlet:namespace />numeroProgetto').val('');
}
});
A.one('#<portlet:namespace />numeroProgetto').on('valuechange', function(e){
if(e.newVal == "" ){
A.one('#<portlet:namespace />intPraticaId').attr('disabled', false);
} else {
A.one('#<portlet:namespace />intPraticaId').attr('disabled', true);
A.one('#<portlet:namespace />intPraticaId').val('');
}
});
Liferay.provide(
window,
"<portlet:namespace />openConfirmationDialog",
function(formName, text){
A.one('#<portlet:namespace />confirmationModalDiv').html('<p>'+text+'</p>');
var modal = new A.Modal(
{
centered: true,
bodyContent: A.one('#<portlet:namespace />confirmationModalDiv'),
destroyOnHide: false,
headerContent: '<h3>Conferma azione</h3>',
modal: true,
render: '#<portlet:namespace />confirmationModal',
visible: false,
close: false
}
).render();
modal.addToolbar(
[
{
label: 'Annulla e torna indietro',
on: {
click: function() {
A.one('#<portlet:namespace />confirmationModalDiv').hide();
modal.hide();
}
}
},
{
label: 'Conferma azione',
on: {
click: function() {
modal.hide();
var form = Liferay.Form.get(formName).form;
submitForm(form);
}
}
}
]
);
A.one('#<portlet:namespace />confirmationModalDiv').show();
modal.show();
}
);
</aui:script>