Edit C:\Windows\install\galaxie_p01_15-09\sales\interaction\repeat.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" contentType="text/html; charset=UTF-8"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.FlLocale" %> <%@ page import="java.text.DecimalFormat" %> <%@ page import="com.edeal.frontline.InteractionBean" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.AccessDeniedException" %> <%@ page import="java.util.Vector" %> <%@ page import="java.util.Date" %> <%@ page import="java.util.GregorianCalendar" %> <%@ page import="java.util.Calendar" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.InteractionBean" id="Interaction" 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 = flRequest.getRequestParameterOrAttribute("id"); boolean isLot = false; try { String lotID = Interaction.getIntParLot(); if (lotID != null) { isLot= true; } }catch (FieldNotInitializedException e){ } String daylyAID = dico.getRefIdByCode("Rpt", "", "DAILY_A"); String daylyBID = dico.getRefIdByCode("Rpt", "", "DAILY_B"); String weeklyID = dico.getRefIdByCode("Rpt", "", "WEEKLY"); String monthlyAID = dico.getRefIdByCode("Rpt", "", "MONTHLY_A"); String monthlyBID = dico.getRefIdByCode("Rpt", "", "MONTHLY_B"); String yearlyAID = dico.getRefIdByCode("Rpt", "", "YEARLY_A"); String yearlyBID = dico.getRefIdByCode("Rpt", "", "YEARLY_B"); Vector lstJour = dico.getRefList(session, "Dow","Te1"); %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title><fl:getMessage code="L2025" alt="E-DEAL"/></title> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/master_css.jsp"> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/master_js.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/checkFields.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/presentField.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/utils.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/calendar.jsp"></script> <style type="text/css"> fieldset { border: none; } </style> <script type="text/javascript" language="javascript"> var intervalDisplayed = true; var dayOfMonthDisplayed = false; var monthDisplayed = false; var dayPositionDisplayed = false; var dayOfWeekDisplayed = false; var weekDayTypeDisplay = 'radio'; function display(interval, dayOfMonth, month, dayPosition, dayOfWeek, intervalLabel, weekDayType) { intervalDisplayed = interval; dayOfMonthDisplayed = dayOfMonth; monthDisplayed = month; dayPositionDisplayed = dayPosition; dayOfWeekDisplayed = dayOfWeek; weekDayTypeDisplay = weekDayType; if (interval) { var node = document.getElementById('interval_type'); while (node.hasChildNodes()) { node.removeChild(node.firstChild); } node.appendChild(document.createTextNode(intervalLabel)); document.getElementById('interval_line').style.display = ''; } else { document.getElementById('interval_line').style.display = 'none'; } if (dayOfMonth) { document.getElementById('dayofmonth_line').style.display = ''; } else { document.getElementById('dayofmonth_line').style.display = 'none'; } if (month) { document.getElementById('month_line').style.display = ''; } else { document.getElementById('month_line').style.display = 'none'; } if (dayPosition) { document.getElementById('dayposition_line').style.display = ''; } else { document.getElementById('dayposition_line').style.display = 'none'; } if (dayOfWeek) { document.getElementById('dayofweek_line').style.display = ''; if (weekDayType == 'radio') { document.getElementById('radio').style.display = 'inline'; document.getElementById('check').style.display = 'none'; } else { document.getElementById('check').style.display = 'inline'; document.getElementById('radio').style.display = 'none'; } } else { document.getElementById('dayofweek_line').style.display = 'none'; } } function doSubmit() { var f = document.forms[0]; if (f.StartTime.value == "") { alert("<fl:getMessage code="M6010" alt="Le champ Heure de début est obligatoire." js="true"/>"); f.StartTime.focus(); return; } if (f.EndTime.value == "") { alert("<fl:getMessage code="M6046" alt="Le champ Heure de Fin est obligatoire." js="true"/>"); f.EndTime.focus(); return; } if (f.StartDate.value == "") { alert("<fl:getMessage code="M6047" alt="Le champ Date de début est obligatoire." js="true"/>"); f.StartDate.focus(); return; } if (f.EndDate.value == "") { alert("<fl:getMessage code="M6048" alt="Le champ Date de Fin est obligatoire." js="true"/>"); f.EndDate.focus(); return; } if (compareDate(f.StartDate.value, '', f.EndDate.value, '') > 0) { window.alert("<fl:getMessage code="M6064" alt="La date de fin doit être supérieure à la date de début." js="true"/>"); f.StartDate.focus(); return; } if (intervalDisplayed) { if (f.Interval.value == "") { alert("<fl:getMessage code="M600E" alt="Le champ Intervalle est obligatoire." js="true"/>"); f.Interval.focus(); return; } } else { f.Interval.value = ''; } if (dayOfMonthDisplayed ) { } else { } if (monthDisplayed) { } else { } if (dayPositionDisplayed) { } else { } if (dayOfWeekDisplayed) { if (weekDayTypeDisplay == 'radio') { <% for (int i = 0 ; i < lstJour.size() ; i++) { %>document.getElementById('dc<%= i %>').checked = false; <% } %> } else { <% for (int i = 0 ; i < lstJour.size() ; i++) { %>document.getElementById('dr<%= i %>').checked = false; <% } %> } var r; var isDaySelected = false; for (r=0 ; r < f.DaysOfWeek.length ; r++) { if (f.DaysOfWeek[r].checked) { isDaySelected = true; } } if (!isDaySelected) { alert("<fl:getMessage code="M6016" alt="Le champ Jour est obligatoire." js="true"/>"); return; } } else { <% for (int i = 0 ; i < lstJour.size() ; i++) { %>document.getElementById('dc<%= i %>').checked = false; document.getElementById('dr<%= i %>').checked = false; <% } %> } f.$$returnedHtmlHead.value = '<scr' + 'ipt language="javascript" type="text/javascript">window.top.close()</scr' + 'ipt>'; presentFieldsValue(); f.submit(); } </script> </head> <body> <div id="object_css" style="top:0px;left: 0px;height:100%;"> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"L6412\", false, true, \"Répétition d\\'interaction\")%>" ignoreList="true"> <form action="<fl:link url="/create_repeat_interaction.fl"/>" onsubmit="doSubmit()"> <input type="hidden" name="id" value="<%= id %>"/> <input type="hidden" name="$$presentFields" value=""/> <input type="hidden" name="$$returnedHtmlHead" value=""/> <input type="hidden" name="$$returnedHtmlBody" value="Closing..."/> <% if (isLot) { %> <div class="dataLabel" style="width: 100%; text-align: left"><fl:getMessage code="L6413" alt="Cette interaction appartient déja à un lot, ses répétitions vont appartenir au même lot."/></div> <% } %> <table class="container"> <tbody> <tr class="ligne_separation"><td> </td></tr> <tr> <td style="width: 40%"> <fieldset> <input type="radio" id="Repetition1" name="Repetition" value="<%= daylyAID %>" onclick="display(true, false, false, false, false, '<fl:getMessage code="L609F" alt="jour(s)" js="true"/>', '');" checked="checked"/><label id="typelbl1" for="Repetition1"><%= dico.getRefDisp(session, "Rpt", "Te1", daylyAID) %></label><br/> <input type="radio" id="Repetition2" name="Repetition" value="<%= daylyBID %>" onclick="display(false, false, false, false, true, '', 'checkbox');"/><label id="typelbl2" for="Repetition2"><%= dico.getRefDisp(session, "Rpt", "Te1", daylyBID) %></label><br/> <input type="radio" id="Repetition3" name="Repetition" value="<%= weeklyID %>" onclick="display(true, false, false, false, true, 'semaines', 'checkbox');"/><label id="typelbl3" for="Repetition3"><%= dico.getRefDisp(session, "Rpt", "Te1", weeklyID) %></label><br/> <input type="radio" id="Repetition4" name="Repetition" value="<%= monthlyAID %>" onclick="display(true, false, false, false, false, 'mois', '');"/><label id="typelbl4" for="Repetition4"><%= dico.getRefDisp(session, "Rpt", "Te1", monthlyAID) %></label><br/> <input type="radio" id="Repetition5" name="Repetition" value="<%= monthlyBID %>" onclick="display(true, false, false, true, true, 'mois', 'radio');"/><label id="typelbl5" for="Repetition5"><%= dico.getRefDisp(session, "Rpt", "Te1", monthlyBID) %></label><br/> <input type="radio" id="Repetition6" name="Repetition" value="<%= yearlyAID %>" onclick="display(false, true, true, false, false, '', '');"/><label id="typelbl6" for="Repetition6"><%= dico.getRefDisp(session, "Rpt", "Te1", yearlyAID) %></label><br/> <input type="radio" id="Repetition7" name="Repetition" value="<%= yearlyBID %>" onclick="display(false, false, true, true, true, '', 'radio');"/><label id="typelbl7" for="Repetition7"><%= dico.getRefDisp(session, "Rpt", "Te1", yearlyBID) %></label><br/> </fieldset> </td> <td style="width: 60%"> <table class="container"> <tbody> <tr class="fieldline" id="interval_line"> <td class="dataLabel"><label id="interval_label" for="Interval"><fl:getMessage code="F6019" alt="Intervalle"/></label></td> <td class="dataValue"> <input type="text" id="Interval" name="Interval" value="" onblur="ctrlNumField(this , 'integer','<fl:getMessage code="M302E" alt="Format incorrect. Veuillez corriger" js="true"/>')"/> <span id="interval_type"><fl:getMessage code="L609F" alt="jour(s)"/></span> </td> </tr> <tr class="fieldline" id="begtime_line"> <td class="dataLabel"><label id="begtime_label" for="StartTime"><fl:getMessage code="F601A" alt="Heure de début"/></label></td> <td class="dataValue"> <input type="text" id="StartTime" name="StartTime" value="<fl:getProperty name="Interaction" property="IntTimeBeg" alt="" />" onblur="ctrlHourField(this, '<fl:getMessage code="M302E" alt="Format incorrect. Veuillez corriger" js="true"/>');"/> </td> </tr> <tr class="fieldline" id="endtime_line"> <td class="dataLabel"><label id="endtime_label" for="EndTime"><fl:getMessage code="F6040" alt="Heure de fin"/></label></td> <td class="dataValue"> <input type="text" id="EndTime" name="EndTime" value="<fl:getProperty name="Interaction" property="IntTimeEnd" alt=""/>" onblur="ctrlHourField(this, '<fl:getMessage code="M302E" alt="Format incorrect. Veuillez corriger" js="true"/>');"/> </td> </tr> <tr class="fieldline" id="begdate_line"> <td class="dataLabel"><label id="begdate_label" for="begdate"><fl:getMessage code="F2002" alt="Date début"/></label></td> <td class="dataValue"> <% Date begDate = null; try { begDate = Interaction.getIntDate(); } catch (FieldNotInitializedException fnie) { } if (begDate != null) { GregorianCalendar cal = FlLocale.getInstance(session).getCalendar(); cal.setTime(begDate); cal.add(Calendar.DAY_OF_YEAR, 1); begDate = cal.getTime(); } %> <input type="text" id="StartDate" name="StartDate" value="<%= Utils.formatToWebDate(session, begDate, true) %>" onblur="ctrlDateField(this, '<fl:getMessage code="M202B" alt="Format de date incorrect. Veuillez corriger." js="true"/>');"/> <a href="javascript:openCalendar(document.forms[0].StartDate)"><img src="<fl:link url="/icons/ico/clock_neutre.gif"/>"></a> </td> </tr> <tr class="fieldline" id="enddate_line"> <td class="dataLabel"><label id="enddate_label" for="enddate"><fl:getMessage code="F2003" alt="Date fin"/></label></td> <td class="dataValue"> <input type="text" id="EndDate" name="EndDate" value="" onblur="ctrlDateField(this, '<fl:getMessage code="M202B" alt="Format de date incorrect. Veuillez corriger." js="true"/>');"/> <a href="javascript:openCalendar(document.forms[0].EndDate)"><img src="<fl:link url="/icons/ico/clock_neutre.gif"/>"></a> </td> </tr> <tr class="fieldline" id="dayofmonth_line" style="display: none"> <td class="dataLabel"><label id="dayofmonth_label" for="DayOfMonth"><fl:getMessage code="F601F" alt="Jour du mois"/></label></td> <td class="dataValue"> <select id="DayOfMonth" name="DayOfMonth"> <% for (int i = 1; i < 32; i++) { DecimalFormat df = FlLocale.getInstance(session).getDecimalFormat("00"); %><option value="<%= i %>"><%= df.format(i) %></option> <% } %> </select> </td> </tr> <tr class="fieldline" id="month_line" style="display: none"> <td class="dataLabel"><label id="month_label" for="MonthOfYear"><fl:getMessage code="L200B" alt="Mois"/></label></td> <td class="dataValue"> <select id="MonthOfYear" name="MonthOfYear"> <% for (int i = 1; i < 13; i++) { DecimalFormat df = FlLocale.getInstance(session).getDecimalFormat("00"); %><option value="<%= i %>"><%= df.format(i) %></option> <% } %> </select> </td> </tr> <tr class="fieldline" id="dayposition_line" style="display: none"> <td class="dataLabel"><label id="dayposition_label" for="Instance"><fl:getMessage code="F6020" alt="Position du jour dans le mois"/></label></td> <td class="dataValue"> <select id="Instance" name="Instance"> <% Vector lstInstance = dico.getRefList(session, "Dis","Te1"); for (int i = 0 ; i < lstInstance.size() ; i++) { String curID = (String) ((Vector) lstInstance.elementAt(i)).elementAt(0); String curDisp = (String) ((Vector) lstInstance.elementAt(i)).elementAt(1); %> <option value="<%= curID %>"><%= curDisp %></option> <% } %> </select> </td> </tr> <tr class="fieldline" id="dayofweek_line" style="display: none"> <td class="dataLabel"><label id="dayofweek_label" for="DaysOfWeek"><fl:getMessage code="F6021" alt="Jour"/></label></td> <td class="dataValue"> <input type="hidden" name="dayofweek_type" value="radio"/> <input type="hidden" name="DaysOfWeek" value=""/> <span id="radio"> <% for (int i = 0 ; i < lstJour.size() ; i++) { String curID = (String) ((Vector) lstJour.elementAt(i)).elementAt(0); String curDisp = (String) ((Vector) lstJour.elementAt(i)).elementAt(1); %> <input type="radio" id="dr<%= i %>" name="DaysOfWeek" value="<%= curID%>"/><label for="dr<%= i %>"><%= curDisp %></label> <% } %> </span> <span id="check"> <% for (int i = 0 ; i < lstJour.size() ; i++) { String curID = (String) ((Vector) lstJour.elementAt(i)).elementAt(0); String curDisp = (String) ((Vector) lstJour.elementAt(i)).elementAt(1); %> <input type="checkbox" id="dc<%= i %>" name="DaysOfWeek" value="<%= curID%>"/><label for="dc<%= i %>"><%= curDisp %></label> <% } %> </span> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </form> </fl:bigTabs> <br> <div class="validation" align="center"><a href="javascript:doSubmit();"><img src="<fl:link url="/icons/ico/valid_green_long.gif"/>" class="valid_button"></a> <a href="javascript:window.close();"><img src="<fl:link url="/icons/ico/fermer_red_long.gif"/>" class="cancel_button"></a></div> </div> <%--fl:title title="<%= Utils.getMessage(session, "L6412", false, true, "Répétition d\'interaction") %>"/--%> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de