Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\marketing\scriptelementtransition\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.*,java.util.*,java.text.*,java.lang.reflect.*, com.edeal.frontline.navigation.*"%> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.ScriptElementTransitionBean" id="ScriptElementTransition" 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 = ScriptElementTransition.getID(); }catch(Exception e){ id = flRequest.getRequestParameterOrAttribute("id"); } ObjectsBean tablePer = (ObjectsBean)dico.getTable("rad", "Per"); String criFobID = null; try{ criFobID = tablePer.getID(); }catch(Exception e){} // BEGIN get first LinkScriptElementID info. It's a param if this is the creation, get it from the scriptelementtransitionbean if this is an edition String lse1ID = Utils.getRequestParameter(context, request, "LseID"); if (lse1ID == null) { try { lse1ID = ScriptElementTransition.getSetLse1ID(); } catch (FieldNotInitializedException e) {} } if (lse1ID == null) logger.warn("scriptelementtransition/edit_body.jsp : I really need a linkscriptelement ID to do this!!"); String scriptID = flRequest.getRequestParameterOrAttribute("scriptID"); String dispLse1 = flRequest.getRequestParameterOrAttribute("dispLse1"); boolean canAddResponseCriteria = ((Boolean)flRequest.getAttribute("canAddResponseCriteria")).booleanValue(); String cannotAddResponseCriteriaMsg = flRequest.getRequestParameterOrAttribute("cannotAddResponseCriteriaMsg"); String sceID = flRequest.getRequestParameterOrAttribute("sceID"); // END get first LinkScriptElementID info // BEGIN get second linkscriptelementID info. Get it from the scriptelementtransitionbean if this is an edition String lse2ID = null; try { lse2ID = ScriptElementTransition.getSetLse2ID(); } catch (FieldNotInitializedException e) {} String dispLse2 = flRequest.getRequestParameterOrAttribute("dispLse2"); // END get second linkscriptelementID info //info for link script element search window String lseQuery = "LseScriptID = " + Utils.formatToSQL(context, scriptID); //get scriptelementtransition position, either from total num of transitions for the LinkScriptElement (if this is the creation) //or from the transition itself if this is an edition int maxPosition = ((Integer) flRequest.getAttribute("maxPosition")).intValue(); int ourPosition = maxPosition; try { ourPosition = ScriptElementTransition.getSetPosition(); } catch (FieldNotInitializedException e) {} //get both criteria ids String setCriSerID = null; try { setCriSerID = ScriptElementTransition.getSetCriSerID(); } catch (FieldNotInitializedException e) {} String setCriPerID = null; try { setCriPerID = ScriptElementTransition.getSetCriPerID(); } catch (FieldNotInitializedException e) {} %> <html> <head> <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 language="javascript" src="<fl:webapp/>/js/presentField.js"></script> <script language="javascript" src="<fl:webapp/>/js/checkFields.jsp"></script> <script language="javascript" src="<fl:webapp/>/js/utils.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"> function doSubmit() { var mf = document.forms[0]; if (mf.SetLse2ID.value == '') { if (!confirm("<fl:getMessage code="M607C" alt="Si vous ne sélectionnez pas d\'élément de script, cette transition terminera le script. Voulez-vous continuer?" js="true"/>")) return false; } presentFieldsValue(); mf.submit(); } function doSubmitNclose(){ var mf = document.forms[0]; mf.$$returnedHtmlHead.value = '<scr' + 'ipt language="javascript">window.top.opener.myReload();window.top.close();</s'+'cript>' mf.submit(); } function doUpPosition() { var mf = document.forms[0]; if (mf.SetPosition.value < <%=maxPosition%>) mf.SetPosition.value ++; } function doDownPosition() { var mf = document.forms[0]; if (mf.SetPosition.value > 1) mf.SetPosition.value = mf.SetPosition.value - 1; } <% if (id!=null) { %> <%-- Criteria javascript functions --%> var submitFlag = false; //edit for "normal" criteria function doEdit(id) { window.open('<fl:webapp/>/edit_criteria.fl?id='+id+'&Fob=Person&RootFld=SetCriPerID&CtrID=<%= ScriptElementTransition.getID() %>&Fst=1&Src=Script', 'Criteria', 'menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=700,height=200'); } //edit for response criteria function doEditResponse(id) { //A modifier window.open('<fl:webapp/>'+'/edit_response_criteria.fl?id='+id+'&RootFld=SetCriSerID&CtrID=<%= ScriptElementTransition.getID() %>&Fst=1&SceID=<%= sceID %>&LseID=<%= lse1ID %>&SceLabel=<%=dispLse1%>','Criteria', 'menubar=no,status=no,toolbar=no,scrollbars=no,resizable=yes,width=700,height=250'); } //add for "normal" criteria function doAdd() { window.open('<fl:webapp/>'+'<%="/create_criteria.fl?CriFobID="+criFobID%>'+'&RootFld=SetCriPerID&CtrID=<%= ScriptElementTransition.getID() %>&Src=Script','Criteria', 'menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=no,width=700,height=200'); } //Add for response criteria function doAddResponse() { window.open('<fl:webapp/>'+'/create_response_criteria.fl'+'?RootFld=SetCriSerID&CtrID=<%= ScriptElementTransition.getID() %>&SceID=<%= sceID %>&LseID=<%= lse1ID %>&SceLabel=<%=dispLse1%>','Criteria', 'menubar=no,status=no,toolbar=no,scrollbars=no,resizable=yes,width=700,height=200'); } //criteria deletion //A changer --> roofield = SetCriSerID function doDelete(rootField, id) { if(!submitFlag && confirm('<fl:getMessage code="M2004" alt="Etes-vous sûr de vouloir supprimer?" js="true"/>')) { if (rootField=='SetCriSerID'){ doAjax('<fl:webapp/>/delete_object_ajax.fl?type=Criteria&id='+id, waitNreload); }else if (rootField == 'SetCriPerID'){ doAjax('<fl:webapp/>/delete_object_ajax.fl?type=Criteria&id='+id, waitNreload); } } } function waitNreload(arrIndex) { if (eDealXmlhttpArr[arrIndex].readyState == 4) { doReload(); } } function doReload(){ window.top.location = '<fl:webapp/>/edit_scriptelementtransition.fl?id='+'<%=id%>'; } <%-- End of criteria javascript functions --%> <% } %> </script> <title><fl:getMessage code="L2025" alt="e-Deal"/></title> </head> <div class="main_body" style="border: none; height: 100%;"> <body> <fl:form multivalSeparator=";" action="<%=\"/save_scriptelementtransition.fl\" +(id!=null ? \"?id=\"+id: \"\")%>" bean="ScriptElementTransition"> <fl:bigTabs objectTitle="<%=Utils.getMessage(session, \"L621B\", false, true, \"Transition\")%>" > <input type="hidden" name="$$presentFields"> <input type="hidden" name="$$returnedHtmlHead" value=""> <input type="hidden" name="$$returnedHtmlBody" value="..."> <input type="hidden" name="SetLse1ID" value="<%=lse1ID%>"> <input type="hidden" name="LseID" value="<%=lse1ID%>"> <table class="container" cellpadding="0"> <tr> <td colspan="3"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="labelTitreFiche"> <fl:label field="ScpTitre" code="F608B" labelClassName="titreFiche"/> </td> <td class="fieldTitreFiche"> <% String flechAdd = ""; flechAdd = "<a href=\"javascript:doUpPosition()\"><img src=\""+request.getContextPath()+"/icons/ico/flecheH.gif\" border=\"0\"></a> <a href=\"javascript:doDownPosition()\"><img src=\""+request.getContextPath()+"/icons/ico/flecheB.gif\" border=\"0\"></a>"; %> <fl:input property="SetPosition" postText="<%= flechAdd %>" onfocus="this.blur()"/> </td> </tr> </table> </td> </tr> <tr><td colspan="3" class="ligne_separation"/></tr> <tr><td> <table class="container" cellpadding="0"> <tr> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel"><fl:label code="L621C"/></td> <td class="dataValue" > <DIV title="<%= dispLse1 %>"><%= dispLse1 %></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"> <fl:label code="L6419"/> </td> <td class="dataValue"> <fl:input property="SetLse2ID" query="<%=\"LseScriptID = \" + Utils.formatToSQL(context, scriptID)%>"/> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr><td colspan="3" class="ligne_separation"/></tr> </table> <% if (id != null) { %> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <script language="javascript" type="text/javascript" src="<fl:webapp/>/js/smalltabs.jsp"></script> <fl:smallTabs name="ScriptTabs"> <fl:sTab id="TRANS" title="<%= Utils.getMessage(session, \"L621E\",\"Critère de réponse\") %>"> <table width="100%" class="container"> <tr class="fieldline"> <td> <% if (setCriSerID != null) { %> <a href="javascript:doEditResponse('<%=setCriSerID%>')"><img src="<fl:webapp/>/icons/ico/zoom.gif" border="0" alt="<fl:getMessage code="L6220" alt="Editer"/>"></a> <a href="javascript:doDelete('SetCriSerID', '<%=setCriSerID%>')"><img src="<fl:webapp/>/icons/ico/supprimer.gif" border="0" alt="<fl:getMessage code="A0007" alt="Supprimer"/>"></a> <% } %> </td> </tr> <tr class="ligne_separation_couleur"><td colspan="2"></td></tr> <tr class="ligne_separation"><td></td></tr> <tr class="fieldline"> <td colspan="2" class="dataValue"> <% if (setCriSerID == null) { %> <% if (canAddResponseCriteria) { %> <a href="javascript:doAddResponse()">(+)</a> <% } else { %> <%= cannotAddResponseCriteriaMsg %> <% } %> <% } else { %> <jsp:include page="/marketing/scriptelementresponsecriteria/view.jsp" flush="true"> <jsp:param name="id" value="<%= setCriSerID %>"/> <jsp:param name="Node" value=""/> <jsp:param name="Edit" value="0"/> </jsp:include> <% } %> </td> </tr> <tr><td class="ligne_separation"></td></tr> </table> </fl:sTab> <fl:sTab id="TRANS2" title="<%= Utils.getMessage(session, \"L621F\",\"Critère sur la personne\") %>"> <table class="container" width="100%"> <tr class="fieldline"> <td> <% if (setCriPerID != null) { %> <a href="javascript:doEdit('<%=setCriPerID%>')"><img src="<fl:webapp/>/icons/ico/zoom.gif" border="0" alt="<fl:getMessage code="L6220" alt="Editer"/>"></a> <a href="javascript:doDelete('SetCriPerID', '<%=setCriPerID%>')"><img src="<fl:webapp/>/icons/ico/supprimer.gif" border="0" alt="<fl:getMessage code="A0007" alt="Supprimer"/>"></a> <% } %> </td> </tr> <tr class="ligne_separation_couleur"><td colspan="2"></td></tr> <tr class="ligne_separation"><td></td></tr> <tr class="fieldline"> <td colspan="2" class="dataValue"> <% if (setCriPerID == null) { %> <a href="javascript:doAdd()">(+)</a> <% } else { %> <jsp:include page="../criteria/view.jsp" flush="true"> <jsp:param name="id" value="<%= setCriPerID %>"/> <jsp:param name="Node" value=""/> <jsp:param name="Edit" value="0"/> </jsp:include> <% } %> </td> </tr> </table> </fl:sTab> </fl:smallTabs> <% } %> </fl:bigTabs> <table class="container"> <tr class="ligne_separation"><td></td></tr> <tr class="fieldline"> <td width="40%"> </td> <td width="20%"> <div align="center"> <%if (id==null){%> <a href="javaScript:doSubmit()"> <img src="<fl:link url="/icons/ico/valid_green_long.gif"/>" class="valid_button_new"></a> <%}else{%> <a href="javaScript:doSubmitNclose()"> <img src="<fl:link url="/icons/ico/valid_green_long.gif"/>" class="valid_button_new"></a> <%}%> <a href="javaScript:window.top.close()"> <img src="<fl:link url="/icons/ico/fermer_red_long.gif"/>" class="cancel_button_new"> </div> </td> <td width="40%"> </td> </tr> </table> </fl:form> </body> </div>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de