Edit C:\galaxie\Back\galaxie\sales\interaction\realize_letter.jsp
<%@page import="com.google.gson.GsonBuilder"%> <%@page import="com.google.gson.Gson"%> <%@page import="org.apache.http.HttpRequest"%> <%@page import="com.edeal.frontline.DataDictionary"%> <%@page import="org.apache.commons.lang.StringEscapeUtils"%> <%@page import="java.util.Hashtable"%> <%@page import="java.util.HashMap"%> <%@page import="java.util.Map"%> <%@page import="com.edeal.frontline.FrontlineException"%> <%@page import="com.edeal.frontline.LocationBean"%> <%@page import="com.edeal.frontline.EnterpriseBean"%> <%@page import="com.edeal.frontline.PersonBean"%> <%@page import="java.util.Vector"%> <%@page import="java.util.ArrayList"%> <%@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"%> <%@ taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <script type="text/javascript"> <!-- <% Vector letterModels = (Vector)request.getAttribute("letterModels"); if (letterModels!=null && letterModels.size()>0) { Gson json = (new GsonBuilder()).create(); String jsonStr = json.toJsonTree(letterModels).toString(); %> document.modelInformations = (<%= jsonStr %>); function loadModelList () { $("[name='IntRefDocID']").empty(); <% String idModel = ""; try { idModel = Interaction.getIntRefDocID(); } catch (FieldNotInitializedException e) { } %> var currentDocID = "<%= idModel %>"; for (var i=0; i<document.modelInformations.length; i++) { item=document.modelInformations[i]; newOption = $(document.createElement('option')); newOption.append(item.DocTitle); newOption.val(item.DocID); if(currentDocID == item.DocID) { newOption.attr("selected","selected"); } $("[name='IntRefDocID']").append(newOption); } } $(document).ready(function () { loadModelList(); }); <% } %> function reload() { document.forms[0].action = "<fl:link url="/refresh_realize_interaction.fl"/>"; document.forms[0].submit(); } $(document).ready(function () { // Check enterprise or person modification var currentEntID = $("[name='IntDestEntID']").val(); var currentPerID = $("[name='IntDestPerID']").val(); window.setInterval(function () { if (currentEntID!=$("[name='IntDestEntID']").val() || currentPerID != $("[name='IntDestPerID']").val()) { reload(); } currentEntID = $("[name='IntDestEntID']").val(); currentPerID = $("[name='IntDestPerID']").val(); }, 1000); }); //--> </script> <style> <!-- .content, .recipient { padding-top: 30px } .recipient .dataLabel { width: auto; padding-right: 16px; } .recipient .dataValue { width: 100%; } .recipient ul { list-style-type: none; margin: 0; padding: 0; } .recipient div.input input.input.fob { width: 100%; } .recipient div.input .smallFieldPart { padding-left: 5px; } --> </style> <div class="recipient"> <fieldset class="fieldset"> <legend class="legend"><fl:getMessage code="L8324" alt="Indiquer les participants"/></legend> <table style="width: 100%"> <tr> <td class="dataLabel"> <label><fl:getMessage code="P0302" alt="Personne"/></label> </td> <td class="dataValue"> <fl:input property="IntDestPerID"/> </td> </tr> <tr> <td class="dataLabel"> <label><fl:getMessage code="F002B" alt="Entreprise"/></label> </td> <td class="dataValue"> <fl:input property="IntDestEntID"/> </td> </tr> <tr> <td class="dataLabel" style="vertical-align: top; padding-top: 6px;"> <label><fl:getMessage code="F2012" alt="Adresse"/></label> </td> <td class="dataValue" style="width: 100%"> <%! String getOptionHtml (FlRequest flRequest, String refCode, boolean checked) throws FrontlineException { FlContext context = flRequest.getContext(); DataDictionary dico = context.getDataDictionary(); String refAdressFilterID = dico.getRefIdByCode("Aru", null, refCode); String refAdressFilterDisplay = (String) dico.getRefDisp(flRequest.getSession(), "Aru", "Te1", refAdressFilterID); return "<input type=\"radio\" name=\"addressFilter\" value=\""+ refAdressFilterID +"\" "+(checked?"checked=\"checked\"":"")+" onChange=\"onFilterChange();\"/>"+refAdressFilterDisplay; } %> <ul> <% String refAdressFilterID = null; String refAdressFilterDisplay = null; boolean personIsNull = true; try { PersonBean person = new PersonBean(Interaction.getIntDestPerID(), session); personIsNull = false; String perEntID = null; try { perEntID = person.getPerEntID(); } catch (FieldNotInitializedException e) {} String perLocID = null; try { perLocID = person.getPerLocID(); } catch (FieldNotInitializedException e) {} %><li><%= getOptionHtml(flRequest, "INTDEFAULTADDPER", true)%></li><% %><li><%= getOptionHtml(flRequest, "INTPERADDPER", false)%></li><% if (perEntID!=null || perLocID!=null) { %><li><%= getOptionHtml(flRequest, "INTPROADDPER", false)%></li><% } } catch (FieldNotInitializedException e) {} try { %><li><%= getOptionHtml(flRequest, "INTENTADD", personIsNull)%></li><% EnterpriseBean enterprise = new EnterpriseBean(Interaction.getIntDestEntID(), session); String[] fields = { "LocID", "LocName", "LocAd1", "LocAd2", "LocAd3", "LocCity", "LocZip", "LocCtrID:Val", "LocAddressType:Val" }; String[][] query = { { "LocEntID = " + Utils.formatToSQL(context, Interaction.getIntDestEntID()) } }; Vector locs = null; try { locs = LocationBean.listSummary(context, fields, query); } catch (FrontlineException e) {} if (locs!=null && locs.size()>0) { %><li><%= getOptionHtml(flRequest, "INTLOCADD", false) %> <select name="addressFilterLocation"> <% for (int i = 0; i < locs.size(); i++) { Hashtable loc = (Hashtable)locs.get(i); String locID = (String)loc.get("LocID"); String locName = (String)loc.get("LocName"); String locAddressType = (String)loc.get("LocAddressType:Val"); %> <option value="<%= locID %>"><%= StringEscapeUtils.escapeHtml(locName) %> <%= locAddressType!=null?"("+locAddressType+")":"" %></option> <% } %> </select> </li><% } } catch (FieldNotInitializedException e) {} %> </ul> </td> </tr> <tr> <td class="dataLabel" style="vertical-align: top; padding-top: 6px;"> <fl:label field="IntRefDocID"/> </td> <% if (letterModels!=null && letterModels.size()>0) { %> <td class="dataValue"> <select name="IntRefDocID"></select> <input type="radio" name="format" value="WORD" checked="checked"><fl:getMessage code="L82F3" alt="word"/> <input type="radio" name="format" value="PDF"><fl:getMessage code="L82F2" alt="pdf"/> </td> <% } else { %> <td class="dataValue"> <fl:input property="IntRefDocID" mandatoryMsgCode="M9005" query="[[DocObjID:ObjSql=\'Interaction\']]" /> <input type="radio" name="format" value="WORD" checked="checked"><fl:getMessage code="L82F3" alt="word"/> <input type="radio" name="format" value="PDF"><fl:getMessage code="L82F2" alt="pdf"/> </td> <% } %> </tr> </table> </fieldset> </div> <div class="content"> <fieldset class="fieldset"> <legend class="legend"><fl:getMessage code="L82FF" alt="Rédiger le contenu"/></legend> <table style="width: 100%"> <tr> <td class="dataLabel"> <fl:label field="IntBody"/> </td> </tr> <tr> <td class="dataValue"> <fl:input property="IntBody" style="height:340px"></fl:input> </td> </tr> </table> </fieldset> </div>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de