Edit C:\Windows\install\galaxie_p01_15-09\sales\interaction\realize.jsp
<%@page import="com.edeal.frontline.FieldBean"%> <%@page import="com.edeal.frontline.helper.InteractionBaseHelper.ContextObjectInformation"%> <%@page import="java.util.Iterator"%> <%@page import="com.sun.syndication.feed.impl.ObjectBean"%> <%@page import="com.edeal.frontline.helper.ActorBaseHelper"%> <%@page import="java.util.Calendar"%> <%@page import="com.edeal.frontline.helper.InteractionBaseHelper"%> <%@page import="com.edeal.frontline.ActorBean"%> <%@page import="com.edeal.frontline.PersonEventBean"%> <%@page import="com.edeal.frontline.EventBean"%> <%@page import="com.edeal.frontline.MessagesBean"%> <%@page import="com.edeal.frontline.OpportunityBean"%> <%@page import="org.apache.commons.lang.StringUtils"%> <%@page import="java.util.Date"%> <%@page import="com.edeal.frontline.navigation.FlRequest"%> <%@page import="com.edeal.frontline.FlContext"%> <%@page import="com.edeal.frontline.DataDictionary"%> <%@page import="com.edeal.frontline.FieldNotInitializedException"%> <%@page import="com.edeal.frontline.Utils"%> <%@ taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.InteractionBean" id="Interaction" scope="request" /> <% 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 id = null; try { id = Interaction.getID(); } catch (FieldNotInitializedException fnie) {} String categoryCode = null; try { categoryCode = dico.getRefCode("Acv", null, Interaction.getIntAtvID()); } catch (FieldNotInitializedException fnie) {} EventBean event = (EventBean) request.getAttribute("event"); EventBean eventFromPersonEvent = (EventBean) request.getAttribute("eventFromPersonEvent"); OpportunityBean opportunity = (OpportunityBean) request.getAttribute("opportunity"); PersonEventBean personEvent = (PersonEventBean) request.getAttribute("personEvent"); String typeInterID = null; String typeInteraction = ""; String titreFen; String codetitreFen; try{ typeInterID = (String)Interaction.getCustomProperty("IntType_"); }catch(FieldNotInitializedException e){ typeInterID = ""; } if(typeInterID.equals(dico.getRefIdByCode("IntType_", "ACT"))){ titreFen = "Todo"; codetitreFen ="FF072"; typeInteraction = "TODO"; } else if (typeInterID.equals(dico.getRefIdByCode("IntType_", "COR"))){ titreFen = "Correspondance"; codetitreFen ="FF09A"; typeInteraction = "CORR"; } else { titreFen = "Interaction"; codetitreFen ="L30B2"; } // Get message for outmail messaging MessagesBean message = null; if("OUTEMAIL".equals(categoryCode)) { try { message = new MessagesBean(Interaction.getIntMsgID(), session); } catch (FieldNotInitializedException fnie) { message = new MessagesBean(session); } pageContext.setAttribute("message", message); } String taskDoneRefID = dico.getRefIdByCode("Sti", null, "DONE"); if("CORROUT".equals(categoryCode) || "OUTEMAIL".equals(categoryCode) || "OUTPHONE".equals(categoryCode)) { Calendar newIntTimeBeg = Calendar.getInstance(); Calendar newIntTimeEnd = Calendar.getInstance(); newIntTimeEnd.add(Calendar.MINUTE, (int)(Interaction.getDefaultDuration()*60)); Interaction.setIntTimeBeg(newIntTimeBeg.getTime()); Interaction.setIntTimeEnd(newIntTimeEnd.getTime()); Interaction.setIntDate(newIntTimeBeg.getTime()); } %> <script type="text/javascript" src="<fl:webapp/>/js/wysiwyg/ckeditor/ckeditor.js"></script> <script type="text/javascript" src="<fl:webapp/>/js/wysiwyg/ckeditor/adapters/jquery.js"></script> <script type="text/javascript"> <% if(!"OUTEMAIL".equals(categoryCode) && !"CORROUT".equals(categoryCode)) { %> $(document).ready(function () { var editor = CKEDITOR.replace('IntReport', { toolbar : [ ['Format','Font','FontSize','-','Bold','Italic','Underline','StrikeThrough','-','Undo','Redo','-','Cut','Copy','Paste','Find','Replace','-','Outdent','Indent','-','Print'], ['NumberedList','BulletedList','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], ['Table','-','Link','TextColor','BGColor','Source'] ] }); CKEDITOR.on( 'dialogDefinition', function( ev ){ var dialogName = ev.data.name; var dialogDefinition = ev.data.definition; if ( dialogName == 'image' ){ dialogDefinition.removeContents('advanced'); // Get a reference to the 'Image Info' tab. var infoTab = dialogDefinition.getContents('info'); // Remove unnecessary widgets from the 'Image Info' tab. infoTab.remove('txtHeight'); infoTab.remove('txtWidth'); infoTab.remove('txtBorder'); infoTab.remove('txtHSpace'); infoTab.remove('txtVSpace'); infoTab.remove('cmbAlign'); infoTab.remove('btnLockSizes'); infoTab.remove('btnResetSize'); infoTab.remove('previewImage'); infoTab.remove('ImagePreviewLoader'); infoTab.remove('ImagePreviewBox'); infoTab.remove('previewImage'); } }); }); <% } %> </script> <style> <!-- .centralHeader .container .dataLabel { width: 1%; } .centralHeader .container .dataLabel div{ width: 100px; } .centralHeader #IntTimeBeg, .centralHeader #IntDate { margin-left: 0; } .reportInformation .editContext .dataLabel{ width: 1% } .reportInformation .editContext .dataLabel div { width: 100px; } .reportInformation .editContext .dataValue select { width: auto; } .dataLabel { vertical-align: middle; } --> </style> <% String formulaireAction="/save_realize_interaction.fl"; if("CORROUT".equals(categoryCode)) { formulaireAction="/save_and_fusion_mail_interaction.fl"; } // Case of interaction custom fields String customContextFobBeanStr = ""; if (contextObjectInformation!=null) { Iterator<ObjectsBean> contextObjectBeanIt = contextObjectInformation.keySet().iterator(); while (contextObjectBeanIt.hasNext()) { ObjectsBean contextObjectBean = contextObjectBeanIt.next(); ContextObjectInformation contextInfo = contextObjectInformation.get(contextObjectBean); // is it a context object from a custom field? if (!contextInfo.getInteractionFobField().isFldStd()) { customContextFobBeanStr+=";"+contextObjectBean.getObjSql(); } } } %> <fl:form action="<%= formulaireAction %>" bean="<%= \"Interaction\"+(opportunity!=null ? \";opportunity\": \"\")+(message!=null ? \";message\": \"\")+(personEvent!=null ? \";personEvent\": \"\")+customContextFobBeanStr %>" > <% String IntStiIDValue = taskDoneRefID; if("OUTEMAIL".equals(categoryCode)) { IntStiIDValue = Interaction.getIntStiID(); } %> <input type="hidden" name="IntStiID" id="IntStiID" value="<%= IntStiIDValue %>"> <input type="hidden" name="$$presentFields" value="" /> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, codetitreFen, titreFen) %>" ou="<%= \"/edit_interaction.fl\" + (id != null ? \"?id=\" + id : \"\") %>"> <table class="container" cellpadding="0"> <tr> <% if(typeInteraction.equals("CORR")){%> <td style="width: 0; padding-right: 10px; padding-left: 10px;" valign="top"> <img src="<fl:webapp/>/icons/ico_interaction/big_<%= Interaction.getCategoryImg() %>" alt="<%= Interaction.getCategoryAltImg() %>" style="border: none;"> </td> <%}%> <td class="centralHeader"> <table class="container " cellpadding="0"> <!-- subject --> <fl:fieldEdit property="IntSubject" mandatoryMsgCode="M60C4"/> <!-- Time & date --> <tr class="fieldline"> <td class="dataLabel"><fl:label field="IntDate"/></td> <td class="dataValue"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td nowrap="nowrap"> <fl:input property="IntDate" mandatoryMsgCode="M2006" onchange="this.form.initIntDate.value = this.value;" nodiv="true" /> </td> <% if (Interaction.hasTimePeriodDisplay()) { Date begHour = null; try { begHour = Interaction.getIntTimeBeg(); } catch (FieldNotInitializedException fnie) { } Date endHour = null; try { endHour = Interaction.getIntTimeEnd(); } catch (FieldNotInitializedException fnie) { } 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; } %> <td nowrap="nowrap" style="width:100%; padding-left:10px;"> <input name="IntTimeBeg" type="hidden" value="<fl:getProperty name="Interaction" property="IntTimeBeg" alt="" format="HH:mm"/>"> <input name="IntTimeEnd" type="hidden" value="<fl:getProperty name="Interaction" property="IntTimeEnd" alt="" format="HH:mm"/>"> <input name="periode" id="periode_1" type="radio" class="radio" <%= isMorning ? "checked" : "" %> value="" onclick="document.forms[0].IntTimeBeg.value='08:30';document.forms[0].IntTimeEnd.value='12:00';"> <label class="radioLabel" for="periode_1"><fl:getMessage code="L62AC" alt="matin" /></label><br /> <input name="periode" id="periode_2" type="radio" class="radio" <%= isAfternoon ? "checked" : "" %> value="" onclick="document.forms[0].IntTimeBeg.value='14:00';document.forms[0].IntTimeEnd.value='17:30';"> <label class="radioLabel" for="periode_2"><fl:getMessage code="F60AC" alt="après-midi" /></label/><br /> <input name="periode" id="periode_3" type="radio" class="radio" <%= isAllDay ? "checked" : "" %> value="" onclick="document.forms[0].IntTimeBeg.value='08:30';document.forms[0].IntTimeEnd.value='17:30';"> <label class="radioLabel" for="periode_3"> <fl:getMessage code="L62AD" alt="Toute la journée" /> </label> </td> <% } else { %> <td nowrap="nowrap" style="width:100%; padding-left:10px;"> <fl:input property="IntTimeBeg" size="3" onblur="if(document.forms[0].IntTimeEnd.value == '') doEditTimeEnd();" nodiv="true"/> <input type="hidden" name="duree" value="<%= Interaction.getDefaultDuration() %>"> <fl:label code="L2059" nodiv="true" /> <fl:input property="IntTimeEnd" size="3" nodiv="true" /> <input type="hidden" name="origIntTimeEnd" value=""> </td> <% } %> </tr> </table> </td> </tr> </table> </td> <% if (opportunity != null || personEvent != null || event != null) { %> <td class="titreFiche" style="width: 500px; text-align: right;"> <%@include file="context_info.jsp" %> </td> <% } %> </tr> <tr> <td colspan="3"> <% if("CORROUT".equals(categoryCode)) { %> <%@include file="realize_letter.jsp" %> <% } else if("OUTEMAIL".equals(categoryCode)) { %> <%@include file="realize_email.jsp" %> <% } else if("OUTPHONE".equals(categoryCode)) { %> <%@include file="realize_phone.jsp" %> <% } else if("RDVCOM".equals(categoryCode)) { %> <%@include file="realize_appointement.jsp" %> <% } %> </td> </tr> <% if(!"OUTEMAIL".equals(categoryCode) && !"CORROUT".equals(categoryCode)) { %> <tr> <td colspan="3" class="reportInformation" style="padding-top: 40px;"> <fieldset class="fieldset"> <legend class="legend"><fl:getMessage code="L82C8" alt="Réaliser le compte rendu"/></legend> <table class="container" cellpadding="0" style="width: 100%"> <tr> <td valign="top" style="width: 50%"> <% String details = null; try { details = Interaction.getIntDetails(); } catch (FieldNotInitializedException e) {} if (details!=null) { %> <fl:label field="IntDetails"/> <fl:getProperty property="IntDetails" alt="" name="Interaction"></fl:getProperty> <% } %> </td> <td valign="top" style="width: 50%"> <% Vector<Vector<String>> shouldBeDisplayedFields = dico.getRefCodeList("Iuf", null); %> <table class="container editContext"> <% if (opportunity != null) { %> <fl:fieldRead property="IntOppID" bean="true" alt="" href="true" disp="<%=flRequest.computeURL(\"/read_opportunity.fl\")%>" /> <% for (int i=0; i<shouldBeDisplayedFields.size(); i++) { String fieldName = shouldBeDisplayedFields.get(i).get(1); if(fieldName.startsWith("Opp")) {%> <fl:fieldEdit property="<%= fieldName %>" name="opportunity"></fl:fieldEdit> <% } } %> <% } if (personEvent != null) { %> <fl:fieldRead property="PvtEventID" name="personEvent" bean="true"/> <% for (int i=0; i<shouldBeDisplayedFields.size(); i++) { String fieldName = shouldBeDisplayedFields.get(i).get(1); if(fieldName.startsWith("Pvt")) { %> <fl:fieldEdit property="<%= fieldName %>" name="opportunity"></fl:fieldEdit> <% } } } %> <% // Case of interaction custom fields Iterator<ObjectsBean> contextObjectBeanIt = contextObjectInformation.keySet().iterator(); while (contextObjectBeanIt.hasNext()) { ObjectsBean contextObjectBean = contextObjectBeanIt.next(); ContextObjectInformation contextInfo = contextObjectInformation.get(contextObjectBean); // is it a context object from a custom field? if (!contextInfo.getInteractionFobField().isFldStd()) { %> <fl:fieldRead property="<%= contextInfo.getInteractionFobField().getFldSql() %>" bean="true" alt=""/> <% for (FieldBean field: contextInfo.getFieldsToDisplayInInteractionView()) { %> <fl:fieldEdit property="<%= field.getFldSql() %>" name="<%= contextObjectBean.getObjSql() %>"></fl:fieldEdit> <% } } } %> </table> </td> </tr> <tr> <td colspan="2"> <fl:label field="IntReport"/> <fl:input height="350px" property="IntReport" nodiv="true"/> </td> </tr> <tr> <td colspan="2" style="padding: 5px;padding-top: 25px;"> <fl:attach name="Interaction" colID="IntAttID" /> </td> </tr> </table> </fieldset> </td> </tr> <% } %> </table> </fl:bigTabs> </fl:form>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de