Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\sales\simulation\edit.jsp
<% /****************************************************************************** * Copyright (c) 2000-2005 e-Deal * * e-Deal S.A. * 55 rue Brillat Savarin * 75013 Paris * France * * T: +33 (0)1 53 80 80 30 * 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.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.CampaignBean" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="java.util.Vector" %> <%@ page import="com.edeal.frontline.ObjectsBean" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.SimulationBean" id="Simulation" scope="request"/> <% 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(); String id = null; try { id = Simulation.getID(); } catch (FieldNotInitializedException fnie) { } boolean simCalculated = false; try { simCalculated = Simulation.isSimCalculated(); } catch (FieldNotInitializedException e) { } String simDailyCoeff1, simDailyCoeff2, simDailyCoeff3, simDailyCoeff4, simDailyCoeff5, simDailyCoeff6, simDailyCoeff7; simDailyCoeff1 = simDailyCoeff2 = simDailyCoeff3 = simDailyCoeff4 = simDailyCoeff5 = simDailyCoeff6 = simDailyCoeff7 = ""; String simDailyCoeffs; try { simDailyCoeffs = Simulation.getSimDailyCoeffs(); } catch (FieldNotInitializedException e) { simDailyCoeffs = "1;1;1;1;1;0;0"; } if (simDailyCoeffs != null) { Vector dailyCoeffs = Utils.explodeList(simDailyCoeffs, ";"); if (dailyCoeffs != null && dailyCoeffs.size() > 0) { simDailyCoeff1 = (String)dailyCoeffs.elementAt(0); simDailyCoeff2 = (String)dailyCoeffs.elementAt(1); simDailyCoeff3 = (String)dailyCoeffs.elementAt(2); simDailyCoeff4 = (String)dailyCoeffs.elementAt(3); simDailyCoeff5 = (String)dailyCoeffs.elementAt(4); simDailyCoeff6 = (String)dailyCoeffs.elementAt(5); simDailyCoeff7 = (String)dailyCoeffs.elementAt(6); } } int simActorType = 1; try { simActorType = Simulation.getSimActorType(); } catch (FieldNotInitializedException e) { } int simEndParameter = 0; try { simEndParameter = Simulation.getSimEndParameter(); } catch (FieldNotInitializedException e) { } //initialisation des etapes de campagnes si besoin Vector stages = new Vector(); String initIntCpgID=null; try { initIntCpgID = Simulation.getSimIntCpgID(); CampaignBean cpg = new CampaignBean(initIntCpgID, context); stages = cpg.getCpgStgID(); } catch (FieldNotInitializedException e) { } String initIntStgID = null; try { initIntStgID = Simulation.getSimIntStgID(); } catch (FieldNotInitializedException e) { } String SimIntStiID = null; try { SimIntStiID = Simulation.getSimIntStiID(); } catch(FieldNotInitializedException e) { } String formatIncorrect = Utils.getMessage(session, "M302E", true, "Format incorrect. Veuillez corriger"); %> <script type="text/javascript" language="javascript"> function doSubmit() { var f = document.forms[0]; if( f.SimEndDate.value == '' && f.SimMaxPerDay.value == ''){ alert('<fl:getMessage code="M60F7" alt="Vous devez fournir soit la date de fin soit le nombre maximum d\\\'interaction par jour. Ces deux champs ne peuvent être tous deux vides" js="true"/>'); f.SimEndDate.focus(); return false; } if (f.SimEndParameter.value == 0 && f.SimEndDate.value == "") { window.alert("<fl:getMessage code="M608F" alt="Veuillez renseigner une date de fin." js="true"/>"); f.SimEndDate.focus(); return false; } if (f.SimEndParameter.value == 1 && f.SimMaxPerDay.value == "") { window.alert("<fl:getMessage code="M6098" alt="Veuillez renseigner un maximum par jour." js="true"/>"); f.SimMaxPerDay.focus(); return false; } if (f.SimBeginDate.value != "" && f.SimEndParameter.value==0 && f.SimEndDate.value != "") { date1 = new Date(checkDate(f.SimBeginDate.value, 'DD/MM/yyyy','MM/DD/yyyy').concat(' 00:00')); date2 = new Date(checkDate(f.SimEndDate.value, 'DD/MM/yyyy','MM/DD/yyyy').concat(' 00:00')); diffDate = date2 - date1; if (diffDate < 0) { window.alert("<fl:getMessage code="M2018" alt="La date de fin doit être supérieure à la date de début" js="true"/>"); f.SimBeginDate.focus(); return false; } } if (f.SimActorType[0].checked && f.SimActors.value == "") { window.alert("<fl:getMessage code="M300F" alt="Veuillez renseigner au moins un acteur." js="true"/>"); return false; } if (f.SimActorType[3].checked) { var check = false; for(i=0; i < f.SimRoles.length; i++) { if (f.SimRoles[i].checked) { check = true; } } if (!check) { window.alert("<fl:getMessage code="M6092" alt="Veuillez sélectionner au moins un rôle." js="true"/>"); return false; } } if (f.SimActorType[2].checked && f.SimPersonalized.value == "") { window.alert("<fl:getMessage code="M6091" alt="Veuillez saisir une formule personnalisée." js="true"/>"); f.SimPersonalized.focus(); return false; } if (f.SimEndParameter.value==0 && f.SimMaxPerDay.value != "" && f.SimCalculated.value == "false") { f.SimMaxPerDay.value = ""; } if (f.SimEndParameter.value==1 && f.SimEndDate.value != "" && f.SimCalculated.value == "false") { f.SimEndDate.value = ""; } if (f.SimIntSubject.value == '') { alert("<fl:getMessage code="M6033" alt="Veuillez saisir un sujet." js="true"/>"); selectSmallTab('SimulationTabs','2'); f.SimIntSubject.focus(); return false; } setSimDailyCoeffs(); return true; } function doChangeStg(){ var f = document.forms[0]; f.SimIntStgID.value = f.SimIntStgIDSelect.options[f.SimIntStgIDSelect.selectedIndex].value; } function doChangeDate(){ var f = document.forms[0]; f.SimEndParameter.value = 1; if(f.SimMaxPerDay.value != '') f.SimEndDate.value = ''; resetCalculation(); } function doChangeMax(){ var f = document.forms[0]; f.SimEndParameter.value = 0; if(f.SimEndDate.value != '') f.SimMaxPerDay.value = ''; resetCalculation(); } function runAjax(){ var f = window.document.forms[0]; doAjax('<fl:webapp/>/refresh_simulation_ajax.fl?SimIntCpgID='+f.SimIntCpgID.value); } function doSimIntCpgIDChange(){ setTimeout("runAjax()",50); } function doOnLoad() { var f = document.forms[0]; doAjax('<fl:webapp/>/refresh_simulation_ajax.fl?SimIntCpgID='+encodeURIComponent('<%=initIntCpgID%>')+'&SimIntStgID='+encodeURIComponent('<%=initIntStgID%>')); } </script> <fl:form action="/save_simulation.fl" bean="Simulation"> <input type="hidden" name="SimDailyCoeffs" value=""> <input type="hidden" name="SimCalculated" value="<fl:getProperty name="Simulation" property="SimCalculated" alt="" edit="true"/>"> <input type="hidden" name="SimEndParameter" value="<%= simEndParameter != 0 ? 1 : 0 %>"> <fl:bigTabs listTitle="<%= Utils.getMessage(session, \"L63C7\", false, true, \"Liste des plans d\\'actions\") %>" objectTitle="<%= Utils.getMessage(session, \"L62A2\", false, true, \"Plan d\\'action\") %>" ou="<%= \"/edit_simulation.fl\" + (id != null ? \"?id=\" + id : \"\") %>"> <table class="container" cellpadding="0"> <tr> <td colspan="5" class="width: 100%; margin: 0px; padding: 0px;"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td><fl:label field="SimCode" labelClassName="labelTitreFiche" code="F2000"/></td> <td class="fieldTitreFiche"><fl:input property="SimCode" mandatoryMsgCode="L6144" unicityMsgCode="M60CE"/></td> </tr> </table> </td> </tr> <tr class="ligne_separation"><td></td></tr> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldEdit property="SimBeginDate" onchange="resetCalculation()" mandatoryMsgCode="M3010" /> <fl:fieldEdit property="SimEndDate" onblur="doChangeMax();"/> <fl:fieldEdit property="SimMaxPerDay" onblur="doChangeDate();"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="container" cellpadding="0"> <fl:fieldEdit property="SimPopulation" mandatoryMsgCode="M0001" /> <fl:fieldEdit property="SimExclusion" labelCode="F611E"/> </table> </td> </tr> <tr class="ligne_separation"><td colspan="4"></td></tr> </table> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <fl:smallTabs name="SimulationTabs"> <fl:sTab id="ACTORS" title="<%= Utils.getMessage(session, \"L607C\", false, true, \"Acteurs\") %>"> <table class="container" cellpadding="0"> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <tr class="fieldline"> <td id="SimNbActors_label" class="dataLabel"> <div> <input type="radio" name="SimActorType" value="1" <%= simActorType == 1 ? "checked" : "" %> onChange="resetNbActors()"> <label for="SimActorType_1" class="radioLabel" title="<fl:getMessage code="L607C" alt="Acteurs"/>"><fl:getMessage code="L607C" alt="Acteurs"/></label> </div> </td> </tr> <fl:fieldEdit property="SimActors" label=" " /> <tr class="fieldline"> <td id="SimNbActors_label" class="dataLabel"> <div> <input type="radio" name="SimActorType" value="3" <%= simActorType == 3 ? "checked" : "" %> onChange="resetNbActors()"> <label for="SimActorType_3" class="radioLabel" title="<fl:getMessage code="F609D" alt="Prédéfini"/>"><fl:getMessage code="F609D" alt="Prédéfini"/></label> </div> </td> <td class="dataValue"> <fl:input property="SimPredefined" onchange="selectSimActorType(2);resetNbActors();"/> </td> </tr> <tr class="fieldline"> <td class="dataLabel"> <div> <input type="radio" id="SimActorType_4" name="SimActorType" value="4" <%= simActorType == 4 ? "checked" : "" %> onChange="resetNbActors()"> <label for="SimActorType_4" class="radioLabel" title="<fl:getMessage code="L62A7" alt="Sous la forme formule_personne;formule_entreprise"/>"><fl:getMessage code="F609E" alt="Personnalisé"/></label> </div> </td> <td class="dataValue"> <fl:input property="SimPersonalized" onchange="selectSimActorType(3);resetNbActors();" /> </td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="data_column" cellpadding="0"> <tr class="fieldline"> <td id="SimNbActors_label" class="dataLabel"> <div> <input type="radio" name="SimActorType" value="2" <%= simActorType == 2 ? "checked" : "" %> onChange="resetNbActors()"> <label for="SimActorType_2" class="radioLabel" title="<fl:getMessage code="L2085" alt="Rôles"/>"><fl:getMessage code="L2085" alt="Rôles"/></label> </div> </td> <td class="dataValue"> <fl:input property="SimRoles" onchange="selectSimActorType(4);resetNbActors();"/> </td> </tr> </table> </td> </tr> </table> </fl:sTab> <fl:sTab id="COEFS" title="<%= Utils.getMessage(session, \"F609F\", false, true, \"Coefficients de répartition\") %>"> <table class="container" cellpadding="0"> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel"><div><label for="SimDailyCoeff1" title="<fl:getMessage code="F60A0" alt="Lundi"/>"><fl:getMessage code="F60A0" alt="Lundi"/></label></div></td> <td class="dataValue"> <div><input class="input number" name="SimDailyCoeff1" id="SimDailyCoeff1" value="<%= simDailyCoeff1 %>" onblur="ctrlNumField(this, 'float', '<%= formatIncorrect %>');" onChange="resetCalculation()"></div> </td> </tr> <tr class="fieldline"> <td class="dataLabel"><div><label for="SimDailyCoeff2" title="<fl:getMessage code="F60A1" alt="Mardi"/>"><fl:getMessage code="F60A1" alt="Mardi"/></label></div></td> <td class="dataValue"> <div><input class="input number" name="SimDailyCoeff2" id="SimDailyCoeff2" value="<%= simDailyCoeff2 %>" onblur="ctrlNumField(this, 'float', '<%= formatIncorrect %>');" onChange="resetCalculation()"></div> </td> </tr> <tr class="fieldline"> <td class="dataLabel"><div><label for="SimDailyCoeff3" title="<fl:getMessage code="F60A2" alt="Mercredi"/>"><fl:getMessage code="F60A2" alt="Mercredi"/></label></div></td> <td class="dataValue"> <div><input class="input number" name="SimDailyCoeff3" id="SimDailyCoeff3" value="<%= simDailyCoeff3 %>" onblur="ctrlNumField(this, 'float', '<%= formatIncorrect %>');" onChange="resetCalculation()"></div> </td> </tr> <tr class="fieldline"> <td class="dataLabel"><div><label for="SimDailyCoeff4" title="<fl:getMessage code="F60A3" alt="Jeudi"/>"><fl:getMessage code="F60A3" alt="Jeudi"/></label></div></td> <td class="dataValue"> <div><input class="input number" name="SimDailyCoeff4" id="SimDailyCoeff4" value="<%= simDailyCoeff4 %>" onblur="ctrlNumField(this, 'float', '<%= formatIncorrect %>');" onChange="resetCalculation()"></div> </td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel"><div><label for="SimDailyCoeff5" title="<fl:getMessage code="F60A4" alt="Vendredi"/>"><fl:getMessage code="F60A4" alt="Vendredi"/></label></div></td> <td class="dataValue"> <div><input class="input number" name="SimDailyCoeff5" id="SimDailyCoeff5" value="<%= simDailyCoeff5 %>" onblur="ctrlNumField(this, 'float', '<%= formatIncorrect %>');" onChange="resetCalculation()"></div> </td> </tr> <tr class="fieldline"> <td class="dataLabel"><div><label for="SimDailyCoeff6" title="<fl:getMessage code="F60A5" alt="Samedi"/>"><fl:getMessage code="F60A5" alt="Samedi"/></label></div></td> <td class="dataValue"> <div><input class="input number" name="SimDailyCoeff6" id="SimDailyCoeff6" value="<%= simDailyCoeff6 %>" onblur="ctrlNumField(this, 'float', '<%= formatIncorrect %>');" onChange="resetCalculation()"></div> </td> </tr> <tr class="fieldline"> <td class="dataLabel"><div><label for="SimDailyCoeff7" title="<fl:getMessage code="F60A6" alt="Dimanche"/>"><fl:getMessage code="F60A6" alt="Dimanche"/></label></div></td> <td class="dataValue"> <div><input class="input number" id="SimDailyCoeff7" name="SimDailyCoeff7" value="<%= simDailyCoeff7 %>" onblur="ctrlNumField(this, 'float', '<%= formatIncorrect %>');" onChange="resetCalculation()"></div> </td> </tr> </table> </td> </tr> </table> </fl:sTab> <fl:sTab id="SIMULTYPE" title="<%= Utils.getMessage(session, \"L62A5\", false, true, \"Interaction Type\") %>"> <table class="container" cellpadding="0"> <tr> <td class="column2"> <table class="container" cellpadding="0"> <fl:fieldEdit property="SimIntAtvID" labelCode="F3010" /> <fl:fieldEdit property="SimIntCpgID" labelCode="L2026" onchange="doSimIntCpgIDChange();"/> <tr class="fieldline"> <td class="dataLabel"> <label for="AlmActID_" title="<fl:getMessage code="L3046" alt="Etape"/>"><fl:getMessage code="L3046" alt="Etape"/></label> </td> <td class="dataValue"> <input type="hidden" name="SimIntStgID" value="<fl:getProperty name="Simulation" property="SimIntStgID" alt="" />" /> <select class="input select" id="SimIntStgIDSelect" name="SimIntStgIDSelect" onchange="doChangeStg();"> <option value=""></option> </select> </td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F1010" alt="Statut"/></td> <td class="dataValue"><fl:input property="SimIntStiID"/><input type="hidden" name="statut" value="<%=SimIntStiID %>"></td> </tr> <tr class="fieldline"> <TD class="dataLabel"><fl:getMessage code="F203B" alt="Sujet"/></TD> <td class="dataValue"><div><input id="SimIntSubject" name="SimIntSubject" value="<fl:getProperty name="Simulation" property="SimIntSubject" alt=""/>" maxlength="250" class="input text chpsTextObligatoire" type="text"></div></td> </tr> <tr class="fieldline"> <TD class="dataLabel"><fl:getMessage code="F2024" alt="Notes"/></TD> <TD class="dataValue"><div class="input textarea"><textarea id="SimIntDetails" name="SimIntDetails" class="input textarea"><fl:getProperty name="Simulation" property="SimIntDetails" alt=""/></textarea></div></TD> </tr> </table> </td> </tr> <tr class="ligne_separation"><td colspan="4"></td></tr> </table> </fl:sTab> </fl:smallTabs> </fl:bigTabs> </fl:form>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de