Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\kbase\faqheader\translation_popup.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" import="com.edeal.frontline.*"%><%@page import="java.util.*" %> <%@ page import="java.util.Vector" %> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@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(); Vector<Vector> lngCodes = (Vector<Vector>)dico.getRefCodeList("FaqLngID"); String toLngID = flRequest.getRequestParameterOrAttribute("to"); String toLngCode = dico.getRefCode("FaqLngID",toLngID); String id = flRequest.getRequestParameterOrAttribute("id"); String objSQL = flRequest.getRequestParameterOrAttribute("objSQL"); String defaultLngCode = "fr_FR"; String defaultLngID = (String)dico.getRefIdByCode("FAQLngID", defaultLngCode); String defaultLngDisp = (String)dico.getRefDisp("FAQLngID", defaultLngID); String toLngDisp = (String)dico.getRefDisp("FAQLngID", toLngID); %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title><fl:getMessage code="XX" alt="Traduire"/></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" src="<fl:webapp/>/js/edeal/libraries/jquery/jquery.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/jquery.translate-1.4.7.js"></script> <script language="javascript"> function submit(){ var w = window.top.opener; lngFrom = $("#lngCode").val(); url = "<fl:webapp/>/translate.fl?id=<%=id%>&objSQL=<%=objSQL%>&lngFrom="+lngFrom+"&lngTo=<%=toLngCode%>"; $.getJSON(url, function(data) { if(data.Status == "OK"){ <%if(("FAQ").equals(objSQL)){%> $("#loading").attr("style","display:block"); $.translate(decodeURIComponent(data.FaqTitle), lngFrom.substring(0,2), '<%=toLngCode.substring(0,2)%>', { complete: function(){ w.setFaqTitle(this.translation); } }); $.translate(decodeURIComponent(data.FaqResponse), lngFrom.substring(0,2), '<%=toLngCode.substring(0,2)%>', { complete: function(){ w.insertContents(this.translation); $("#loading").attr("style","display:none"); closeWindow(); } }); <%}else if(("Messages").equals(objSQL)){%> $("#loading").attr("style","display:block"); $.translate(decodeURIComponent(data.MsgSubject), lngFrom.substring(0,2), '<%=toLngCode.substring(0,2)%>', { complete: function(){ w.setMsgSubject(this.translation); } }); $.translate(decodeURIComponent(data.MsgBody), lngFrom.substring(0,2), '<%=toLngCode.substring(0,2)%>', { complete: function(){ w.insertContents(this.translation); $("#loading").attr("style","display:none"); closeWindow(); } }); <%}%> } }); } $(function () { $(".dropdown dt a").click(function(){ $(".dropdown dd ul").toggle() }); $(document).bind("click",function(g){ var f=$(g.target); if(!f.parents().hasClass("dropdown")){ $(".dropdown dd ul").hide() } }); $(".dropdown dd ul li a").click(function(){ var f=$(this).find("span.value").html(); var e=$("#lang_en_cours").attr("class").substr(0,2); $(".dropdown dd ul").hide() }); }); function closeWindow() { window.close(); } </script> <style> .dropdown{float:left;font-size:11px;} .dropdown dt{background:#FFF;margin:0;padding:3px 5px 0 5px;height:17px;border:none;} .dropdown dd,.dropdown ul{margin:0;padding:0;} .dropdown dd{position:relative;} .dropdown a,.dropdown a:visited{color:grey;text-decoration:none;outline:none;} .dropdown a:hover{color:grey;text-decoration:none;} .dropdown dt a{display:block;padding:0 0 0 0;} .dropdown dt a:hover{color:grey;} .dropdown dt a span{cursor:pointer;display:inline;font-size:11px;} .dropdown dd ul{background:#fff none repeat scroll 0 0;border:1px solid grey;color:grey;display:none;left:0;padding:0;position:absolute;top:2px;width:170px;min-width:170px;list-style:none;z-index:10000;} .dropdown span.value{display:none;} .dropdown dd ul li {text-align:left;} .dropdown dd ul li a{padding:5px 5px 5px 4px;display:block;font-size:11px;} .dropdown dd ul li a:hover{background-color:#b5deef;} .dropdown img.flag{border:none;vertical-align:middle;margin-left:10px;} </style> </head> <body class="popup_body"> <form> <input type="hidden" id="lngCode" name="lngCode" value="fr_FR"/> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"XXX\", false, true, \"Traduire\") %>"> <div style="text-align: center;height:150px"> <dl class="dropdown"> <dt><a href="#"><span> <span id="lang_en_cours"><img valign="top" border="0" src="<fl:webapp/>/icons/flags/gif/<%= defaultLngCode != null ? defaultLngCode.substring(3).toLowerCase() : "fr"%>.gif"></img> <%=defaultLngDisp %></span><span class="arrow_picto"><img border="0" valign="bottom" src="<fl:webapp/>/icons/fleche-titre-down2.gif"></img> <span class="dataLabel"> <img src="<fl:webapp/>/icons/arrow-right-long.gif"/> </span><img valign="top" border="0" src="<fl:webapp/>/icons/flags/gif/<%= toLngCode.substring(3).toLowerCase()%>.gif"></img> <%=toLngDisp %></span></span></a> <span id="loading" style="display:none"> <img src="<fl:webapp/>/icons/dico-loader.gif"/></span></dt> <dd> <ul> <%if(lngCodes != null){ for(Vector<String> lngCodeVector : lngCodes){ String currentLngDisplay = (String)dico.getRefDisp("FAQLngID", (String)lngCodeVector.get(0)); String currentLngCode = lngCodeVector.get(1); String currentLngFlag = currentLngCode.substring(3).toLowerCase(); %> <li><a href="#" onclick="$('#lang_en_cours').html('<img valign=\'top\' border=\'0\' src=\'<fl:webapp/>/icons/flags/gif/<%=currentLngFlag %>.gif\'></img> <%=currentLngDisplay %>');$('#lngCode').val('<%=currentLngCode %>')"><img border="0" src="<fl:webapp/>/icons/flags/gif/<%=currentLngFlag %>.gif" alt="<%=currentLngCode.substring(3).toLowerCase() %>"/> <%=currentLngDisplay %><span class="value"><%=currentLngCode.substring(3).toLowerCase() %></span></a></li> <% } }%> </ul> </dd> </dl> </div> </fl:bigTabs> </form> <table class="container" width="100%"> <tr class="fieldline"> <td colspan="3" style="text-align: center;"> <a href="javascript:submit()" 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> </td> </tr> </table> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de