Edit C:\Windows\install\galaxie_p02_26-09\sales\interaction\realize_email.jsp
<%@page import="com.edeal.frontline.helper.InteractionBaseHelper"%> <%@page import="com.edeal.frontline.helper.custom.InteractionHelper"%> <%@page import="java.util.Map"%> <%@page import="java.util.HashMap"%> <%@page import="java.util.Vector"%> <%@page import="org.json.JSONArray"%> <%@page import="org.json.JSONObject"%> <%@page import="com.edeal.frontline.FieldNotInitializedException"%> <%@page import="com.edeal.frontline.navigation.FlRequest"%> <%@page import="com.edeal.frontline.MessagesBean"%> <%@page import="com.edeal.frontline.helper.ContextHelper"%> <%@ taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <% InteractionHelper interactionHelper = new InteractionHelper(Interaction); //InteractionBaseHelper interactionHelper = new InteractionBaseHelper(Interaction); JSONArray emailCorrespondantJSONObj = interactionHelper.getEmailCorrespondantCustomJSONArray(); String emailCorrespondantJSON = emailCorrespondantJSONObj!=null?emailCorrespondantJSONObj.toString():"[]"; //JSONArray emailCorrespondantJSONObj = interactionHelper.getEmailCorrespondantJSONArray(); //String emailCorrespondantJSON = emailCorrespondantJSONObj!=null?emailCorrespondantJSONObj.toString():"[]"; JSONArray emailActorJSONObj = interactionHelper.getEmailActorJSONArray(true, session); String emailActorJSON = emailActorJSONObj!=null?emailActorJSONObj.toString():"[]"; %> <style> <!-- #IntRefMsgID_label { width: 0; } select#IntRefMsgID { margin-right: 14px; } #IntRefMsgID_label label { width: 82px; display: block; } .intRefMsgIDLabel { width: 77px; display: block; } .MsgSubject { width: 100%; } #MsgSubject_label { width: 0; } #MsgSubject_label label { width: 80px; display: block; } #MsgSubject_value { width: 100%; } --> </style> <script type="text/javascript"> function reload() { document.forms[0].action = "<fl:link url="/refresh_realize_interaction.fl"/>"; document.forms[0].submit(); } $(document).ready(function () { editor = CKEDITOR.replace('MsgBody', { height : "340", resize_enabled : false, 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','Flash','Smiley','TextColor','BGColor','Source','-','FusionButton','SimpleLinkButton'] ] }); CKEditor_loaded = true; 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'); } }); // Check enterprise or person modification var currentModelID = $("[name='IntRefMsgID']").val(); window.setInterval(function () { if (currentModelID!=$("[name='IntRefMsgID']").val()) { //reload(); } currentModelID = $("[name='IntRefMsgID']").val(); }, 1000); }); function loadModel(id) { if(id == '' || id == null){ alert('<fl:getMessage code="M9005" alt="Veuillez choisir un modèle" js="true"/>'); return; } <% InteractionBaseHelper.MappingInfo mappingInfo = interactionHelper.getFieldInfoForMailMapping(session); if (mappingInfo.getObjectID() == null) mappingInfo.setObjectID(request.getParameter("fusionBeanID")); %> var url = "<fl:webapp/>/load_obj_model.fl?id=" + id + "&objID=<%= mappingInfo.getObjectID() %>&type=<%= mappingInfo.getObjectName() %>"; $.getJSON(url, function(data) { if(data.Status == "OK"){ $("#MsgSubject").val(decodeURIComponent(data.MsgSubject)); // Update attachement $("#MsgAttID").val(data.MsgAttID); listAttachments_MsgAttID("AttUpd", false); // Update reference documentaire var listDocumentIDs = data.MsgDocID.split("|"); var listDocumentNames = data.MsgDocNames.split("|"); edManager.getViewByID("MsgDocID").model.reset(); for(var i=0; i<listDocumentNames.length; i++) { edManager.getViewByID("MsgDocID").model.add ({ value:listDocumentIDs[i], label:formatToJavascript(listDocumentNames[i]) }) } CKEDITOR.instances["MsgBody"].setData(decodeURIComponent(data.MsgBody)); } }); } </script> <% ObjectsBean actorBean = dico.getTable("sql", "Actor"); String xmlActortListID = null; try { xmlActortListID = actorBean.getObjSelectListID(); } catch (FieldNotInitializedException e) { } ObjectsBean personBean = dico.getTable("sql", "Person"); String xmlPersonListID = null; try { xmlPersonListID = personBean.getObjSelectListID(); } catch (FieldNotInitializedException e) { } %> <% try { Interaction.getIntPvtID(); %> <input type="hidden" name="IntPvtID" value="<%= Interaction.getIntPvtID() %>"> <% } catch (FieldNotInitializedException e) { } %> <% try { Interaction.getIntAtvID(); %> <input type="hidden" name="IntAtvID" value="<%= Interaction.getIntAtvID() %>"> <% } catch (FieldNotInitializedException e) { } String selectPersonLinkMultiple = ""; if (xmlPersonListID != null) { selectPersonLinkMultiple = "xml_select_multiple_list.fl?id=" + xmlPersonListID; } else { if (ContextHelper.hasMultifunction(context)) { selectPersonLinkMultiple = "xml_select_multiple_list.fl?code=FUNCTIONS"; } else { selectPersonLinkMultiple = "xml_select_multiple_list.fl?code=PERSON"; } } String selectActorLinkMultiple = ""; if (xmlActortListID != null) { selectActorLinkMultiple = "xml_select_multiple_list.fl?id=" + xmlActortListID; } else { selectActorLinkMultiple = "xml_select_multiple_list.fl?code=ACTOR"; } String selectCorrespondentLinkMultiple = ""; selectCorrespondentLinkMultiple = "select_correspondent.fl?multivalSeparator=|&"; %> <edMailRecipient i18n='{"Title":"<fl:getMessage code="L831B" alt="Indiquer les destinataires" js="true"/>", "To":"<fl:getMessage code="L8254" alt="À" js="true"/>", "Cc":"Cc:", "Cci":"Cci:"}' mailinput='{"nameTo":"MsgTo", "nameCc":"MsgCc", "nameCci":"MsgCci", "separator": ";"}' personInput='{"name":"PersonID", "separator": "|"}' correspondentInput='{"name":"IntCorID", "separator": "|"}' actorInput='{"name":"IntActID", "separator": "|"}' values='{"To":<%= emailCorrespondantJSON %>, "Cci":<%= emailActorJSON %>}' autocompletedatasource='{"To":"autoCompleteEmailRecipient.fl", "Cc":"autoCompleteEmailRecipient.fl", "Cci":"autoCompleteEmailRecipient.fl?from=actor"}' popupdatasource='{"To":{"link":"<%= selectCorrespondentLinkMultiple %>"}, "Cc":{"link":"<%= selectActorLinkMultiple %>"}, "Cci":{"link":"<%= selectActorLinkMultiple %>"}}' getEmailFromIDAction="<fl:webapp/>get_interaction_email.fl" ></edMailRecipient> <fieldset class="fieldset"> <legend class="legend"><fl:getMessage code="L8303" alt="Rédiger le message" js="true"/></legend> <table class="fieldTable"> <tr class="fieldline"> <td> <% Vector<Map<String, String>> emailModels = (Vector<Map<String, String>>)request.getAttribute("emailModels"); String intRefMsgID = null; try { intRefMsgID = Interaction.getIntRefMsgID(); } catch (FieldNotInitializedException e) { } if (emailModels!=null && emailModels.size()>0) { %> <table style="display:block; float:left;"> <tr> <td class="dataLabel" style="vertical-align: top; padding-top: 6px;"> <fl:label field="IntRefMsgID" labelClassName="intRefMsgIDLabel"/> </td> <td> <select name="IntRefMsgID" id="IntRefMsgID"> <% for (Map<String, String> modelDetails : emailModels) { boolean selected = intRefMsgID!=null && intRefMsgID.equals(modelDetails.get("MsgID")); %> <option value="<%= modelDetails.get("MsgID") %>" <%= selected?"selected='selected'":"" %>)><%= modelDetails.get("MsgSubject") %></option> <% } %> </select> </td> <td> <a href="javascript: loadModel(window.document.forms[0].IntRefMsgID.value);" style="display:block; float:left; padding:5px; margin-left:-14px;"> <img title="<fl:getMessage code="L7033" alt="Charger le modèle"/>" alt="<fl:getMessage code="L7033" alt="Charger le modèle"/>" class="icon" src="<fl:webapp/>/icons/ico/importer.gif"/> </a> </td> </tr> </table> <% } else { %> <style type="text/css"> #IntRefMsgID_label label { width: 79px; display: block; } </style> <table class="fieldTable"> <% String documentFilter = "[[" + (request.getParameter("id") !=null ? "MsgObjID:ObjSql=\'Interaction\'," :"") +"MsgObjID:ObjSql=\'Person\'],[MsgType:RefVal=\'MODELE\']]"; %> <tr class="fieldline"> <td width="40%"> <table class="fieldTable"> <fl:fieldEdit property="IntRefMsgID" name="Interaction" query="<%= documentFilter %>"></fl:fieldEdit> </table> </td> <td width="20%"> <a href="javascript: loadModel(window.document.forms[0].IntRefMsgID.value);"> <img title="<fl:getMessage code="L7033" alt="Charger le modèle"/>" alt="<fl:getMessage code="L7033" alt="Charger le modèle"/>" class="icon" src="<fl:webapp/>/icons/ico/importer.gif"/> </a> </td> <td width="40%"> </td> </tr> </table> <% } %> <% if (Boolean.valueOf(request.getParameter("loadmodel"))) { %> <script type="text/javascript"> $(document).ready(function () { editor.on( 'instanceReady', function () { $(document).one("onallviewsrendered", function () { loadModel(window.document.forms[0].IntRefMsgID.value); }); }); }); </script> <% } else { %> <script type="text/javascript"> $(document).ready(function () { editor.on( 'instanceReady', function () { $(document).one("onallviewsrendered", function () { if(window.document.forms[0].IntRefMsgID.value && !CKEDITOR.instances["MsgBody"].getData()) { loadModel(window.document.forms[0].IntRefMsgID.value); } }); }); }); </script> <% } %> </td> </tr> </table> <table class="MsgSubject"> <fl:fieldEdit property="MsgSubject" name="message" mandatoryMsgCode="M000C"/> </table> <table class="container" cellpadding="0"> <tr><td class="dataValue noPaddingLeft"><fl:input property="MsgBody" rows="5" nodiv="false"/></td></tr> </table> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <fl:smallTabs name="AttachmentsTabs"> <fl:sTab id="files" title="<%= Utils.getMessage(session, \"L201C\", false, true, \"Documents joints\") %>"> <fl:attach colID="MsgAttID" name="message" edit="true"/> </fl:sTab> <fl:sTab id="docs" title="<%= Utils.getMessage(session, \"L813E\", false, true, \"Références documentaire\") %>"> <table class="container" cellpadding="0"> <tr> <fl:fieldEdit property="MsgDocID" name="message"/> </tr> </table> </fl:sTab> </fl:smallTabs> </fieldset>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de