diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/add_richiesta.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/add_richiesta.jsp index 5d699aaa..8cf3c7de 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/add_richiesta.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/add_richiesta.jsp @@ -88,7 +88,7 @@ - + @@ -118,7 +118,7 @@
- +
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/view_richiesta_popup.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/view_richiesta_popup.jsp index c6c17bd7..d16f9b34 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/view_richiesta_popup.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_bo/view_richiesta_popup.jsp @@ -78,7 +78,7 @@ String docUrl = DLUtil.getPreviewURL(fileEntryDoc, fileEntryDoc.getFileVersion(), themeDisplay, StringPool.BLANK, false, true); %>
- Documento di identità: <%=fileEntryDoc.getTitle() %> + Documento di identità: <%=fileEntryDoc.getTitle() %>
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/richiedi-atto.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/richiedi-atto.jsp index 3c804481..4670abc8 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/richiedi-atto.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/richiedi-atto.jsp @@ -72,7 +72,7 @@ boolean isNoCNSUser = UserLocalServiceUtil.hasRoleUser(roleNoCNS.getRoleId(), th - + @@ -103,7 +103,7 @@ boolean isNoCNSUser = UserLocalServiceUtil.hasRoleUser(roleNoCNS.getRoleId(), th
- +
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/richiesta-inviata-success.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/richiesta-inviata-success.jsp index 9dffe647..ba036176 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/richiesta-inviata-success.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/richiesta-inviata-success.jsp @@ -3,7 +3,7 @@
-

La tua richiesta è stata acquisita con successo. Verrai contattato alla mail da te indicata non appena la tua richiesta verrà presa in gestione.

+

La tua richiesta è stata acquisita con successo. Verrai contattato alla mail da te indicata non appena la tua richiesta verrà presa in gestione.

diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/view.jsp index d6c4b299..f015186a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/view.jsp @@ -9,7 +9,7 @@ boolean loggedUser = themeDisplay.isSignedIn();
- Per accedere a questa funzionalità bisogna essere loggati al portale. + Per accedere a questa funzionalità bisogna essere loggati al portale.
diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/visualizza-atto.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/visualizza-atto.jsp index 2768cc48..27d4ec6b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/visualizza-atto.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/accesso_atti_fe/visualizza-atto.jsp @@ -1399,7 +1399,7 @@ RichiestaAccessoAtti accettoAtti = RichiestaAccessoAttiLocalServiceUtil.getRichi

- Questo fascicolo non è disponibile sotto forma digitale. Potrà ritirare una copia cartacea presso uno degli Uffici del Settore Sismica. + Questo fascicolo non è disponibile sotto forma digitale. Potrà ritirare una copia cartacea presso uno degli Uffici del Settore Sismica.

diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/creazione_account/success.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/creazione_account/success.jsp index cc0ba11f..d841c51c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/creazione_account/success.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/creazione_account/success.jsp @@ -3,7 +3,7 @@
-

La tua registrazione è andata a buon fine. Clicca qui per autenticarti al sistema.

+

La tua registrazione è andata a buon fine. Clicca qui per autenticarti al sistema.

diff --git a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/creazione_account/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/creazione_account/view.jsp index 2e3681d6..fb91975b 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/creazione_account/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-accesso-atti-portlet/docroot/html/creazione_account/view.jsp @@ -1,7 +1,7 @@ <%@include file="../init.jsp" %> - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaPortlet.java index 97720568..d3ea3d80 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaPortlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/GestioneAttivitaPortlet.java @@ -365,7 +365,7 @@ public class GestioneAttivitaPortlet extends MVCPortlet { || cmd.equals("exportRicercaAltreAttivita") || cmd.equals("exportRicercaAttivitaConcluse")) { csv = exportSearch(locale, resourceRequest, user, cmd); } - // ADT BUG BO ID= 1 SEZIONE ATTIVIT� + // ADT BUG BO ID= 1 SEZIONE ATTIVITÀ if ("comuniForUfficio".equals(id)) { String ufficio = ParamUtil.getString(resourceRequest, "ufficioId"); JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java index 40782a75..e73c32cc 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/ComuneLocalServiceImpl.java @@ -332,7 +332,7 @@ public class ComuneLocalServiceImpl extends ComuneLocalServiceBaseImpl { return comuni; } - //ADT BUG BO ID = 1 SEZIONE ATTIVIT� + //ADT BUG BO ID = 1 SEZIONE ATTIVITÀ public List getComuniForOrganizationByUserIdUfficioId(long userId, long ufficioId) throws SystemException { List comuni = new ArrayList(); diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java index 1c56a916..ee273c97 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/DettPraticaLocalServiceImpl.java @@ -2013,7 +2013,7 @@ public class DettPraticaLocalServiceImpl extends DettPraticaLocalServiceBaseImpl // } else { // tagNames.add(TagsPraticaValue.getTagsLabelMap().get(StatoPraticaConstants.RIFIUTATA)); // } - // // pratica indica se � stata variata + // // pratica indica se è stata variata // if (intPratica.getVariataDa() != 0l) { // tagNames.add(TagsPraticaValue.getTagsLabelMap().get(StatoPraticaConstants.VARIATA)); // } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/amministrazione.jsp b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/amministrazione.jsp index 41d1262f..07442bd9 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/amministrazione.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/amministrazione.jsp @@ -244,11 +244,11 @@ String dataFine = ParamUtil.getString(request, "dataFineRicerca","");
- - - - - + + + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/gestione_disponibilita.jsp b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/gestione_disponibilita.jsp index dfc31ced..14f50275 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/gestione_disponibilita.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-calendar-appointments-portlet/docroot/html/calendar_appointments/tabs/gestione_disponibilita.jsp @@ -43,7 +43,7 @@ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
- +
@@ -156,7 +156,7 @@ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
- +
@@ -262,7 +262,7 @@ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
- +
@@ -283,7 +283,7 @@ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); className="it.tref.portos.calendar.appointments.model.Disponibilita" modelVar="disponibilita" > - + <% out.print(sdfGiorno.format(disponibilita.getStartDate()) + " dalle " + sdfOra.format(disponibilita.getStartDate()) + " alle " + sdfOra.format(disponibilita.getEndDate())); %> @@ -327,7 +327,7 @@ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
- + @@ -394,7 +394,7 @@ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); out.print(funzionario.getFullName()); %> - + <% out.print(sdfGiorno.format(disponibilita.getStartDate()) + " dalle " + sdfOra.format(disponibilita.getStartDate()) + " alle " + sdfOra.format(disponibilita.getEndDate())); %> diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/FascicoloFePortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/FascicoloFePortlet.java index 99fa7300..a268681d 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/FascicoloFePortlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/fe/portlet/FascicoloFePortlet.java @@ -713,7 +713,7 @@ public class FascicoloFePortlet extends MVCPortlet { DettPratica dettPratica = DettPraticaServiceUtil.addDettPraticaClonedToIntPratica(intPraticaId, lastDettPratica.getDettPraticaId(), TipoIntegrazioneUtil.VARIANTE, serviceContext); - // successURL gia'� presente in actionResponse + // successURL già presente in actionResponse // successURL = // HttpUtil.addParameter(successURL, actionResponse.getNamespace() + // "mvcPath", diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/render_history_form_task.jsp b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/render_history_form_task.jsp index 054e3171..601b3558 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/render_history_form_task.jsp +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/render_history_form_task.jsp @@ -1,38 +1,37 @@ - -<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%> -<%@page import="java.io.Serializable"%> -<%@page import="java.util.Map.Entry"%> -<%@page import="java.util.ArrayList"%> - -<%@ include file="/html/portlet/workflow_instances/init.jsp" %> - -<% - -Map parameters = (Map) renderRequest.getAttribute("parameters"); - -%> - - - - - - - - - <%=LanguageUtil.get(pageContext, (String)entry.getKey()) %> - - - - <%= entry.getValue() %> - - - - - - +<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%> +<%@page import="java.io.Serializable"%> +<%@page import="java.util.Map.Entry"%> +<%@page import="java.util.ArrayList"%> + +<%@ include file="/html/portlet/workflow_instances/init.jsp" %> + +<% + +Map parameters = (Map) renderRequest.getAttribute("parameters"); + +%> + + + + + + + + + <%=LanguageUtil.get(pageContext, (String)entry.getKey()) %> + + + + <%= entry.getValue() %> + + + + + + \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_logs.jspf b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_logs.jspf index 2a652389..92e16945 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_logs.jspf +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_logs.jspf @@ -1,316 +1,316 @@ -<%-- -/** - * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ ---%> - - -<%@page import="com.liferay.portal.kernel.json.JSONException"%> -<%@page import="com.liferay.portal.kernel.util.Validator"%> -<%@page import="com.liferay.portal.kernel.json.JSONFactoryUtil"%> -<%@page import="com.liferay.portal.kernel.json.JSONObject"%> -<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%> - - - -> - - - - - - - - - -<% - -//ADT: bug bo id=33 -Map historyWorkflowEsitiLogs = (Map)request.getAttribute("historyWorkflowEsitiLogs"); - -for (WorkflowLog workflowLog : workflowLogs) { - Role curRole = null; - User curUser = null; - String actorName = null; - - if (workflowLog.getRoleId() != 0) { - curRole = RoleLocalServiceUtil.getRole(workflowLog.getRoleId()); - actorName = curRole.getDescriptiveName(); - } - else if (workflowLog.getUserId() != 0) { - curUser = UserLocalServiceUtil.getUser(workflowLog.getUserId()); - actorName = curUser.getFullName(); - } - String kaleoNodeName = null; - String transitionName = null; - - try { - JSONObject jsonObject = JSONFactoryUtil.createJSONObject(workflowLog.getState()); - kaleoNodeName = jsonObject.getString("kaleoNodeName"); - transitionName = jsonObject.getString("transitionName"); - } catch (JSONException e) { - kaleoNodeName = workflowLog.getState(); - } - -%> - - - - - - - - - - - - - - - - - <%--
- - - - -
- -
-
--%> - -<% -} -%> - -
DataDescrizioneAttivitàCommento
- <%= dateFormatDateTime.format(workflowLog.getCreateDate()) %> - - - - -
- - - - - - - <% - //ADT: bug bo id=33 - String esito = (String)request.getAttribute("registra-esito-value"); - if (historyWorkflowEsitiLogs!=null&& historyWorkflowEsitiLogs.containsKey(workflowLog.getWorkflowLogId()) ){ - esito=historyWorkflowEsitiLogs.get(workflowLog.getWorkflowLogId()); - } - %> - - - - <% - String assegna = (String)request.getAttribute("assegna-value"); - %> - - - - - - - - - - - - - - -   - - - -
-
- -
- -
-
- -
- -
-
- - - -
- -
-
- - - <% - if (curRole == null) { - String assignerName = PortalUtil.getUserName(workflowLog.getAuditUserId(), StringPool.BLANK); - %> - -
- - - - - -
- - <% - } - else { - %> - -
- -
- - <% - } - %> - -
-
-
-
-
- <% - if(Validator.isNotNull(kaleoNodeName)){ - out.print(kaleoNodeName); - if(Validator.isNotNull(transitionName)){ - if("registra-esito".equalsIgnoreCase(transitionName)){ - //out.print(" ( " + (String)request.getAttribute("registra-esito-value") + " ) "); - //ADT BUG BO ID=33 - String esito = (String)request.getAttribute("registra-esito-value"); - if (historyWorkflowEsitiLogs!=null&& historyWorkflowEsitiLogs.containsKey(workflowLog.getWorkflowLogId()) ){ - esito=historyWorkflowEsitiLogs.get(workflowLog.getWorkflowLogId()); - } - out.print(" ( " + esito + " ) "); - - - } else if("assegna".equalsIgnoreCase(transitionName)){ - out.print(" ( " + (String)request.getAttribute("assegna-value") + " ) "); - } - - } - } - %> - - - -
-
-

<%= dateFormatDateTime.format(workflowLog.getCreateDate()) %>

-

- - <%= curUser.getFullName() %> - -

-
-
- <%= HtmlUtil.escape(workflowLog.getComment()) %> -
-
-
- -
- - - - \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_task_action.jsp b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_task_action.jsp index 86754a63..fb02468f 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_task_action.jsp +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_instances/workflow_task_action.jsp @@ -1,259 +1,259 @@ -<%-- -/** - * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ ---%> - -<%@ include file="/html/portlet/workflow_instances/init.jsp" %> - -<% -String randomId = StringUtil.randomId(); - -ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); - -WorkflowTask workflowTask = (WorkflowTask)row.getObject(); -%> - - - - - - - - - - - - - - - - - <% - List transitionNames = WorkflowTaskManagerUtil.getNextTransitionNames(company.getCompanyId(), user.getUserId(), workflowTask.getWorkflowTaskId()); - - for (String transitionName : transitionNames) { - String message = "proceed"; - - if (Validator.isNotNull(transitionName)) { - message = transitionName; - } - %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <% - Map data = new HashMap(); - - data.put("href-validation", validationURL); - data.put("href-render-form", renderFormURL); - %> - - - - <% - } - %> - - - -
- <%-- hook tref-ekaleo --%> -
-
- -
- - - var showPopup = function(url, title, renderFormURL, validationURL) { - var form = A.Node.create('
'); - - form.setAttribute('action', url); - form.setAttribute('method', 'POST'); - - var comments = A.one('#<%= randomId %>updateComments'); - - if (comments) { - form.append(comments); - - comments.show(); - } - - // reset - var formDiv = A.one('#<%= randomId %>form'); - if (formDiv) { - formDiv.empty(); - } - var formErrorDiv = A.one('#<%= randomId %>formError'); - if (formErrorDiv) { - formErrorDiv.empty(); - } - - var dialog = Liferay.Util.Window.getWindow( - { - dialog: { - bodyContent: form, - height: 620, - toolbars: { - footer: [ - { - label: Liferay.Language.get('ok'), - on: { - click: function() { - if (!validationURL) { - submitForm(form); - } else { - A.one('#<%= randomId %>formError').empty(); - A.io.request(validationURL, { - method: 'POST', - dataType: 'json', - on: { - start: function() { - A.one('#<%= randomId %>updateComments').loadingmask.show(); - A.all('.modal-footer').each(function(item, index, collection) { - item.all('button').each(function(item, index, collection) { - item.set('disabled', true); - item.setStyle('opacity', 0.5); - }); - }); - }, - complete: function() { - A.one('#<%= randomId %>updateComments').loadingmask.hide(); - }, - success: function() { - var responseData = this.get('responseData'); - if (responseData.valid) { - submitForm(form); - } else { - var message = "
" + Liferay.Language.get(responseData.message) + "
"; - A.one('#<%= randomId %>formError').html(message); - } - A.all('.modal-footer').each(function(item, index, collection) { - item.all('button').each(function(item, index, collection) { - item.set('disabled', false); - item.setStyle('opacity', 1); - }); - }); - } - } - }); - } - } - } - }, - { - label: Liferay.Language.get('cancel'), - on: { - click: function() { - dialog.hide(); - } - } - } - ] - }, - width: 550 - }, - title: title - } - ); - - A.one('#<%= randomId %>updateComments').plug(A.LoadingMask, {}); - - A.io.request(renderFormURL, { - dataType: 'html', - on: { - start: function() { - A.one('#<%= randomId %>updateComments').loadingmask.show(); - A.all('.modal-footer').each(function(item, index, collection) { - item.all('button').each(function(item, index, collection) { - item.set('disabled', true); - item.setStyle('opacity', 0.5); - }); - }); - }, - complete: function() { - A.one('#<%= randomId %>updateComments').loadingmask.hide(); - }, - success: function() { - var contentNode = A.one('#<%= randomId %>form'); - contentNode.html(this.get('responseData')); - A.all('.modal-footer').each(function(item, index, collection) { - item.all('button').each(function(item, index, collection) { - item.set('disabled', false); - item.setStyle('opacity', 1); - }); - }); - } - } - }); - }; - - A.all('.workflow-task-<%= randomId %> a').on( - 'click', - function(event) { - event.preventDefault(); - - var icon = event.currentTarget; - var title = icon.text(); - - var renderFormURL = icon.attr('data-href-render-form'); - var validationURL = icon.attr('data-href-validation'); - - showPopup(icon.attr('href'), title, renderFormURL, validationURL); - } - ); +<%-- +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ +--%> + +<%@ include file="/html/portlet/workflow_instances/init.jsp" %> + +<% +String randomId = StringUtil.randomId(); + +ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); + +WorkflowTask workflowTask = (WorkflowTask)row.getObject(); +%> + + + + + + + + + + + + + + + + + <% + List transitionNames = WorkflowTaskManagerUtil.getNextTransitionNames(company.getCompanyId(), user.getUserId(), workflowTask.getWorkflowTaskId()); + + for (String transitionName : transitionNames) { + String message = "proceed"; + + if (Validator.isNotNull(transitionName)) { + message = transitionName; + } + %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <% + Map data = new HashMap(); + + data.put("href-validation", validationURL); + data.put("href-render-form", renderFormURL); + %> + + + + <% + } + %> + + + +
+ <%-- hook tref-ekaleo --%> +
+
+ +
+ + + var showPopup = function(url, title, renderFormURL, validationURL) { + var form = A.Node.create(''); + + form.setAttribute('action', url); + form.setAttribute('method', 'POST'); + + var comments = A.one('#<%= randomId %>updateComments'); + + if (comments) { + form.append(comments); + + comments.show(); + } + + // reset + var formDiv = A.one('#<%= randomId %>form'); + if (formDiv) { + formDiv.empty(); + } + var formErrorDiv = A.one('#<%= randomId %>formError'); + if (formErrorDiv) { + formErrorDiv.empty(); + } + + var dialog = Liferay.Util.Window.getWindow( + { + dialog: { + bodyContent: form, + height: 620, + toolbars: { + footer: [ + { + label: Liferay.Language.get('ok'), + on: { + click: function() { + if (!validationURL) { + submitForm(form); + } else { + A.one('#<%= randomId %>formError').empty(); + A.io.request(validationURL, { + method: 'POST', + dataType: 'json', + on: { + start: function() { + A.one('#<%= randomId %>updateComments').loadingmask.show(); + A.all('.modal-footer').each(function(item, index, collection) { + item.all('button').each(function(item, index, collection) { + item.set('disabled', true); + item.setStyle('opacity', 0.5); + }); + }); + }, + complete: function() { + A.one('#<%= randomId %>updateComments').loadingmask.hide(); + }, + success: function() { + var responseData = this.get('responseData'); + if (responseData.valid) { + submitForm(form); + } else { + var message = "
" + Liferay.Language.get(responseData.message) + "
"; + A.one('#<%= randomId %>formError').html(message); + } + A.all('.modal-footer').each(function(item, index, collection) { + item.all('button').each(function(item, index, collection) { + item.set('disabled', false); + item.setStyle('opacity', 1); + }); + }); + } + } + }); + } + } + } + }, + { + label: Liferay.Language.get('cancel'), + on: { + click: function() { + dialog.hide(); + } + } + } + ] + }, + width: 550 + }, + title: title + } + ); + + A.one('#<%= randomId %>updateComments').plug(A.LoadingMask, {}); + + A.io.request(renderFormURL, { + dataType: 'html', + on: { + start: function() { + A.one('#<%= randomId %>updateComments').loadingmask.show(); + A.all('.modal-footer').each(function(item, index, collection) { + item.all('button').each(function(item, index, collection) { + item.set('disabled', true); + item.setStyle('opacity', 0.5); + }); + }); + }, + complete: function() { + A.one('#<%= randomId %>updateComments').loadingmask.hide(); + }, + success: function() { + var contentNode = A.one('#<%= randomId %>form'); + contentNode.html(this.get('responseData')); + A.all('.modal-footer').each(function(item, index, collection) { + item.all('button').each(function(item, index, collection) { + item.set('disabled', false); + item.setStyle('opacity', 1); + }); + }); + } + } + }); + }; + + A.all('.workflow-task-<%= randomId %> a').on( + 'click', + function(event) { + event.preventDefault(); + + var icon = event.currentTarget; + var title = icon.text(); + + var renderFormURL = icon.attr('data-href-render-form'); + var validationURL = icon.attr('data-href-validation'); + + showPopup(icon.attr('href'), title, renderFormURL, validationURL); + } + );
\ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/edit_workflow_task.jsp b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/edit_workflow_task.jsp index 9220df05..899a2d8d 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/edit_workflow_task.jsp +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/edit_workflow_task.jsp @@ -1,350 +1,350 @@ -<%-- -/** - * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ ---%> - -<%@page import="com.liferay.portal.kernel.util.ParamUtil"%> -<%@ include file="/html/portlet/workflow_tasks/init.jsp" %> - -<% -String randomId = StringUtil.randomId(); - -String redirect = ParamUtil.getString(request, "redirect"); - - -WorkflowTask workflowTask = (WorkflowTask)request.getAttribute(WebKeys.WORKFLOW_TASK); - -WorkflowInstance workflowInstance = WorkflowInstanceManagerUtil.getWorkflowInstance(company.getCompanyId(), workflowTask.getWorkflowInstanceId()); - -Map workflowContext = workflowInstance.getWorkflowContext(); - -long companyId = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_COMPANY_ID)); -long groupId = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_GROUP_ID)); -String className = (String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_NAME); -long classPK = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK)); - -WorkflowHandler workflowHandler = WorkflowHandlerRegistryUtil.getWorkflowHandler(className); - -AssetRenderer assetRenderer = workflowHandler.getAssetRenderer(classPK); -AssetRendererFactory assetRendererFactory = workflowHandler.getAssetRendererFactory(); - -AssetEntry assetEntry = null; - -if (assetRenderer != null) { - assetEntry = assetRendererFactory.getAssetEntry(assetRendererFactory.getClassName(), assetRenderer.getClassPK()); -} - -String headerTitle = LanguageUtil.get(pageContext, workflowTask.getName()); - -headerTitle = headerTitle.concat(StringPool.COLON + StringPool.SPACE + workflowHandler.getTitle(classPK, locale)); - -boolean showEditURL = false; - -if ((workflowTask.getAssigneeUserId() == user.getUserId()) && !workflowTask.isCompleted()) { - showEditURL = true; -} - -PortletURL editPortletURL = workflowHandler.getURLEdit(classPK, liferayPortletRequest, liferayPortletResponse); - -String viewFullContentURLString = null; - -if (assetRenderer.isPreviewInContext()) { - viewFullContentURLString = assetRenderer.getURLViewInContext((LiferayPortletRequest)renderRequest, (LiferayPortletResponse)renderResponse, null); -} -else { - PortletURL viewFullContentURL = renderResponse.createRenderURL(); - - viewFullContentURL.setParameter("struts_action", "/workflow_tasks/view_content"); - viewFullContentURL.setParameter("redirect", currentURL); - - if (assetEntry != null) { - viewFullContentURL.setParameter("assetEntryId", String.valueOf(assetEntry.getEntryId())); - viewFullContentURL.setParameter("assetEntryVersionId", String.valueOf(classPK)); - } - - if (assetRendererFactory != null) { - viewFullContentURL.setParameter("type", assetRendererFactory.getType()); - } - - viewFullContentURL.setParameter("showEditURL", String.valueOf(showEditURL)); - viewFullContentURL.setParameter("workflowAssetPreview", Boolean.TRUE.toString()); - - viewFullContentURLString = viewFullContentURL.toString(); -} - -request.setAttribute(WebKeys.WORKFLOW_ASSET_PREVIEW, Boolean.TRUE); -%> - -<%-- - - - ---%> - -
-
-

Gestione Attività

-
- -
-
- - -
- - - -
- - - - - - - - - - - -
- -
- - - - - -
-
- - - - -
- -
- - - - - -
- - - <%= workflowTask.getDescription() %> - -
-
- - - - - <% - String path = workflowHandler.render(classPK, renderRequest, renderResponse, AssetRenderer.TEMPLATE_ABSTRACT); - - request.setAttribute(WebKeys.ASSET_RENDERER, assetRenderer); - request.setAttribute(WebKeys.ASSET_PUBLISHER_ABSTRACT_LENGTH, 200); - %> - - - - <%= workflowHandler.getSummary(classPK, locale) %> - - - - - - - - - - - <% - List logTypes = new ArrayList(); - - logTypes.add(WorkflowLog.TASK_ASSIGN); - logTypes.add(WorkflowLog.TASK_COMPLETION); - logTypes.add(WorkflowLog.TASK_UPDATE); - logTypes.add(WorkflowLog.TRANSITION); - - List workflowLogs = WorkflowLogManagerUtil.getWorkflowLogsByWorkflowInstance(company.getCompanyId(), workflowTask.getWorkflowInstanceId(), logTypes, QueryUtil.ALL_POS, QueryUtil.ALL_POS, WorkflowComparatorFactoryUtil.getLogCreateDateComparator(true)); - %> - - <%@ include file="/html/portlet/workflow_instances/workflow_logs.jspf" %> - - - - - - -
- -
-
- -
- -

Azioni

-
-
- - <% - request.removeAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); - %> - - - - - - - -
-
- - - - - - - - - - - var onTaskClickFn = A.rbind('onTaskClick', Liferay.WorkflowTasks, ''); - - Liferay.delegateClick('<%= randomId %>taskAssignToMeLink', onTaskClickFn); - Liferay.delegateClick('<%= randomId %>taskAssignLink', onTaskClickFn); -<%-- Liferay.delegateClick('<%= randomId %>taskDueDateLink', onTaskClickFn); --%> - - -<% -PortalUtil.addPortletBreadcrumbEntry(request, headerTitle, currentURL); +<%-- +/** + * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ +--%> + +<%@page import="com.liferay.portal.kernel.util.ParamUtil"%> +<%@ include file="/html/portlet/workflow_tasks/init.jsp" %> + +<% +String randomId = StringUtil.randomId(); + +String redirect = ParamUtil.getString(request, "redirect"); + + +WorkflowTask workflowTask = (WorkflowTask)request.getAttribute(WebKeys.WORKFLOW_TASK); + +WorkflowInstance workflowInstance = WorkflowInstanceManagerUtil.getWorkflowInstance(company.getCompanyId(), workflowTask.getWorkflowInstanceId()); + +Map workflowContext = workflowInstance.getWorkflowContext(); + +long companyId = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_COMPANY_ID)); +long groupId = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_GROUP_ID)); +String className = (String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_NAME); +long classPK = GetterUtil.getLong((String)workflowContext.get(WorkflowConstants.CONTEXT_ENTRY_CLASS_PK)); + +WorkflowHandler workflowHandler = WorkflowHandlerRegistryUtil.getWorkflowHandler(className); + +AssetRenderer assetRenderer = workflowHandler.getAssetRenderer(classPK); +AssetRendererFactory assetRendererFactory = workflowHandler.getAssetRendererFactory(); + +AssetEntry assetEntry = null; + +if (assetRenderer != null) { + assetEntry = assetRendererFactory.getAssetEntry(assetRendererFactory.getClassName(), assetRenderer.getClassPK()); +} + +String headerTitle = LanguageUtil.get(pageContext, workflowTask.getName()); + +headerTitle = headerTitle.concat(StringPool.COLON + StringPool.SPACE + workflowHandler.getTitle(classPK, locale)); + +boolean showEditURL = false; + +if ((workflowTask.getAssigneeUserId() == user.getUserId()) && !workflowTask.isCompleted()) { + showEditURL = true; +} + +PortletURL editPortletURL = workflowHandler.getURLEdit(classPK, liferayPortletRequest, liferayPortletResponse); + +String viewFullContentURLString = null; + +if (assetRenderer.isPreviewInContext()) { + viewFullContentURLString = assetRenderer.getURLViewInContext((LiferayPortletRequest)renderRequest, (LiferayPortletResponse)renderResponse, null); +} +else { + PortletURL viewFullContentURL = renderResponse.createRenderURL(); + + viewFullContentURL.setParameter("struts_action", "/workflow_tasks/view_content"); + viewFullContentURL.setParameter("redirect", currentURL); + + if (assetEntry != null) { + viewFullContentURL.setParameter("assetEntryId", String.valueOf(assetEntry.getEntryId())); + viewFullContentURL.setParameter("assetEntryVersionId", String.valueOf(classPK)); + } + + if (assetRendererFactory != null) { + viewFullContentURL.setParameter("type", assetRendererFactory.getType()); + } + + viewFullContentURL.setParameter("showEditURL", String.valueOf(showEditURL)); + viewFullContentURL.setParameter("workflowAssetPreview", Boolean.TRUE.toString()); + + viewFullContentURLString = viewFullContentURL.toString(); +} + +request.setAttribute(WebKeys.WORKFLOW_ASSET_PREVIEW, Boolean.TRUE); +%> + +<%-- + + + +--%> + +
+
+

Gestione Attività

+
+ +
+
+ + +
+ + + +
+ + + + + + + + + + + +
+ +
+ + + + + +
+
+ + + + +
+ +
+ + + + + +
+ + + <%= workflowTask.getDescription() %> + +
+
+ + + + + <% + String path = workflowHandler.render(classPK, renderRequest, renderResponse, AssetRenderer.TEMPLATE_ABSTRACT); + + request.setAttribute(WebKeys.ASSET_RENDERER, assetRenderer); + request.setAttribute(WebKeys.ASSET_PUBLISHER_ABSTRACT_LENGTH, 200); + %> + + + + <%= workflowHandler.getSummary(classPK, locale) %> + + + + + + + + + + + <% + List logTypes = new ArrayList(); + + logTypes.add(WorkflowLog.TASK_ASSIGN); + logTypes.add(WorkflowLog.TASK_COMPLETION); + logTypes.add(WorkflowLog.TASK_UPDATE); + logTypes.add(WorkflowLog.TRANSITION); + + List workflowLogs = WorkflowLogManagerUtil.getWorkflowLogsByWorkflowInstance(company.getCompanyId(), workflowTask.getWorkflowInstanceId(), logTypes, QueryUtil.ALL_POS, QueryUtil.ALL_POS, WorkflowComparatorFactoryUtil.getLogCreateDateComparator(true)); + %> + + <%@ include file="/html/portlet/workflow_instances/workflow_logs.jspf" %> + + + + + + +
+ +
+
+ +
+ +

Azioni

+
+
+ + <% + request.removeAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); + %> + + + + + + + +
+
+ + + + + + + + + + + var onTaskClickFn = A.rbind('onTaskClick', Liferay.WorkflowTasks, ''); + + Liferay.delegateClick('<%= randomId %>taskAssignToMeLink', onTaskClickFn); + Liferay.delegateClick('<%= randomId %>taskAssignLink', onTaskClickFn); +<%-- Liferay.delegateClick('<%= randomId %>taskDueDateLink', onTaskClickFn); --%> + + +<% +PortalUtil.addPortletBreadcrumbEntry(request, headerTitle, currentURL); %> \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/render_form_task.jsp b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/render_form_task.jsp index c7b3072a..d9f5f703 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/render_form_task.jsp +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/render_form_task.jsp @@ -1,342 +1,341 @@ - -<%@page import="com.liferay.portal.kernel.util.MapUtil"%> -<%@page import="java.io.UnsupportedEncodingException"%> -<%@page import="org.apache.commons.codec.binary.Hex"%> -<%@page import="com.liferay.portal.kernel.util.UnicodeFormatter"%> -<%@page import="com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil"%> -<%@page import="com.liferay.portal.kernel.util.StringUtil"%> -<%@page import="org.htmlparser.Node"%> -<%@page import="org.htmlparser.tags.OptionTag"%> -<%@page import="org.htmlparser.tags.TextareaTag"%> -<%@page import="org.htmlparser.tags.InputTag"%> -<%@page import="org.htmlparser.tags.SelectTag"%> -<%@page import="org.htmlparser.tags.Div" %> -<%@page import="org.htmlparser.tags.LabelTag" %> -<%@page import="org.htmlparser.nodes.TagNode"%> -<%@page import="org.htmlparser.nodes.TextNode"%> -<%@page import="org.htmlparser.util.NodeList"%> -<%@page import="org.htmlparser.Parser"%> -<%@page import="org.htmlparser.util.ParserException"%> -<%@page import="javax.portlet.RenderResponse"%> -<%@page import="java.util.Iterator"%> -<%@page import="java.util.Map.Entry"%> -<%@page import="com.liferay.portal.kernel.util.LocaleUtil"%> -<%@page import="com.liferay.portal.kernel.util.Validator"%> -<%@page import="com.liferay.portal.kernel.util.ParamUtil"%> -<%@page import="java.util.Set"%> -<%@page import="java.util.Locale"%> -<%@page import="com.liferay.portlet.dynamicdatamapping.storage.StorageEngineUtil"%> -<%@page import="com.liferay.portlet.dynamicdatamapping.storage.Fields"%> -<%@page import="com.liferay.portlet.dynamicdatalists.model.DDLRecordSet"%> -<%@page import="com.liferay.portlet.dynamicdatalists.service.DDLRecordSetServiceUtil"%> -<%@page import="com.liferay.portlet.dynamicdatalists.model.DDLRecordVersion"%> -<%@page import="com.liferay.portal.kernel.bean.BeanParamUtil"%> -<%@page import="com.liferay.portlet.dynamicdatalists.model.DDLRecord"%> -<%@page import="com.liferay.portal.kernel.util.StringPool"%> -<%@page import="com.liferay.portlet.dynamicdatamapping.model.DDMStructure"%> -<%@page import="com.liferay.portlet.dynamicdatamapping.model.DDMTemplate"%> - -<%@ include file="/html/portlet/workflow_tasks/init.jsp" %> - - -<% - String classPkForCarichiLavoro = (String) renderRequest.getAttribute("classPkForCarichiLavoro"); -%> - -
- - - - - Visualizza Carichi di Lavoro Istruttori -
-
- -<% - -long ddmTemplateId = (Long) renderRequest.getAttribute("ddmTemplateId"); -long ddmStructureId = (Long) renderRequest.getAttribute("ddmStructureId"); -Map parameters = (Map) renderRequest.getAttribute("parameters"); -String prefix = (String) renderRequest.getAttribute("prefix"); -String suffix = (String) renderRequest.getAttribute("suffix"); -Map>> fieldNameOptions - = (Map>>) renderRequest.getAttribute("fieldNameOptions"); - -String redirect = StringPool.BLANK; - -DDLRecord record = null; - -long recordId = BeanParamUtil.getLong(record, request, "recordId"); - -DDLRecordVersion recordVersion = null; - -if (record != null) { - recordVersion = record.getLatestRecordVersion(); -} - -DDMStructure ddmStructure = DDMStructureLocalServiceUtil.getDDMStructure(ddmStructureId); - -Fields fields = null; - -if (recordVersion != null) { - fields = StorageEngineUtil.getFields(recordVersion.getDDMStorageId()); -} - -Locale[] availableLocales = new Locale[0]; - -if (fields != null) { - Set availableLocalesSet = fields.getAvailableLocales(); - - availableLocales = availableLocalesSet.toArray(new Locale[availableLocalesSet.size()]); -} - -String defaultLanguageId = StringPool.BLANK; - -if (Validator.isNull(defaultLanguageId)) { - defaultLanguageId = themeDisplay.getLanguageId(); - - if (fields != null) { - defaultLanguageId = LocaleUtil.toLanguageId(fields.getDefaultLocale()); - } -} - -String languageId = defaultLanguageId; - -boolean translating = false; - -if (!defaultLanguageId.equals(languageId)) { - translating = true; -} - -if (translating) { - redirect = currentURL; -} - -long classNameId = PortalUtil.getClassNameId(DDMStructure.class); - -long classPK = ddmStructure.getStructureId(); - -if (ddmTemplateId > 0) { - classNameId = PortalUtil.getClassNameId(DDMTemplate.class); - - classPK = ddmTemplateId; -} -%> - - - - - -<%= normalize(html, parameters, fieldNameOptions, renderResponse, prefix, suffix) %> - -<%! -private String normalize(String html, Map parameters, - Map>> fieldNameOptions, - RenderResponse renderResponse, String prefix, String suffix) { - - if (Validator.isNull(html)) { - return StringPool.BLANK; - } - - // replace portlet namespace + random namespace - html = html.replaceAll("name=\"" + renderResponse.getNamespace(), "name=\""); - - try { - - Parser parser = Parser.createParser(html, StringPool.UTF8); - NodeList nodeList = (NodeList) parser.parse(null); - - for (int i = 0; i < nodeList.size(); i++) { - filter(nodeList.elementAt(i), parameters, fieldNameOptions, prefix, suffix); - } - - html = nodeList.toHtml(); - - } catch (ParserException e) { - } - - // add prefix + suffix - html = html.replaceAll("name=\"(.*?)\"", "name=\"" + prefix + "$1" + suffix + "\""); - - // ignore ddm fields display - html = html.replaceAll("name=\"" + prefix + "_fieldsDisplay" + suffix, "name=\"_fieldsDisplay\""); - - return html; -} - -private void filter(Node node, Map parameters, - Map>> fieldNameOptions, - String prefix, String suffix) { - - if (node != null) { - - if (node instanceof SelectTag || node instanceof InputTag || node instanceof TextareaTag) { - - TagNode tag = (TagNode) node; - - String name = tag.getAttribute("name"); - - String namespace = getNamespace(node); - if (Validator.isNotNull(namespace)) { - name = name.replaceAll(namespace, StringPool.BLANK); - tag.setAttribute("name", name); - } - - String value = null; - - if (parameters.containsKey(name)) { - - value = parameters.get(name).toString(); - - if (node instanceof TextareaTag) { - if (node.getChildren() != null && node.getChildren().size() > 0) { - TextNode text = (TextNode) node.getChildren().elementAt(0); - text.setText(value); - } else { - NodeList nodeList = new NodeList(); - nodeList.add(new TextNode(value)); - node.setChildren(nodeList); - } - } else if (tag instanceof SelectTag) { - if (node.getChildren() != null && node.getChildren().size() > 0) { - for (int i = 0; i < node.getChildren().size(); i++) { - if (node.getChildren().elementAt(i) instanceof OptionTag) { - TagNode optionTag = (TagNode) node.getChildren().elementAt(i); - String optionValue = optionTag.getAttribute("value"); - optionValue = replaceHex(optionValue); - String[] values = StringUtil.split(value, StringPool.COMMA); - for (String v : values) { - if (StringUtil.trim(v).equals(optionValue)) { - optionTag.setAttribute("selected", "selected"); - } - } - } - } - } - } else { - String type = tag.getAttribute("type"); - if (type.equals("checkbox")) { - value = parameters.get( - StringUtil.replace(name, "Checkbox", StringPool.BLANK)).toString(); - if (value.equalsIgnoreCase("true")) { - tag.setAttribute("checked", "checked"); - } - } else if (type.equals("radio")) { - String valueInput = tag.getAttribute("value"); - valueInput = replaceHex(valueInput); - if (value.equals(valueInput)) { - tag.setAttribute("checked", "checked"); - } - } else { - tag.setAttribute("value", value, '"'); - } - } - } - - // select singolo o multiplo senza opzioni fisse - if (tag instanceof SelectTag) { - List> options = fieldNameOptions.get(name); - if (options != null && !options.isEmpty()) { - NodeList optionsTag = new NodeList(); - for (Map option : options) { - String label = MapUtil.getString(option, "label"); - String valueOption = MapUtil.getString(option, "value"); - boolean defaultValue = MapUtil.getBoolean(option, "default"); - // new option - OptionTag optionTag = new OptionTag(); - optionTag.setAttribute("value", valueOption, '"'); - if (defaultValue && !parameters.containsKey(name)) { - optionTag.setAttribute("selected", "selected"); - } else if (Validator.isNotNull(value) && value.equals(valueOption)) { - optionTag.setAttribute("selected", "selected"); - } - TextNode textNode = new TextNode(label); - NodeList nodeList = new NodeList(); - nodeList.add(textNode); - optionTag.setChildren(nodeList); - optionsTag.add(optionTag); - } - tag.setChildren(optionsTag); - } - } else if ("radio".equals(tag.getAttribute("type"))) { - List> options = fieldNameOptions.get(name); - if(options!=null){ - for (Map option : options) { - String label = MapUtil.getString(option, "label"); - String valueOption = MapUtil.getString(option, "value"); - boolean defaultValue = MapUtil.getBoolean(option, "default"); - if(tag.getAttribute("value").equals(valueOption)){ - tag.getNextSibling().setText(label); - } - } - } - } - } - - if (node.getChildren() != null) { - for (int i = 0; i < node.getChildren().size(); i++) { - filter(node.getChildren().elementAt(i), parameters, fieldNameOptions, prefix, suffix); - } - } - } -} - -private String getNamespace(Node node) { - - String namespace = null; - boolean trovato = false; - Node parent = node.getParent(); - - while (!trovato && parent != null) { - if (parent instanceof TagNode) { - TagNode tag = (TagNode) parent; - String dataFieldNamespace = tag.getAttribute("data-fieldnamespace"); - if (Validator.isNotNull(dataFieldNamespace)) { - trovato = true; - namespace = dataFieldNamespace; - } - } - if (!trovato) { - parent = parent.getParent(); - } - } - - return namespace; -} - -private String replaceHex(String s) { - - final String prefix = "&#x"; - final String suffix = ";"; - - int index = 0; - - while (true) { - int i = s.indexOf(prefix, index); - if (i < 0) { - break; - } else { - int j = s.indexOf(suffix, i); - if (j < 0) { - break; - } else { - String hexCode = s.substring(i, (j + 1)); - String hex = hexCode.substring(prefix.length(), hexCode.length() - 1); - try { - s = StringUtil.replace(s, hexCode, - new String(Hex.decodeHex(hex.toCharArray()), StringPool.UTF8)); - } catch (Exception e) {} - index = i; - } - } - } - - return s; -} +<%@page import="com.liferay.portal.kernel.util.MapUtil"%> +<%@page import="java.io.UnsupportedEncodingException"%> +<%@page import="org.apache.commons.codec.binary.Hex"%> +<%@page import="com.liferay.portal.kernel.util.UnicodeFormatter"%> +<%@page import="com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil"%> +<%@page import="com.liferay.portal.kernel.util.StringUtil"%> +<%@page import="org.htmlparser.Node"%> +<%@page import="org.htmlparser.tags.OptionTag"%> +<%@page import="org.htmlparser.tags.TextareaTag"%> +<%@page import="org.htmlparser.tags.InputTag"%> +<%@page import="org.htmlparser.tags.SelectTag"%> +<%@page import="org.htmlparser.tags.Div" %> +<%@page import="org.htmlparser.tags.LabelTag" %> +<%@page import="org.htmlparser.nodes.TagNode"%> +<%@page import="org.htmlparser.nodes.TextNode"%> +<%@page import="org.htmlparser.util.NodeList"%> +<%@page import="org.htmlparser.Parser"%> +<%@page import="org.htmlparser.util.ParserException"%> +<%@page import="javax.portlet.RenderResponse"%> +<%@page import="java.util.Iterator"%> +<%@page import="java.util.Map.Entry"%> +<%@page import="com.liferay.portal.kernel.util.LocaleUtil"%> +<%@page import="com.liferay.portal.kernel.util.Validator"%> +<%@page import="com.liferay.portal.kernel.util.ParamUtil"%> +<%@page import="java.util.Set"%> +<%@page import="java.util.Locale"%> +<%@page import="com.liferay.portlet.dynamicdatamapping.storage.StorageEngineUtil"%> +<%@page import="com.liferay.portlet.dynamicdatamapping.storage.Fields"%> +<%@page import="com.liferay.portlet.dynamicdatalists.model.DDLRecordSet"%> +<%@page import="com.liferay.portlet.dynamicdatalists.service.DDLRecordSetServiceUtil"%> +<%@page import="com.liferay.portlet.dynamicdatalists.model.DDLRecordVersion"%> +<%@page import="com.liferay.portal.kernel.bean.BeanParamUtil"%> +<%@page import="com.liferay.portlet.dynamicdatalists.model.DDLRecord"%> +<%@page import="com.liferay.portal.kernel.util.StringPool"%> +<%@page import="com.liferay.portlet.dynamicdatamapping.model.DDMStructure"%> +<%@page import="com.liferay.portlet.dynamicdatamapping.model.DDMTemplate"%> + +<%@ include file="/html/portlet/workflow_tasks/init.jsp" %> + + +<% + String classPkForCarichiLavoro = (String) renderRequest.getAttribute("classPkForCarichiLavoro"); +%> + +
+ + + + + Visualizza Carichi di Lavoro Istruttori +
+
+ +<% + +long ddmTemplateId = (Long) renderRequest.getAttribute("ddmTemplateId"); +long ddmStructureId = (Long) renderRequest.getAttribute("ddmStructureId"); +Map parameters = (Map) renderRequest.getAttribute("parameters"); +String prefix = (String) renderRequest.getAttribute("prefix"); +String suffix = (String) renderRequest.getAttribute("suffix"); +Map>> fieldNameOptions + = (Map>>) renderRequest.getAttribute("fieldNameOptions"); + +String redirect = StringPool.BLANK; + +DDLRecord record = null; + +long recordId = BeanParamUtil.getLong(record, request, "recordId"); + +DDLRecordVersion recordVersion = null; + +if (record != null) { + recordVersion = record.getLatestRecordVersion(); +} + +DDMStructure ddmStructure = DDMStructureLocalServiceUtil.getDDMStructure(ddmStructureId); + +Fields fields = null; + +if (recordVersion != null) { + fields = StorageEngineUtil.getFields(recordVersion.getDDMStorageId()); +} + +Locale[] availableLocales = new Locale[0]; + +if (fields != null) { + Set availableLocalesSet = fields.getAvailableLocales(); + + availableLocales = availableLocalesSet.toArray(new Locale[availableLocalesSet.size()]); +} + +String defaultLanguageId = StringPool.BLANK; + +if (Validator.isNull(defaultLanguageId)) { + defaultLanguageId = themeDisplay.getLanguageId(); + + if (fields != null) { + defaultLanguageId = LocaleUtil.toLanguageId(fields.getDefaultLocale()); + } +} + +String languageId = defaultLanguageId; + +boolean translating = false; + +if (!defaultLanguageId.equals(languageId)) { + translating = true; +} + +if (translating) { + redirect = currentURL; +} + +long classNameId = PortalUtil.getClassNameId(DDMStructure.class); + +long classPK = ddmStructure.getStructureId(); + +if (ddmTemplateId > 0) { + classNameId = PortalUtil.getClassNameId(DDMTemplate.class); + + classPK = ddmTemplateId; +} +%> + + + + + +<%= normalize(html, parameters, fieldNameOptions, renderResponse, prefix, suffix) %> + +<%! +private String normalize(String html, Map parameters, + Map>> fieldNameOptions, + RenderResponse renderResponse, String prefix, String suffix) { + + if (Validator.isNull(html)) { + return StringPool.BLANK; + } + + // replace portlet namespace + random namespace + html = html.replaceAll("name=\"" + renderResponse.getNamespace(), "name=\""); + + try { + + Parser parser = Parser.createParser(html, StringPool.UTF8); + NodeList nodeList = (NodeList) parser.parse(null); + + for (int i = 0; i < nodeList.size(); i++) { + filter(nodeList.elementAt(i), parameters, fieldNameOptions, prefix, suffix); + } + + html = nodeList.toHtml(); + + } catch (ParserException e) { + } + + // add prefix + suffix + html = html.replaceAll("name=\"(.*?)\"", "name=\"" + prefix + "$1" + suffix + "\""); + + // ignore ddm fields display + html = html.replaceAll("name=\"" + prefix + "_fieldsDisplay" + suffix, "name=\"_fieldsDisplay\""); + + return html; +} + +private void filter(Node node, Map parameters, + Map>> fieldNameOptions, + String prefix, String suffix) { + + if (node != null) { + + if (node instanceof SelectTag || node instanceof InputTag || node instanceof TextareaTag) { + + TagNode tag = (TagNode) node; + + String name = tag.getAttribute("name"); + + String namespace = getNamespace(node); + if (Validator.isNotNull(namespace)) { + name = name.replaceAll(namespace, StringPool.BLANK); + tag.setAttribute("name", name); + } + + String value = null; + + if (parameters.containsKey(name)) { + + value = parameters.get(name).toString(); + + if (node instanceof TextareaTag) { + if (node.getChildren() != null && node.getChildren().size() > 0) { + TextNode text = (TextNode) node.getChildren().elementAt(0); + text.setText(value); + } else { + NodeList nodeList = new NodeList(); + nodeList.add(new TextNode(value)); + node.setChildren(nodeList); + } + } else if (tag instanceof SelectTag) { + if (node.getChildren() != null && node.getChildren().size() > 0) { + for (int i = 0; i < node.getChildren().size(); i++) { + if (node.getChildren().elementAt(i) instanceof OptionTag) { + TagNode optionTag = (TagNode) node.getChildren().elementAt(i); + String optionValue = optionTag.getAttribute("value"); + optionValue = replaceHex(optionValue); + String[] values = StringUtil.split(value, StringPool.COMMA); + for (String v : values) { + if (StringUtil.trim(v).equals(optionValue)) { + optionTag.setAttribute("selected", "selected"); + } + } + } + } + } + } else { + String type = tag.getAttribute("type"); + if (type.equals("checkbox")) { + value = parameters.get( + StringUtil.replace(name, "Checkbox", StringPool.BLANK)).toString(); + if (value.equalsIgnoreCase("true")) { + tag.setAttribute("checked", "checked"); + } + } else if (type.equals("radio")) { + String valueInput = tag.getAttribute("value"); + valueInput = replaceHex(valueInput); + if (value.equals(valueInput)) { + tag.setAttribute("checked", "checked"); + } + } else { + tag.setAttribute("value", value, '"'); + } + } + } + + // select singolo o multiplo senza opzioni fisse + if (tag instanceof SelectTag) { + List> options = fieldNameOptions.get(name); + if (options != null && !options.isEmpty()) { + NodeList optionsTag = new NodeList(); + for (Map option : options) { + String label = MapUtil.getString(option, "label"); + String valueOption = MapUtil.getString(option, "value"); + boolean defaultValue = MapUtil.getBoolean(option, "default"); + // new option + OptionTag optionTag = new OptionTag(); + optionTag.setAttribute("value", valueOption, '"'); + if (defaultValue && !parameters.containsKey(name)) { + optionTag.setAttribute("selected", "selected"); + } else if (Validator.isNotNull(value) && value.equals(valueOption)) { + optionTag.setAttribute("selected", "selected"); + } + TextNode textNode = new TextNode(label); + NodeList nodeList = new NodeList(); + nodeList.add(textNode); + optionTag.setChildren(nodeList); + optionsTag.add(optionTag); + } + tag.setChildren(optionsTag); + } + } else if ("radio".equals(tag.getAttribute("type"))) { + List> options = fieldNameOptions.get(name); + if(options!=null){ + for (Map option : options) { + String label = MapUtil.getString(option, "label"); + String valueOption = MapUtil.getString(option, "value"); + boolean defaultValue = MapUtil.getBoolean(option, "default"); + if(tag.getAttribute("value").equals(valueOption)){ + tag.getNextSibling().setText(label); + } + } + } + } + } + + if (node.getChildren() != null) { + for (int i = 0; i < node.getChildren().size(); i++) { + filter(node.getChildren().elementAt(i), parameters, fieldNameOptions, prefix, suffix); + } + } + } +} + +private String getNamespace(Node node) { + + String namespace = null; + boolean trovato = false; + Node parent = node.getParent(); + + while (!trovato && parent != null) { + if (parent instanceof TagNode) { + TagNode tag = (TagNode) parent; + String dataFieldNamespace = tag.getAttribute("data-fieldnamespace"); + if (Validator.isNotNull(dataFieldNamespace)) { + trovato = true; + namespace = dataFieldNamespace; + } + } + if (!trovato) { + parent = parent.getParent(); + } + } + + return namespace; +} + +private String replaceHex(String s) { + + final String prefix = "&#x"; + final String suffix = ";"; + + int index = 0; + + while (true) { + int i = s.indexOf(prefix, index); + if (i < 0) { + break; + } else { + int j = s.indexOf(suffix, i); + if (j < 0) { + break; + } else { + String hexCode = s.substring(i, (j + 1)); + String hex = hexCode.substring(prefix.length(), hexCode.length() - 1); + try { + s = StringUtil.replace(s, hexCode, + new String(Hex.decodeHex(hex.toCharArray()), StringPool.UTF8)); + } catch (Exception e) {} + index = i; + } + } + } + + return s; +} %> \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/workflow_task_action.jsp b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/workflow_task_action.jsp index aebc957e..12a7248f 100644 --- a/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/workflow_task_action.jsp +++ b/liferay-plugins-sdk-6.2/webs/portos-kaleo-web/docroot/META-INF/custom_jsps/html/portlet/workflow_tasks/workflow_task_action.jsp @@ -1,296 +1,296 @@ -<%-- -/** - * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; eitheistrr version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ ---%> - -<%@page import="com.liferay.portal.kernel.util.ParamUtil"%> -<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%> - -<%@ include file="/html/portlet/workflow_tasks/init.jsp" %> - -<% -String randomId = StringPool.BLANK; - -String closeRedirect = ParamUtil.getString(request, "closeRedirect"); - -//boolean canPortosAssegnatore = ParamUtil.getBoolean(request, "canPortosAssegnatore", false); -//boolean canPortosApprovatore = ParamUtil.getBoolean(request, "canPortosApprovatore", false); -//boolean canPortosIstruttore = ParamUtil.getBoolean(request, "canPortosIstruttore", false); -boolean canPortosAssegnatore = (Boolean)request.getAttribute("canPortosAssegnatore"); -boolean canPortosApprovatore = (Boolean)request.getAttribute("canPortosApprovatore"); -boolean canPortosIstruttore = (Boolean)request.getAttribute("canPortosIstruttore"); - - - -ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); - -String viewFullContentURLString = ParamUtil.getString(request, "viewFullContentURLString"); - -// ADT BUG BO ID= 27 -String classPkForCarichiLavoro=ParamUtil.getString(request, "classPkForCarichiLavoro"); - -WorkflowTask workflowTask = null; - -if (row != null) { - randomId = StringUtil.randomId(); - - workflowTask = (WorkflowTask)row.getParameter("workflowTask"); -} -else { - workflowTask = (WorkflowTask)request.getAttribute(WebKeys.WORKFLOW_TASK); -} - -long[] pooledActorsIds = WorkflowTaskManagerUtil.getPooledActorsIds(company.getCompanyId(), workflowTask.getWorkflowTaskId()); -%> - - - -
- - - -
- - - - <% - List transitionNames = WorkflowTaskManagerUtil.getNextTransitionNames(company.getCompanyId(), user.getUserId(), workflowTask.getWorkflowTaskId()); - - for (String transitionName : transitionNames) { - String message = "proceed"; - - if (Validator.isNotNull(transitionName)) { - message = transitionName; - } - %> - - <% - - //Non fa nulla ma forse tornera comodo - boolean canCose = true; - if(transitionName.equals("registra-esito") && !canPortosIstruttore){ - canCose = false; - } else if(transitionName.equals("approva") && !canPortosApprovatore){ - canCose = false; - } - - %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <% - Map data = new HashMap(); - - data.put("href-validation", validationURL); - data.put("href-render-form", renderFormURL); - %> - - - - <% - } - %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%-- - - - - - - - - - --%> -
- -<%--
- - - - <% - for (long pooledActorId : pooledActorsIds) { - if (pooledActorId == user.getUserId()) { - continue; - } - %> - - - - <% - } - %> - - - -
--%> - -
- -
- -
- -
-
- <%-- hook tref-ekaleo --%> -
-
- -
- -<%-- hook tref-ekaleo --%> - - var onTaskClickFn = A.rbind('onTaskClick', Liferay.WorkflowTasks, '<%= randomId %>'); - - - - var renderFormFn = A.rbind('renderForm', Liferay.WorkflowTasks, '<%= randomId %>'); - - <% - List transitionNames = WorkflowTaskManagerUtil.getNextTransitionNames(company.getCompanyId(), user.getUserId(), workflowTask.getWorkflowTaskId()); - - for (String transitionName : transitionNames) { - String message = "proceed"; - - if (Validator.isNotNull(transitionName)) { - message = transitionName; - } - %> - - Liferay.delegateClick('<%= randomId + transitionName %>taskChangeStatusLink', renderFormFn); - - <% - } - %> - - - - Liferay.delegateClick('<%= randomId %>taskAssignToMeLink', onTaskClickFn); - Liferay.delegateClick('<%= randomId %>taskAssignLink', onTaskClickFn); - Liferay.delegateClick('<%= randomId %>taskDueDateLink', onTaskClickFn); - - - - \ No newline at end of file