Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\admin\label\edit.jsp
<% /****************************************************************************** * Copyright (c) 2000-2010 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="org.apache.commons.lang.StringUtils"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="java.util.Vector" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.LabelBean" %> <%@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(); String code = flRequest.getParameter("msg"); String pLngID = flRequest.getParameter("LngID"); String pLbl = flRequest.getParameter("Lbl"); String msgLbl = Utils.getMessage(session, "F6002", false, "Message"); if (("<" + msgLbl + ">").equals(pLbl)) { pLbl = ""; } String msg = flRequest.getParameter("msg"); boolean fromSelect = "select".equalsIgnoreCase(flRequest.getParameter("from")); String field = flRequest.getParameter("field"); String formIndex = flRequest.getParameter("formIndex"); %> <html> <head> <title></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/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/ac/fobAC_js.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/checkFields.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/utils.js"></script> <script type="text/javascript" language="javascript"> var type = "0"; try { doExitConf = false; } catch (e) { } function create(id) { var f = document.forms[0]; if (id == null || id=="null"){ var typ = f.MsgType.options[f.MsgType.selectedIndex].value; if (typ == ""){ alert('<fl:getMessage code="M6000" alt="Vous devez sélectionner un type de message." js="true"/>'); return; } } else { if (f.CodeMsg.value == ""){ alert('<fl:getMessage code="M2001" alt="Veuillez spécifier un code." js="true"/>'); return; } } var hasLbl = 0; var firstNoLbl = ""; <% Vector lngs = dico.getRefList(session, "LblCodeLng"); for (int i=0 ; i < lngs.size() ; i++) { Vector lngCouple = (Vector) lngs.elementAt(i); String lngId = (String) lngCouple.elementAt(0); String lngCode = (String) lngCouple.elementAt(1); %> var lngLbl = f.Label_<%= lngId %>.value; if (lngLbl != "") hasLbl = 1; if (lngLbl == "" && firstNoLbl == "") firstNoLbl = f.Label_<%= lngId %>; <% } %> if (hasLbl == 0){ alert('<fl:getMessage code="M6044" alt="Veuillez saisir au moins un libellé." js="true"/>'); if (firstNoLbl) firstNoLbl.focus(); return; } submit(); } function closeWindow() { window.top.close(); } function checkCode(){ var f=window.document.forms[0]; var code=f.CodeMsg.value; if(code!="") { if(code.length==5) { var firstChar=code.substring(0,1); var hexaChars1=code.substring(1,2); var hexaChars2=code.substring(2,3); var hexaChars3=code.substring(3,4); var hexaChars4=code.substring(4,5); if((firstChar=='M')||(firstChar=='m')||(firstChar=='F')||(firstChar=='f')||(firstChar=='A')||(firstChar=='a')||(firstChar=='L')||(firstChar=='l')||(firstChar=='T')||(firstChar=='t')) { var to1 =parseInt('0x'+hexaChars1); var to2 =parseInt('0x'+hexaChars2); var to3 =parseInt('0x'+hexaChars3); var to4 =parseInt('0x'+hexaChars4); if(isNaN(to1)){ f.CodeMsg.value=""; return false; } if(isNaN(to2)){ f.CodeMsg.value=""; return false; } if(isNaN(to3)){ f.CodeMsg.value=""; return false; } if(isNaN(to4)){ f.CodeMsg.value=""; return false; } f.CodeMsg.value=code.toUpperCase(); } else {f.CodeMsg.value="";} } else {f.CodeMsg.value="";} } } </script> </head> <body style="height:90%;"> <div id="object_css" style="top:0px;left: 0px;height:90%;"> <form method="post" action="<fl:link url="/save_label.fl"/>"> <input id="$$presentFields" name="$$presentFields" type="hidden" value=""/> <% if (fromSelect) { %> <input id="from" name="from" value="select" type="hidden"/> <input id="field" name="field" value="<%= field %>" type="hidden"/> <% if (formIndex != null) { %> <input id="formIndex" name="formIndex" value="<%= formIndex %>" type="hidden"/> <% }%> <% } %> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"F2001\", \"Libellé\") %>" ou="<%= \"/edit_label.fl\" + (msg != null ? \"?msg=\" + msg : \"\") %>"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel"><fl:label forInput="CodeMsg" code="F2000"/></td> <td class="dataValue"> <div class="input text"> <input id="CodeMsg" onblur="javascript:checkCode();" class="input text" name="CodeMsg" value="<%= Utils.formatToWeb(msg, true) %>"/> </div> </td> </tr> <% if (msg == null) { %> <tr class="fieldline"> <td class="dataLabel"><fl:label forInput="MsgType" code="L6003"/></td> <td class="dataValue"> <select name="MsgType" id="search_MsgType" class="select chpsTextObligatoire"> <option value=""></option> <option value="F"><fl:getMessage code="L60D7" alt="Nom de champ (F)"/></option> <option value="L"><fl:getMessage code="L60D8" alt="Texte quelconque (L)"/></option> <option value="M"><fl:getMessage code="M6030" alt="Message popup (M)"/></option> <option value="A"><fl:getMessage code="L60D9" alt="alt-images (A)"/></option> </select> </td> </tr> <% lngs = dico.getRefList(session, "LblCodeLng"); for (int i=0 ; i < lngs.size() ; i++) { Vector lngCouple = (Vector) lngs.elementAt(i); String lngId = (String) lngCouple.elementAt(0); String lngCode = (String) lngCouple.elementAt(1); %> <tr class="fieldline"> <td class="dataLabel"><fl:label forInput="<%= \"Label_\" + lngId %>" label="<%= lngCode %>"/></td> <td class="dataValue"> <div class="input text" > <input type="text" class="input text" id="Label_<%= lngId %>" name="Label_<%= lngId %>" value="<%= lngId.equalsIgnoreCase(pLngID) ? Utils.formatToWeb(pLbl, true) : "" %>"><br/> <input type="text" class="input text" id="LabelMore_<%= lngId %>" name="LabelMore_<%= lngId %>" value=""> </div> </td> </tr> <% } } else { lngs = dico.getRefList(session, "LblCodeLng"); for (int i=0 ; i < lngs.size() ; i++) { Vector lngCouple = (Vector) lngs.elementAt(i); String lngId = (String) lngCouple.elementAt(0); String lngCode = (String) lngCouple.elementAt(1); String lblLabel = ""; String lblLabelMore = ""; boolean moreThanOne = false; String[] fields = {"LblLabel", "LblLabelMore"}; String query = "select LblLabel, LblLabelMore from Label Where LblCodeMsg = " + Utils.formatToSQL(context, msg) + " and LblCodeLng = " + Utils.formatToSQL(context, lngId); Vector lbls = LabelBean.listSQL(session , fields , query); if (lbls != null & lbls.size() > 0) { if (lbls.size() > 1) { moreThanOne = true; } Hashtable lblData = (Hashtable) lbls.elementAt(0); lblLabel = (String) lblData.get("LblLabel"); lblLabelMore = (String) lblData.get("LblLabelMore"); if (lblLabel == null) lblLabel = ""; if (lblLabelMore == null) lblLabelMore = ""; } %> <tr class="fieldline"> <td class="dataLabel"><fl:label forInput="<%= \"Label_\" + lngId %>" label="<%= lngCode %>"/><%= moreThanOne ? " <b><font color=\"red\">!</font></b>" : "" %></td> <td class="dataValue"> <div class="input text" > <input type="text" class="input text" id="Label_<%= lngId %>" name="Label_<%= lngId %>" value="<%= "".equals(lblLabel) ? "" : Utils.formatToWeb(lblLabel, false) %>"><br/> <input type="text" class="input text" id="LabelMore_<%= lngId %>" name="LabelMore_<%= lngId %>" value="<%= "".equals(lblLabelMore) ? "" : Utils.formatToWeb(lblLabelMore, false) %>"> </div> </td> </tr> <% } } %> </table> </td> </tr> <tr class="ligne_separation"><td colspan="5"></td></tr> </table> <% if (msg != null) { %><jsp:include page="tags.jsp" flush="true"> <jsp:param name="Code" value="<%= msg %>"/> </jsp:include> <% } %> </fl:bigTabs> </form> <div style="width: 100%;text-align: center;"> <a href="javascript:create('<%= code %>')" title="<fl:getMessage code="A2001" alt="Valider"/>"><img src="<fl:link url="/icons/ico/valid_green_long.gif"/>" ></a> <a href="javascript:closeWindow();" title="<fl:getMessage code="A2002" alt="Annuler"/>"><img src="<fl:link url="/icons/ico/fermer_red_long.gif"/>" ></a> </div> </div> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de