Edit C:\Users\Administrator\Desktop\Back\Livraison EVQG22\sales\interaction\realize_email.jsp
<%@page import="com.edeal.frontline.Logger"%> <%@page import="com.edeal.frontline.InteractionBean"%> <%@page import="com.genesyslab.ail.Interaction"%> <%@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.EnterpriseBean"%> <%@page import="com.edeal.frontline.SolicitationBean"%> <%@page import="com.edeal.frontline.AttachmentBean"%> <%@page import="com.edeal.frontline.custom.Dossier_Bean"%> <%@page import="com.edeal.frontline.custom.Classement_Bean"%> <%@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():"[]"; String idint = flRequest.getRequestParameterOrAttribute("id"); String idmsg=""; try{ idmsg = (String)InteractionBean.lookup(context, "IntMsgID", idint); }catch(Exception e){ } if(idmsg==null){ try{ InteractionBean intb = new InteractionBean(idint,context); MessagesBean msgb = new MessagesBean(context); msgb.save(); idmsg = msgb.getMsgID(); intb.setIntMsgID(idmsg); intb.save(); }catch(Exception e){ } } String corrsIdsTo = ""; String corrsIdsCc = ""; if (emailCorrespondantJSONObj != null) { int len = emailCorrespondantJSONObj.length(); for (int i=0;i<len;i++){ corrsIdsTo = corrsIdsTo + emailCorrespondantJSONObj.getJSONObject(i).getString("id") + "|"; } } //JSONArray emailCorrespondantJSONObj = interactionHelper.getEmailCorrespondantJSONArray(); //String emailCorrespondantJSON = emailCorrespondantJSONObj!=null?emailCorrespondantJSONObj.toString():"[]"; JSONArray emailActorJSONObj = interactionHelper.getEmailActorJSONArray(true, session); String emailActorJSON = emailActorJSONObj!=null?emailActorJSONObj.toString():"[]"; /* Sp�cial envoi de mail selon le la langue r�f�rente du Tiers */ String idInteraction = null; try { idInteraction = Interaction.getID(); } catch (FieldNotInitializedException e) { } //initialisation du mod�le par d�faut String code = null; String idModDefaut = ""; String dispModele = ""; String docID = null; Vector <String> docVectorID = new Vector<String>(); Vector <String> dossierAttID = null; Vector <String> dossierAttNameID = null; /* 0041739: Relance de correspondance http://u-project2.umanis.com/view.php?id=41739 */ String type = null; try{ Interaction.getIntOppID(); Interaction.getIntMsgID(); type = "Opportunity"; }catch(FieldNotInitializedException dfg){ type = "Interaction"; } String modelType = "MODELE"; String frID= null; String deID= null; String enID= null; String esID= null; String itID= null; String lngRefID = null; String tiersID = null; try { tiersID = (String) Interaction.getCustomProperty("IntTiersConc_"); } catch (FieldNotInitializedException e) { } String dossierID = null; try { dossierID = (String) Interaction.getCustomProperty("IntDossierID_"); } catch (FieldNotInitializedException e) { } String classementID = null; try { dossierID = (String) Interaction.getCustomProperty("IntDossierLastCls"); } catch (FieldNotInitializedException e) { } String solicitationID = null; try { solicitationID = (String) Interaction.getCustomProperty("IntSolicitation_"); } catch (FieldNotInitializedException e) { } JSONArray emailCorrespondantAssosJSONObj = null; String emailCorrespondantAssoJSON = null; if(tiersID != null) { try { frID = dico.getRefIdByCode("Lna", "Te1", "fr_FR"); deID = dico.getRefIdByCode("Lna", "Te1", "de_DE"); enID = dico.getRefIdByCode("Lna", "Te1", "en_US"); esID = dico.getRefIdByCode("Lna", "Te1", "es_ES"); itID = dico.getRefIdByCode("Lna", "Te1", "it_IT"); } catch (Exception e) { } EnterpriseBean ent = new EnterpriseBean(tiersID, context); // la langue referente du tiers try { lngRefID = (String) ent.getCustomProperty("EntRefLngID_"); } catch (FieldNotInitializedException e) { lngRefID = frID; } if(lngRefID != null && dossierID != null) { // Tester si c'est un classement segmentation ou cocottes/cheminées Dossier_Bean dossier = new Dossier_Bean(dossierID,context); String[] flds = {"Cl_ID","Cl_ClassType"}; String[][] query = {{"Cl_Dossier = '" + dossierID + "'" }}; String[] orderBy = {"Cl_CrDt DESC"}; Vector result = Classement_Bean.listSummary(context, flds, query, orderBy); String classementType = null; if (result != null && !result.isEmpty()) { Hashtable tab = (Hashtable)result.elementAt(0); classementType = (String)tab.get("Cl_ClassType"); } String segHebClass =null; try{ segHebClass = dico.getRefIdByCode("Cy_", "Te1", "SEH"); } catch (FrontlineException e) { segHebClass=""; } String segResClass =null; try{ segResClass = dico.getRefIdByCode("Cy_", "Te1", "SER"); } catch (FrontlineException e) { segResClass=""; } if(!classementType.equals(segHebClass) && !classementType.equals(segResClass)){ // notif de la d�cision if(frID.equals(lngRefID)){ code = "DECISIONFR"; } else if(deID.equals(lngRefID)){ code = "DECISIONDE"; } else if(enID.equals(lngRefID)){ code = "DECISIONEN"; } else if(esID.equals(lngRefID)){ code = "DECISIONES"; } else if(itID.equals(lngRefID)){ code = "DECISIONIT"; } else { code = "DECISIONFR"; } } // mettre en copie l'association li�e au tiers si elle existe //http://u-project2.umanis.com/view.php?id=40672 String assoID = null; try { assoID = (String) ent.getCustomProperty("EntStructureLocalID_"); } catch (FieldNotInitializedException e) { } if(assoID != null) { //emailCorrespondantAssosJSONObj = interactionHelper.getEmailCorrespondantAssoCustomJSONArray(assoID); emailCorrespondantAssosJSONObj = interactionHelper.getEmailCorrespondantAssoCustomJSONArrayWithConTech(assoID,ent.getEntID()); emailCorrespondantAssoJSON = emailCorrespondantAssosJSONObj!=null?emailCorrespondantAssosJSONObj.toString():"[]"; if (emailCorrespondantAssosJSONObj != null) { int len = emailCorrespondantAssosJSONObj.length(); for (int i=0;i<len;i++){ corrsIdsTo = corrsIdsTo + emailCorrespondantAssosJSONObj.getJSONObject(i).getString("id") + "|"; } } } } else if (lngRefID != null && solicitationID != null) { // compliment ou reclamation de la sollicitation... String plainteReservation = null; String plainteFidelisation = null; String plainteQualite = null; String compliment = null; try { plainteReservation = dico.getRefIdByCode("SolCategorie_", "SPRES"); plainteFidelisation = dico.getRefIdByCode("SolCategorie_", "SPFID"); plainteQualite = dico.getRefIdByCode("SolCategorie_", "SPQA"); compliment = dico.getRefIdByCode("SolCategorie_", "SCOM"); } catch (FrontlineException e) { } SolicitationBean solB = new SolicitationBean(solicitationID, context); String solCategorieID = ""; try { solCategorieID = (String) solB.getCustomProperty("SolCategorie_"); } catch (FieldNotInitializedException e) { } String tiersConc = null; try { tiersConc = (String) Interaction.getCustomProperty("IntTiersConc_"); } catch (FieldNotInitializedException e) { } boolean solTiers = false; try { String spec1 = ""; spec1 = (String) Interaction.getIntSpecif1(); if(spec1.equalsIgnoreCase("TIERS")) { solTiers = true; } } catch (FieldNotInitializedException e) { } // seulement pour les Accuses de reception String objectInt = ""; try { objectInt = (String) Interaction.getIntSubject(); } catch (FieldNotInitializedException e) { } if( objectInt.contains("Accus")){ // accuse de reception d'une Sol if(solCategorieID.equalsIgnoreCase(plainteReservation)) { if(frID.equals(lngRefID)){ if(solTiers) { code = "ARRECLFRTI"; } else { code = "ARRECLFR"; } } else if(deID.equals(lngRefID)){ code = "ARRECLDE"; } else if(enID.equals(lngRefID)){ code = "ARRECLUK"; } else { code = "ARRECLFR"; } } else if(solCategorieID.equalsIgnoreCase(plainteFidelisation)) { if(frID.equals(lngRefID)){ if(solTiers) { code = "ARRECLFRTI"; } else { code = "ARRECLFR"; } } else if(deID.equals(lngRefID)){ code = "ARRECLDE"; } else if(enID.equals(lngRefID)){ code = "ARRECLUK"; } else { code = "ARRECLFR"; } } else if(solCategorieID.equalsIgnoreCase(plainteQualite)) { if(frID.equals(lngRefID)){ if(solTiers) { code = "ARRECLFRTI"; } else { code = "ARRECLFR"; } } else if(deID.equals(lngRefID)){ code = "ARRECLDE"; } else if(enID.equals(lngRefID)){ code = "ARRECLUK"; } else if(esID.equals(lngRefID)){ code = "ARRECLES"; } else if(itID.equals(lngRefID)){ code = "ARRECLIT"; } else { code = "ARRECLFR"; } } else if(solCategorieID.equalsIgnoreCase(compliment)) { if(frID.equals(lngRefID)){ code = "COMPLIMFR"; } else if(enID.equals(lngRefID)){ code = "COMPLIMUK"; } else { code = "COMPLIMFR"; } } } else if(objectInt.contains("V�rification")) { // objet v�rification d'une Sol code = "VERIFFR"; } else { // objet correspondance resultant d'une sollicitation normale if(solTiers) { code = "DEFAULTSOLTI"; } else { code = "DEFAULTSOLCL"; } } // mettre en copie l'association li�e au tiers si elle existe //http://u-project2.umanis.com/view.php?id=40672 //il faut corriger cette partie et ajouter toujours le ctc de reference //http://u-project2.umanis.com/view.php?id=45903 String assoID = null; try { assoID = (String) ent.getCustomProperty("EntStructureLocalID_"); } catch (FieldNotInitializedException e) { } if(solTiers) { if( (assoID != null && (solCategorieID.equalsIgnoreCase(plainteQualite) || solCategorieID.equalsIgnoreCase(plainteFidelisation))) ) { //emailCorrespondantAssosJSONObj = interactionHelper.getEmailCorrespondantAssoCustomJSONArray(assoID); emailCorrespondantAssosJSONObj = interactionHelper.getEmailCorrespondantAssoCustomJSONArrayWithConTech(assoID,ent.getEntID()); emailCorrespondantAssoJSON = emailCorrespondantAssosJSONObj!=null?emailCorrespondantAssosJSONObj.toString():"[]"; if (emailCorrespondantAssosJSONObj != null) { int len = emailCorrespondantAssosJSONObj.length(); for (int i=0;i<len;i++){ corrsIdsTo = corrsIdsTo + emailCorrespondantAssosJSONObj.getJSONObject(i).getString("id") + "|"; } } }else if (assoID != null){ //http://u-project2.umanis.com/view.php?id=45903 emailCorrespondantAssosJSONObj = interactionHelper.getConseillerTechniqueCustomJSONArray(assoID,ent.getEntID()); emailCorrespondantAssoJSON = emailCorrespondantAssosJSONObj!=null?emailCorrespondantAssosJSONObj.toString():"[]"; if (emailCorrespondantAssosJSONObj != null) { int len = emailCorrespondantAssosJSONObj.length(); for (int i=0;i<len;i++){ corrsIdsTo = corrsIdsTo + emailCorrespondantAssosJSONObj.getJSONObject(i).getString("id") + "|"; } } } } } } // un modele par defaut if(code == null) { code = "DEFAULTCORR"; } Vector dossierAttGlobalID = null; Vector dossierAttGlobalNameID = null; Vector dossierAttDossID = null; Vector dossierAttDossNameID = null; Vector dossierAttSolID = null; Vector dossierAttSolNameID = null; if(dossierID != null) { Dossier_Bean ds_ = new Dossier_Bean(dossierID, context); // r�cup des pi�ces jointes du dossier dossierAttDossID = new Vector <String>(); dossierAttDossNameID = new Vector <String>(); try { dossierAttDossID = (Vector) ds_.getDs_Fichiers(); } catch (FieldNotInitializedException e) { } for (int i =0; i< dossierAttDossID.size(); i++) { AttachmentBean att = new AttachmentBean((String)dossierAttDossID.elementAt(i), context); try { dossierAttDossNameID.add((String)att.getAttFileName()); } catch (Exception e) { } } } if(solicitationID != null) { SolicitationBean sol = new SolicitationBean(solicitationID, context); // r�cup des pi�ces jointes des sollicitations dossierAttSolID = new Vector <String>(); dossierAttSolNameID = new Vector <String>(); try { dossierAttSolID = (Vector) sol.getSolAttID(); } catch (FieldNotInitializedException e) { } for (int i =0; i< dossierAttSolID.size(); i++) { AttachmentBean att = new AttachmentBean((String)dossierAttSolID.elementAt(i), context); try { dossierAttSolNameID.add((String)att.getAttFileName()); } catch (Exception e) { } } } // r�cup�ration des pi�ces jointes try { dossierAttGlobalID = new Vector <String>(); dossierAttGlobalNameID = new Vector <String>(); try { dossierAttGlobalID = (Vector) Interaction.getIntAttID(); } catch (FieldNotInitializedException e) { } for (int i =0; i< dossierAttGlobalID.size(); i++) { AttachmentBean att = new AttachmentBean((String)dossierAttGlobalID.elementAt(i), context); try { dossierAttGlobalNameID.add((String)att.getAttFileName()); } catch (FieldNotInitializedException e) { } } } catch (Exception e) { } // remplir dossierAttID, dossierAttNameID try { dossierAttID = new Vector <String>(); dossierAttNameID = new Vector <String>(); if(dossierAttGlobalID != null && dossierAttGlobalNameID != null) { // remplir le vecteur for (int i =0; i< dossierAttGlobalID.size(); i++) { dossierAttID.add((String)dossierAttGlobalID.elementAt(i)); } for (int i =0; i< dossierAttGlobalNameID.size(); i++) { dossierAttNameID.add((String)dossierAttGlobalNameID.elementAt(i)); } } if(dossierAttSolID != null && dossierAttSolNameID != null) { // remplir le vecteur for (int i =0; i< dossierAttSolID.size(); i++) { dossierAttID.add((String)dossierAttSolID.elementAt(i)); } for (int i =0; i< dossierAttSolNameID.size(); i++) { dossierAttNameID.add((String)dossierAttSolNameID.elementAt(i)); } } if(dossierAttDossID != null && dossierAttDossNameID != null) { // remplir le vecteur for (int i =0; i< dossierAttDossID.size(); i++) { dossierAttID.add((String)dossierAttDossID.elementAt(i)); } for (int i =0; i< dossierAttDossNameID.size(); i++) { dossierAttNameID.add((String)dossierAttDossNameID.elementAt(i)); } } if(dossierAttID!= null && !dossierAttID.isEmpty()) { String x = ""; MessagesBean msgb = null; Vector<String> attids = null; try{ msgb = new MessagesBean(idmsg,context); attids = (Vector<String>)msgb.getMsgAttID(); }catch(Exception e){ } //Vector<String> attfns = msgb.getMsgAttFileName(); boolean update = false; if(attids!=null){ for (int i=0; i<dossierAttID.size(); i++) { if(!attids.contains(dossierAttID.elementAt(i))){ attids.add(dossierAttID.elementAt(i)); //attfns.add(dossierAttNameID.elementAt(i)); update = true; } } }else{ attids = dossierAttID; update = true; } //msgb.setMsgAttFileName(attfns); try{ msgb.setMsgAttID(attids); msgb.save(); }catch(Exception e){ } if(update){ %> <script type="text/javascript"> <!-- document.forms[0].action = "<fl:link url="/refresh_realize_interaction.fl"/>"; document.forms[0].submit(); //--> </script> <% } } } catch (Exception e) { String x = ""; } /*code du message � initilaiser*/ if(code != null) { String[] fieldsQuery = {"MsgID", "MsgSubject", "MsgDocID"}; String[][] queryList = {{"MsgCode = '" + code + "'"}}; String[] orderBy = {"MsgCrDt DESC"}; Vector listRes = MessagesBean.listSummary(context, fieldsQuery, queryList); // on prend le premier MESSAGE si la liste n'est pas vide if(listRes != null && !listRes.isEmpty()) { Hashtable tab = (Hashtable)listRes.firstElement(); idModDefaut = (String)tab.get("MsgID"); dispModele = (String)tab.get("MsgSubject"); docVectorID = (Vector)tab.get("MsgDocID"); if(docVectorID !=null && !docVectorID.isEmpty()){ docID= (String)docVectorID.firstElement(); } } } // pour n'afficher que les mod�les de fusion de l'int�raction String idObjInteraction = dico.getTable("sql", "Interaction").getObjID(); String query =""; query ="[[DocObjID = '" + idObjInteraction + "']]"; ObjectsBean docBean = dico.getTable("sql", "Document"); String xmlListSelect = docBean.getObjSelectListID(); %> <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 doWord(id,obj,informat) { format = "Word"; idDocument = "<%=docID%>"; // http://u-project2.umanis.com/view.php?id=34738 : //%20Choix%20des%20documents%20a%20envoyer%20lors%20d%27une%20notification idmsg = $('#IntRefMsgID').val(); if (informat && informat == "PDF") { format = "PDF"; } window.open('<fl:webapp/>/fusion_document_fiche_decision.fl?format=' + format + '&idDoc='+ idDocument +'&idMsg='+ idmsg +'&idObj='+id+'&object='+obj, 'listOpp', 'menubar=no,status=no,toolbar=no,scrollbars=auto,resizable=yes,width=860,height=460'); } 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++) { if(listDocumentIDs[i] != '') { edManager.getViewByID("MsgDocID").model.add ({ value:listDocumentIDs[i], label:formatToJavascript(listDocumentNames[i]) }) } } CKEDITOR.instances["MsgBody"].setData(decodeURIComponent(data.MsgBody)); loadFichiersJoints(); } }); } function doOnLoad(){ //loadFichiersJoints(); } function loadFichiersJoints(){} function loadFichiersJoints2(){ <% if(dossierAttID!= null && dossierAttNameID!= null && (!dossierAttNameID.isEmpty() && !dossierAttID.isEmpty())) { for (int i=0; i<dossierAttID.size(); i++) { %> var test = window.document.forms[0].IntRefMsgID.value; edManager.getViewByID("MsgAttID").model.add ({ value:'<%=dossierAttID.elementAt(i)%>', <% try{ if(dossierAttNameID.elementAt(i) != null) { %> label:formatToJavascript("<%=dossierAttNameID.elementAt(i).replace("\"", "")%>") <% } } catch(Exception exc) { %> label:formatToJavascript(' ') <%} %> }) <% } } %> } </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 selectCorrespondentToMultiple = ""; selectCorrespondentToMultiple = "select_correspondent_realize_mail.fl?CorID=" + corrsIdsTo + "&multivalSeparator=|"; String selectCorrespondentCcMultiple = ""; selectCorrespondentCcMultiple = "select_correspondent_realize_mail.fl?CorID=" + corrsIdsCc + "&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":<%= Utils.formatToHTMLAttributes(emailCorrespondantJSON, false) %>, "Cc":<%= Utils.formatToHTMLAttributes(emailCorrespondantAssoJSON, false) %> , "Cci":<%= Utils.formatToHTMLAttributes(emailActorJSON, false) %>}' autocompletedatasource='{"To":"autoCompleteEmailRecipient.fl", "Cc":"autoCompleteEmailRecipient.fl", "Cci":"autoCompleteEmailRecipient.fl?from=actor"}' popupdatasource='{"To":{"link":"<%= selectPersonLinkMultiple %>"}, "Cc":{"link":"<%= selectPersonLinkMultiple %>"}, "Cci":{"link":"<%= selectActorLinkMultiple %>"}}' getEmailFromIDAction="<fl:webapp/>/get_interaction_email.fl" ></edMailRecipient> --%> <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":<%= Utils.formatToHTMLAttributes(emailCorrespondantJSON, false) %>, "Cc":<%= Utils.formatToHTMLAttributes(emailCorrespondantAssoJSON, false) %> , "Cci":<%= Utils.formatToHTMLAttributes(emailActorJSON, false) %>}' autocompletedatasource='{"To":"autoCompleteEmailRecipient.fl", "Cc":"autoCompleteEmailRecipient.fl", "Cci":"autoCompleteEmailRecipient.fl?from=actor"}' popupdatasource='{"To":{"link":"<%= selectCorrespondentToMultiple %>"}, "Cc":{"link":"<%= selectCorrespondentCcMultiple %>"}, "Cci":{"link":"<%= selectActorLinkMultiple %>"}}' getEmailFromIDAction="<fl:webapp/>/get_interaction_email_custom.fl" ></edMailRecipient> <%-- <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 { try{ intRefMsgID = Interaction.getIntRefMsgID(); }catch(Exception exx){ intRefMsgID = Interaction.getIntMsgID(); } /* * 43358: Un modèle n'est plus appliqué (FD) * http://u-project2.umanis.com/view.php?id=43358 */ Object field = MessagesBean.lookup(context, "MsgSubject", intRefMsgID); if(field==null){ throw new Exception(); }else{ dispModele = field.toString(); } } catch (Exception e) { if(idModDefaut!=null) intRefMsgID = idModDefaut; else intRefMsgID = null; } 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"> <tr valign="top"> <td class="principalText bigFieldPart"> <div class="fobLeftDiv"> <input type="hidden" value="<%=intRefMsgID%>" class="input" name="IntRefMsgID" id="IntRefMsgID"/> <input type="text" class="input fob" onfocus="displayOnFocus(this);acResizeDisplayDiv(this);" autocomplete="off" value="<%=dispModele%>" name="lblIntRefMsgID" id="lblIntRefMsgID" style="width: 150px;"/> </div> </td> <td class="smallFieldPart"> <span id="IntRefMsgID_icons"> <table style="height: 100%; width: 100%"> <tr> <td> <a href="javascript:var langCurrent = $('#langageID').val(); var win = window.open('<fl:webapp/>/select.fl?type=Messages&field=IntRefMsgID&formIndex=0&query=MsgObjID:ObjSql=\'<%=type %>\'\|MsgType:RefVal=\'<%=modelType %>\'', 'SelectActor', 'menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=800,height=400')"> <img title="<fl:getMessage code="A2003" alt="S�lectionner"/>" alt="<fl:getMessage code="A2003" alt="S�lectionner"/>" class="icon" src="<fl:webapp/>/icons/ico/rechercher.gif"/> </a> </td> <td> <a href="javascript:var f = window.document.forms[0]; f.IntRefMsgID.value = f.lblIntRefMsgID.value = ''; acLastCompleteValues['lblIntRefMsgID'] = '';acLastCompleteValues['IntRefMsgID'] = ''; void('')" class="fob"> <img title="<fl:getMessage code="A3005" alt="Vider le champ"/>" alt="<fl:getMessage code="A3005" alt="Vider le champ"/>" class="icon" src="<fl:webapp/>/icons/ico/supprimer.gif"/> </a> </td> <td> <a href="javascript: loadModel($('#IntRefMsgID').val());"> <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> </span> <script language="javascript"> var _IntRefMsgID_query = "MsgObjID:ObjSql='<%=type %>'|MsgType:RefVal='<%=modelType %>'";runOnTime("installFobAC(document.forms[0].lblIntRefMsgID);", 1000); </script> </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"/> <%-- Mod�le Apercu --%> </table> <table class="container" cellpadding="0"> <% if(docID != null) { %> <tr> <td> <a href="javascript:doWord('<%=idInteraction%>','Interaction','Word');"/> <img src="<fl:webapp/>/icons/ico_word_inv.gif" style="width: 15; height: 15;" alt="<fl:getMessage code="LF34A" alt="Visualiser le PDF"/>" title="<fl:getMessage code="LF34A" alt="Visualiser le PDF"/>"> <p class="actions_tabletext"><fl:getMessage code="LF396" alt="Visualiser"/></p> </a> </td> </tr> <%} %> <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="docs" title="<%= Utils.getMessage(session, \"L813E\", false, true, \"R�f�rences documentaire\") %>"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel"> <div> <label for="MsgDocID" title="<fl:getMessage code="F702B" alt="Base documentaire"/>"><fl:getMessage code="F702B" alt="Base documentaire"/></label> </div> <edLink image='icons/ico/rechercher.gif' values="<fl:getMessage code="A2003" alt="S�lectionner"/>" target="POPUP" url='xml_select_multiple_list_interaction.fl?IntID=<%=idInteraction%>&id=<%=xmlListSelect%>&field=MsgDocID&formIndex=0&query=%5B%5BDocObjID+%3D+%27<%=idObjInteraction%>%27%5D%5D' ></edLink> </td> <td class="dataValue"> <edAutoComplete id="MsgDocID" isMultiValued="true" isRequired="false" autocomplete='{"objname": "DocID", "searchtype": "FOB", "minimumCharacters": 2}' actions='{"sort": {"active": false}, "add": {"active": true, "authorizedouble": false}, "remove": {"active": true}}'> </edAutoComplete> </td> </tr> <%-- <tr> <fl:fieldEdit property="MsgDocID" query="<%=query%>" name="message"/> </tr> --%> </table> </fl:sTab> <fl:sTab id="files" title="<%= Utils.getMessage(session, \"MF0FB\", false, true, \"Documents joints chargés\") %>"> <table class="container" cellpadding="0"> <%-- <fl:fieldEdit property="MsgAttID" name="message"/> <fl:attach name="message" colID="MsgAttID" edit="true"/> <fl:fieldEdit property="MsgAttID" name="message"/> --%> <tr> <fl:attach name="message" colID="MsgAttID" edit="true"/> </tr> </table> </fl:sTab> <%-- <fl:sTab id="files" title="<%= Utils.getMessage(session, \"MF0FC\", false, true, \"Documents joints � Uploader\") %>"> <table class="container" cellpadding="0"> <tr> <fl:attach name="message" colID="MsgAttuploadID_" edit="true"/> </tr> </table> </fl:sTab> --%> </fl:smallTabs> </fieldset> <script type="text/javascript"> loadFichiersJoints(); </script>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de