Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\service\saction\edit.jsp
<% /****************************************************************************** * Copyright (c) 2000-2004 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" import="com.edeal.frontline.*,com.edeal.frontline.navigation.*,java.util.*"%> <%@ page import="com.edeal.frontline.controller.actions.SelectAction" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <% 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(); SActionBean obj = (SActionBean)request.getAttribute("SAction"); String pSolID = flRequest.getRequestParameterOrAttribute("solID"); String actID = (String)session.getAttribute("actorID"); try { obj.getSacActID(); } catch (FieldNotInitializedException fnie) { Vector actors = new Vector(); actors.addElement(actID); obj.setSacActID(actors); } ObjectsBean objBean = dico.getTable("sql", "Actor"); String actName = objBean.toString(session, actID); try { pSolID = obj.getSacSolID(); } catch (FieldNotInitializedException ex) { } String id = flRequest.getRequestParameterOrAttribute("id"); if (id==null){ try{ id = obj.getID(); }catch(Exception e){ id = ""; } } SolicitationBean sol = new SolicitationBean(pSolID, session); request.setAttribute("Solicitation", sol); String solStatusClosedID=sol.getStatusClosedID(); String type = Utils.getRequestParameter(context, request, "SacType"); if (type==null && id != null){ try{ type = String.valueOf(obj.getSacType()); }catch(Exception e){} } boolean isSimpleAction = String.valueOf(SActionBean.SIMPLE_ACTION).equals(type); String adv0 = dico.getRefIdByCode("SacAdvID", "0"); String adv100 = dico.getRefIdByCode("SacAdvID", "100"); String init = null; try { init = obj.isSacDone() ? adv100 : adv0; } catch(FieldNotInitializedException e) { init = adv0; } String parentLink = flRequest.computeURL("/read_solicitation.fl?id="+pSolID, true, true, true); %> <html> <head> <title><fl:getMessage code="L2025" alt="E-DEAL"/> CRM</title> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <link rel="stylesheet" href="<fl:webapp/>/css/master_css.jsp" type="text/css"> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/calendar.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/utils.js"></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/ajax/sarissa.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/ajax/ajax.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/master_js.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/ac/fobAC_js.jsp"></script> <script language="JavaScript"> var submitFlag = false; var isReadOnly = false; function doAdv() { var f = document.forms[0]; <% if (isSimpleAction) { %> if(f.SacDone.value == 'true') { doTodo(); f.SacAdvID.value = '<%= adv0 %>'; } else { doDone(); f.SacAdvID.value = '<%= adv100 %>'; } <% } else { %> if(f.SacDone.value == 'true') { doTodo(); }else{ f.SacAdvID.selectedIndex = f.SacAdvID.options.length - 1; doDone(); } <% } %> } function doDone() { var f = document.forms[0]; document.images['SacDoneImg'].src = '<fl:webapp/>/icons/ico/cochevalid.gif'; f.SacDone.value = 'true'; } function doTodo() { var f = document.forms[0]; document.images['SacDoneImg'].src = '<fl:webapp/>/icons/ico/retard.gif'; f.SacDone.value = 'false'; if (f.SolStsID){ f.SolStsID.checked = false; } } function doSubmit() { var reloadSol = false; var f = document.forms[0]; // vérification du texte Objet if(f.SacSubject.value == ""){ window.alert("<fl:getMessage code="M60F6" alt="Veuillez saisir l\\\'objet de l\\\'action" js="true"/>"); f.SacSubject.focus(); return; } if(!submitFlag) { submitFlag = true; //This two methods are used for control the date fields //if (f.Time$SacFromDate){ // f.Time$SacFromDate.focus(); // f.Time$SacFromDate.blur(); //} //f.Time$SacToDate.focus(); //f.Time$SacToDate.blur(); f.id.value = '<%=(id!=null ? id : "")%>'; <% if (!isSimpleAction) { %> if (f.Date$SacFromDate.value != '' && f.Date$SacToDate.value != '') { if (compareDate(f.Date$SacFromDate.value,'',f.Date$SacToDate.value)>0) { window.alert("<fl:getMessage code="M2018" alt="La date de fin doit être supérieure à la date de début" js="true"/>"); f.Date$SacToDate.focus(); submitFlag =false; return; } } if(f.Time$SacFromDate.value != '' && f.Time$SacToDate.value != ''){ if (compareDate(f.Date$SacFromDate.value,f.Time$SacFromDate.value,f.Date$SacToDate.value,f.Time$SacToDate.value)>0) { window.alert("<fl:getMessage code="F6134" alt='L heure de fin doit être supérieure à l heure de début' js="true"/>"); f.Time$SacToDate.focus(); submitFlag =false; return; } } if(f.SolStsID.checked) { reloadSol = true; f.SacEnd.value = 'true'; }else{ f.SacEnd.value = 'false'; } <% } %> if (reloadSol){ f.$$returnedHtmlHead.value = '<scr' + 'ipt language=\"javascript\">window.top.opener.location='+'\'<%=parentLink%>\''+';window.top.close();</scr' + 'ipt>'; }else{ f.$$returnedHtmlHead.value = '<scr' + 'ipt language=\"javascript\">window.top.opener.wait10NrefreshAction();window.top.close();</scr' + 'ipt>'; } prepNumsForSubmit(separateurDecimal , separateurMilliers , document.forms[0].SacWorkload); presentFieldsValue(); f.submit(); } } window.onload = setImg; function setImg(){ <% if (obj.isSacDone()){%> document.images['SacDoneImg'].src = '<fl:webapp/>/icons/ico/cochevalid.gif'; <% }else{ %> document.images['SacDoneImg'].src = '<fl:webapp/>/icons/ico/retard.gif'; <%}%> } </script> </head> <body> <form action="<fl:webapp/>/save_saction.fl" method="post" > <input type="hidden" name="id" value="<fl:getProperty name="SAction" property="SacID" alt=""/>"> <input name="$$presentFields" type="hidden" value=""> <input type="hidden" name="$$returnedHtmlHead" value=""> <input type="hidden" name="$$returnedHtmlBody" value="Closing"> <input name="SacSolID" type="hidden" value="<%= pSolID %>"> <input type="hidden" name="SacEnd" value=""> <input type="hidden" name="SacType" value="<%= type != null ? type : "0" %>"> <div class="main_body" style="height: 100%; border:none;"> <table><tr><td style="height:10px;"></td></tr></table> <fl:bigTabs objectTitle="<%=Utils.getMessage(session, \"L1033\", false, true, \"Action\")%>" ignoreList="true"> <% if (isSimpleAction) { %> <input type="hidden" name="SacAdvID" value="<fl:getProperty name="SAction" property="SacAdvID" alt=""/>"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td colspan="3"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="smallFieldPart"><fl:label field="SacSubject" labelClassName="titreFiche"/></td> <td class="bigFieldPart" style="padding-left: 10px !important;"><fl:input property="SacSubject" mandatoryMsgCode="F60BF"/></td> <td style="padding-left: 10px"> <input type="hidden" name="SacDone" value="<fl:getProperty name="SAction" property="SacDone" alt="false"/>"> <a href="javascript:doAdv();"><img alt="" name="SacDoneImg" src=""></a> </td> </tr> </table> </td> </tr> <tr class="ligne_separation"><td colspan="3"></td></tr> <tr class="fieldline"> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel" style="width: 16%"><fl:getMessage code="L2089" alt="Acteur"/></td> <td class="dataValue" style="width: 34%" valign="top"> <input id="SacActID" name="SacActID" value="<%=(String)obj.getSacActID().get(0)%>" type="hidden"> <input id="lblDocActID" name="lblSacActID" value="<%=actName%>" autocomplete="off" onfocus="displayOnFocus(this);" class="dataValue" style="width: 76%;" type="text"> <a href="javascript:var win = window.open('<fl:webapp/>/select.fl?type=Actor&field=SacActID&formIndex=0', 'SelectActor', 'menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=<%= SelectAction.SELECT_WINDOW_WIDTH %>,height=370')"> <img src="<fl:webapp/>/icons/ico/rechercher.gif" alt="Sélectionner" align="middle" border="0" height="17" width="17"> </a> <a href="javascript:var f = window.document.forms[0]; f.SacActID.value = f.lblSacActID.value = ''; void('')"> <img src="<fl:webapp/>/icons/ico/supprimer.gif" alt="Vider le champ" align="middle" border="0" height="17" width="17"> </a> <script language="javascript">runOnTime("installFobAC(document.forms[0].lblSacActID);", 200);</script> </td> </tr> <fl:fieldEdit property="SacTypID" alt="<%=Utils.getMessage(session, \"F1055\", \"<Choisissez un type>\")%>"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="container" cellpadding="0"> <fl:fieldEdit property="SacWorkload" postText=" heure(s)" size="5"/> <fl:fieldEdit property="SacToDate"/> </table> </td> </tr> </table> <table class="container" cellpadding="0"> <tr class="ligne_separation"><td></td></tr> <tr> <td class="titrePartie"><fl:getMessage code="L1035" alt="Détail"/></td> </tr> <tr> <td class="dataValue noPaddingLeft"><div class="input textarea"><textarea id="SacDetail" name="SacDetail" class="input textarea" style="width:100%;"><fl:getProperty name="SAction" property="SacDetail" alt=" "/></textarea></div> </td> <!-- fl:input property="SacDetail" nodiv="true"/></td--> </tr> <tr class="ligne_separation"><td></td></tr> </table> <% } else { %> <table class="container" cellpadding="0"> <tr class="fieldline"> <td colspan="3"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="smallFieldPart"><fl:label field="SacSubject" labelClassName="titreFiche"/></td> <td class="bigFieldPart" style="padding-left: 10px !important;"><fl:input property="SacSubject" mandatoryMsgCode="F60BF"/></td> <td style="padding-left: 10px"> <input type="hidden" name="SacDone" value="<fl:getProperty name="SAction" property="SacDone" alt="false"/>"> <a href="javascript:doAdv();"><img alt="" name="SacDoneImg" src=""></a> </td> </tr> </table> </td> </tr> <tr class="ligne_separation"><td colspan="3"></td></tr> <tr class="fieldline"> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="L104A" alt="Sollicitation"/></td> <td class="dataValue"> <fl:getProperty name="Solicitation" property="SolToken" alt=""/><fl:getProperty name="Solicitation" property="SolPerID" alt="" bean="true"/><fl:getProperty name="Solicitation" property="SolSilID" alt="" bean="true"/> <fl:getProperty name="Solicitation" property="SolSubject" alt="" preText="<br>"/> </td> </tr> <tr><td height="5px"></td></tr> <fl:fieldEdit property="SacActID"/> <fl:fieldEdit property="SacFromDate"/> <fl:fieldEdit property="SacToDate"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="container" cellpadding="0"> <fl:fieldEdit property="SacTypID" alt="<%=Utils.getMessage(session, \"F1055\", \"<Choisissez un type>\")%>"/> <fl:fieldEdit property="SacWorkload" size="5" postText=" heure(s)"/> <% String strOnChange = "if(this.selectedIndex < (this.options.length - 1)) { doTodo(); } else { doDone(); }"; %> <fl:fieldEdit property="SacAdvID" onchange="<%= strOnChange %>"/> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="L0051" alt="action clôturante"/></td> <td class="dataValue"><input name="SolStsID" type="checkbox" value="<%= solStatusClosedID %>" onClick="if((index = this.form.SacAdvID.selectedIndex) < 0 || this.form.SacAdvID.options[index].value != '<%= dico.getRefIdByCode("SacAdvID", "100") %>') { this.checked = false; } else if(this.checked && this.form.SacDone.value == 'false') { doDone(); }"></td> </tr> </table> </td> </tr> </table> <table class="container" cellpadding="0"> <tr class="ligne_separation"><td></td></tr> <tr> <td class="titrePartie"><fl:getMessage code="L1035" alt="Détail"/></td> </tr> <tr> <td class="dataValue noPaddingLeft"><div class="input textarea"><textarea id="SacDetail" name="SacDetail" class="input textarea" style="width:100%;"><fl:getProperty name="SAction" property="SacDetail" alt=" "/></textarea></div> </td> </tr> <tr class="ligne_separation"><td></td></tr> </table> <% } %> </fl:bigTabs> <table class="container" cellpadding="0"> <tr class="ligne_separation"><td></td></tr> <tr> <td><div align="center"> <a href="javaScript:doSubmit();" title="<fl:getMessage code="A2001" alt="Valider"/>"><img src="<fl:link url="/icons/ico/valid_green_long.gif"/>" ></a> <a href="javaScript:window.top.close();" title="<fl:getMessage code="A2002" alt="Annuler"/>"><img src="<fl:link url="/icons/ico/fermer_red_long.gif"/>"></a> </div></td> </tr> <tr class="ligne_separation"><td></td></tr> </table> </div> </form> </body> </html> <% /****************************************************************************** * * * m.ichahane@e-deal.ma : 2006/08/24 12:52:18 : Mustapha * * *****************************************************************************/ %>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de