Edit C:\Windows\install\galaxie_p01_15-09\sales\interaction\read.jsp
<%@page import="com.edeal.frontline.EventBean"%> <%@page import="com.edeal.frontline.OpportunityBean"%> <%@page import="com.edeal.frontline.PersonEventBean"%> <%@page import="com.edeal.frontline.helper.InteractionBaseHelper"%> <%@page import="com.edeal.frontline.helper.InteractionBaseHelper.ContextObjectInformation"%> <%@page import="java.util.HashMap"%> <%@page import="com.edeal.frontline.ObjectsBean"%> <%@page import="com.edeal.frontline.AttachmentBean"%> <% /****************************************************************************** * Copyright (c) 2000-2013 E-DEAL * * E-DEAL S.A. * 41, rue Périer * 92120 Montrouge * France * * T: +33 (0)1 73 03 29 80 * F: +33 (0)1 73 01 69 77 * http://www.e-deal.com * * La diffusion de ce code source sous quelque forme que ce soit sans * l'autorisation de E-DEAL est interdite. * * Vous êtes autorisés à modifier ce code source uniquement pour votre usage * propre et sous réserve que les mentions de copyright demeurent intactes. * * Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou * implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour * responsable des dommages pouvant résulter de l'utilisation de ce code * source. ******************************************************************************/ %> <%@ page session="true"%> <%@ page import="com.edeal.frontline.MessagesBean" %> <%@ page import="com.edeal.frontline.FrontlineException" %> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="java.util.Date" %> <%@ page import="java.util.Vector" %> <%@ page import="java.util.Iterator" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.SalesInvestBean" %> <%@ page import="com.edeal.frontline.FlLocale" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.grid.functions.InteractionSyntaxActions" %> <%@ page import="com.edeal.frontline.helper.ContextHelper" %> <%@ taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.InteractionBean" id="Interaction" scope="request"/> <% EventBean event = (EventBean) request.getAttribute("event"); EventBean eventFromPersonEvent = (EventBean) request.getAttribute("eventFromPersonEvent"); OpportunityBean opportunity = (OpportunityBean) request.getAttribute("opportunity"); PersonEventBean personEvent = (PersonEventBean) request.getAttribute("personEvent"); final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); DataDictionary dico = context.getDataDictionary(); InteractionBaseHelper ibh = new InteractionBaseHelper(Interaction); HashMap<ObjectsBean, ContextObjectInformation> contextObjectInformation = ibh.getContextObjectInformation(); String typeInterID = ""; String typeInteraction = ""; String titreFen = ""; String codetitreFen = ""; Vector reservationsIDs = null; String resaIDs = ""; Vector todosIDs = null; String tdIDs = ""; Vector correspondancesIDs = null; String corrIDs = ""; try{ reservationsIDs = (Vector)Interaction.getCustomProperty("IntReserv_"); resaIDs = Utils.implodeList(reservationsIDs, ";"); } catch (FieldNotInitializedException e){ } try{ typeInterID = (String)Interaction.getCustomProperty("IntType_"); }catch(FieldNotInitializedException e){ typeInterID = ""; } if(typeInterID.equals(dico.getRefIdByCode("IntType_", "ACT"))){ titreFen = "Todo"; codetitreFen ="FF072"; typeInteraction = "TODO"; try{ correspondancesIDs = (Vector)Interaction.getCustomProperty("IntCorr_"); corrIDs = Utils.implodeList(correspondancesIDs, ";"); } catch (FieldNotInitializedException e){ } } else if (typeInterID.equals(dico.getRefIdByCode("IntType_", "COR"))){ titreFen = "Correspondance"; codetitreFen ="FF09A"; typeInteraction = "CORR"; try{ todosIDs = (Vector)Interaction.getCustomProperty("IntTodo_"); tdIDs = Utils.implodeList(todosIDs, ";"); } catch (FieldNotInitializedException e){ } } else { titreFen = "Interaction"; codetitreFen ="L30B2"; } String id = null; try { id = Interaction.getID(); } catch (FieldNotInitializedException fnie) { } FlLocale locale = FlLocale.getInstance(session); boolean has5columns = Interaction.hasPlaceDisplay() || Interaction.hasOperationDisplay(); Date today = new Date(); long retard = 0; Date dateInt = null; try { dateInt = Interaction.getIntDate(); retard = (today.getTime() - dateInt.getTime()) / 86400000; } catch (FieldNotInitializedException ex) { } long dureeH = 0; long dureeM = 0; Date begHour = null; Date endHour = null; try { begHour = Interaction.getIntTimeBeg(); } catch (FieldNotInitializedException ex) { } try { endHour = Interaction.getIntTimeEnd(); } catch (FieldNotInitializedException ex) { } long dureeMin = 0; if(begHour != null && endHour != null) { dureeMin = (endHour.getTime() - begHour.getTime()) / 60000; dureeH = dureeMin / 60; dureeM = dureeMin % 60; } String statusId = null; try { statusId = Interaction.getIntStiID(); } catch (FieldNotInitializedException ex) { } String status = ""; try { status = dico.getRefCode("IntStiID", statusId); } catch (FrontlineException ex) { logger.error("Error occurred during int status recovering with int status id '"+statusId+"'",ex); } //category code String catCode = null; try{ catCode = (String) dico.getRefDisp("Acv", "Te2", Interaction.getIntAtvID()); } catch (FrontlineException e){ } //category code String subCatCode = null; try{ subCatCode = (String) dico.getRefCode("Acv", null, Interaction.getIntAtvID()); } catch (FrontlineException e){ } boolean isIntExceptionalCostActive = SalesInvestBean.isIntExceptionalCostActive(context); String activite = null; try { activite = Interaction.getIntAtvID(); } catch (FieldNotInitializedException fnie) { } String cpgID = null; try { cpgID = Interaction.getIntCpgID(); } catch (FieldNotInitializedException fnie) { } String intPlace = null; try { intPlace = Interaction.getIntPlace(); } catch (FieldNotInitializedException fnie) { } Vector<String> corresList = null; try { corresList = Interaction.getIntCorID(); } catch (FieldNotInitializedException fnie) { } String intReport = null; try { intReport = Interaction.getIntReport(); } catch (FieldNotInitializedException fnie) { } intReport = intReport == null ? "" : intReport; boolean isGeoLocalized = true; try { Interaction.getIntGeoCodeStatusID(); } catch (FieldNotInitializedException e) { isGeoLocalized = false; } %> <script type="text/javascript" language="javascript"> function refreshCorDetails(id) { doAjax("<fl:webapp/>/cor_details_list_ajax.fl?id="+id, corDetailsCallBack); } function corDetailsCallBack(arrIndex) { if (eDealXmlhttpArr[arrIndex].readyState == 4) { hideWaiting(); document.getElementById("CORDETAILS").innerHTML=eDealXmlhttpArr[arrIndex].responseText; } } function refreshCorres() { _grid__CORRSLIST_js_.render(); } function refreshTodos() { _grid__TODSLIST_js_.render(); } function refreshReservs() { _grid__RESINLIST_js_.render(); } $(document).ready(function() { if (tabCorpIsFirst()) { refreshCorDetails('<%= id %>'); } }); function tabCorpIsFirst() { return InteractionTabs_divIds[0] == 'CORDETAILS'; } function sendInvitation() { <% if (corresList != null && !corresList.isEmpty()) { %> window.open('<fl:webapp/>/popup_templates_mail.fl?objSql=Interaction&objID=<%= id %>', 'EMAIL', 'menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=700,height=350'); <% } %> } function doOnLoad() { <%if(typeInteraction.equals("CORR")){ %> refreshTodos(); <%} else if (typeInteraction.equals("TODO")){%> refreshCorres(); <% } %> } <% if(request.getParameter("downloadFusion")!=null) { %> $(document).ready(function () { window.setTimeout("window.location=\"<%= request.getParameter("downloadFusion") %>\"", 3000); }); <% } %> </script> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <!-- CSS of listAjax_car_details.jsp in order to don't include them in innerHTML via Ajax, because IE doesn't apply them --> <style type="text/css"> .intReport { border: 1px solid #9EC6D0; padding : 0px 10px 0px 10px; margin-top: 5px; min-height: 20px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; overflow: auto; } </style> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, codetitreFen, titreFen) %>"ou="<%= \"/read_interaction.fl\" + (id != null ? \"?id=\" + id : \"\") %>"> <table class="container" cellpadding="0"> <tr> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel"><fl:label field="IntDate"/></td> <td nowrap="nowrap"> <fl:getProperty name="Interaction" property="IntDate" alt=" "/> </td> <td> <% if (Interaction.hasTimePeriodDisplay()) { String begHourS = Utils.formatToWebTime(session, begHour, true); String endHourS = Utils.formatToWebTime(session, endHour, true); boolean isMorning = false; boolean isAfternoon = false; boolean isAllDay = false; if ("08:30:00".equals(begHourS) && "12:00:00".equals(endHourS)) { isMorning = true; } else if ("14:00:00".equals(begHourS) && "17:30:00".equals(endHourS)) { isAfternoon = true; } else if ("08:30:00".equals(begHourS) && "17:30:00".equals(endHourS)) { isAllDay = true; } if (isMorning) { %> <fl:getMessage code="L62AC" alt="matin"/> <% } else if (isAfternoon) { %> <fl:getMessage code="F60AC" alt="après-midi"/> <% } else if (isAllDay) { %> <fl:getMessage code="L62AD" alt="Toute la journée"/> <% } %> </td> </tr> <%} else { if(typeInteraction.equals("CORR")){%> <fl:fieldRead property="IntCatID"/> <%}%> <fl:fieldRead property="IntTimeBeg" format="HH:mm"/> <fl:fieldRead property="IntTimeEnd" format="HH:mm"/> <% } %> <tr class="ligne_separation"><td></td></tr> <tr class="ligne_separation"><td></td></tr> <%---------------------- Tester s'il faut afficher la liste des correspondants en dehors du cas d'une TODO------------------------%> <% String correspondents = ""; if(typeInteraction.equals("CORR")){ correspondents = InteractionSyntaxActions.getIntCorrespondentHtml(session,context,id); %> <tr class="fieldline"> <td class="dataLabel" id="IntCorID_label"><fl:label field="IntCorID"/></td> <td class="dataValue" id="IntCorID_value"> <div> <%=correspondents%> </div> </td> </tr> <fl:fieldRead property="IntTiersConc_" separator="<br>" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_enterprise.fl\") %>"/> <%} %> <tr class="ligne_separation"><td></td></tr> <%---------------------- Seulement si c'est une TODO------------------------%> <% if(typeInteraction.equals("TODO")){%> <fl:fieldRead property="IntPrevMail_" valueCodeIfTrue="L2005" valueCodeIfFalse="L2006"/> <%}%> <%---------------------- Seulement si c'est une TODO------------------------%> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="container" cellpadding="0"> <fl:fieldRead property="IntTheme_"/> <fl:fieldRead property="IntSubject"/> <tr class="ligne_separation"><td></td></tr> <fl:fieldRead property="IntActID" separator="<br>" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_actor.fl\") %>"/> <tr class="fieldLine"> <fl:fieldRead property="IntStiID"/> </tr> </table> </td> </tr> <fl:notes name="IntNotes_" title="<%= Utils.getMessage(session, \"F2024\", \"Notes\") %>" nbPix="32"><fl:getProperty name="Interaction" property="IntNotes_" alt=""/></fl:notes> <fl:smallTabs name="InteractionTabs"> <%---------------------- Seulement si c'est une TODO------------------------%> <% if(typeInteraction.equals("TODO")){%> <fl:sTab id="STab1" title="Correspondances" onselect="refreshCorres();"> <fl:grid name="CORRSLIST" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=CORRSLIST&IntID=\" + corrIDs %>" /> </fl:sTab> <%}%> <%---------------------- Seulement si c'est une Correspondance------------------------%> <% if(typeInteraction.equals("CORR")){%> <fl:sTab id="STab2" title="Todos" onselect="refreshTodos();"> <fl:grid name="TODSLIST" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=TODSLIST&IntID=\" + tdIDs %>" /> </fl:sTab> <%}%> <fl:sTab id="ATTACHMENT" title="<%= Utils.getMessage(session, \"L201C\", \"Documents joints\") %>" > <fl:attach name="Interaction" colID="IntAttID" edit="false" listFobs="true"/> </fl:sTab> <%---------------------- Seulement si c'est une Correspondance------------------------%> <% if(typeInteraction.equals("CORR")){%> <fl:sTab id="STab3" title="Réservations" onselect="refreshReservs();"> <fl:grid name="RESINLIST" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=RESINLIST&Rs_ID=\" + resaIDs %>" /> </fl:sTab> <%}%> <%---------------------- Seulement si c'est une Correspondance------------------------%> </fl:smallTabs> </fl:bigTabs>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de