Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\admin\requester\text_select_multiple.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 language="java"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="java.util.Hashtable" %> <%@ page import="java.util.Vector" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.navigation.WebUtils" %> <%@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 strDisplay = (String)flRequest.getAttribute("strDisplay"); String fld = flRequest.getParameter("fld"); String query = flRequest.getParameter("query"); %><html> <head> <link rel="stylesheet" type="text/css" href="<fl:link url="/css/grid/edeal_grid_css.jsp"/>"> <link rel="stylesheet" type="text/css" href="<fl:link url="/common/select/select_css.jsp"/>"> <link rel="stylesheet" type="text/css" href="<fl:link url="/css/common_css.jsp"/>"> <script type="text/javascript" src="<fl:link url="/js/jquery.js"/>"></script > <script type="text/javascript" src="<fl:link url="/js/ajax/ajax.js"/>"></script> <script type="text/javascript" src="<fl:link url="/js/utils.js"/>"></script> <script type="text/javascript" language="javascript"> var selectedID = new FlVector(); var selectedDisplay = new FlVector(); function validate() { var i; <%-- alert("try to determine window.top.opener.document.forms[0];"); --%> var f = window.top.opener.document.forms[0]; <%-- alert("window.top.opener.document.forms[0] : " + window.top.opener.document.forms[0]); --%> var mvlSeparator = f.elements['$$multivalSeparator'] ? f.elements['$$multivalSeparator'].value : ';'; <%-- alert("mvl sp:"+mvlSeparator); --%> strIDs=selectedID.toString(mvlSeparator); arrValues=selectedDisplay; <%-- We use here a Javascript function to fill the HTML select, otherwise it doesn't work at least in IE that seems to dislike that. --%> window.top.opener.fillMvaSelect('<%= fld %>',arrValues,arrValues); window.top.close(); } function doSelect(id, display) { for (var i = 0; i < selectedID.size(); i++) { if (selectedID.elementAt(i) == id) { return; } } selectedID.addElement(id); selectedDisplay.addElement(display); addRowToResultGrid(id, display); } function addRowToResultGrid(id, display) { var rowStr = '<tr id=\"tableRow_' + id + '\" class=\"' + (selectedID.size() % 2 == 0 ? 'odd bean' : 'even bean') + '\"><td>'; rowStr += '<a href=\"javascript:unselect(\'' + id + '\')\"><img src=\"<fl:link url="/icons/ico/close.gif"/>\" class=\"unselect_button\"></a>'; rowStr += '</td><td style=\"width:99%;\">' + display + '</td></tr>'; var lastID = selectedID.elementAt(selectedID.size() - 1); if (lastID == id) { lastID = selectedID.elementAt(selectedID.size() - 2); } if (lastID) { $('#tableRow_' + lastID).after(rowStr); } else { $("#_grid__result_div_").html(""); $("#_grid__result_div_").append("<div id='grid-data' class='data'>"+ "<table>"+ "<thead>"+ "<tr>"+ "<th width='15px'></th>"+ "<th width='410px'><fl:getMessage code='L638A' alt='Sélection'/></th>"+ "</tr>"+ "</thead>"+ "<tbody>"+ rowStr+ "</tbody>"+ "</table>"+ "</div>"); } } function refreshRowClasses() { var doEven = true; for (var idx = 0; idx < selectedID.size(); idx++) { var jQueryVar = $('#tableRow_' + selectedID.elementAt(idx)); jQueryVar.addClass(doEven ? 'even' : 'odd'); jQueryVar.removeClass(!doEven ? 'even' : 'odd'); doEven = !doEven; } } function unselect(id) { var pos = -1; for (var i = 0; i < selectedID.size(); i++) { if (selectedID.elementAt(i) == id) { pos = i; } } if (pos == -1) { return; } selectedID.removeElementAt(pos); selectedDisplay.removeElementAt(pos); $('#tableRow_' + id).css('display', 'none'); if(selectedID.size()==0){ $("#_grid__result_div_").html(""); } refreshRowClasses(); } function removeFrom(tab, pos) { if (!tab) { return; } var tmp = new Array(); var nbElements = tab.length; for (var i = 0; i < nbElements; i++) { if (i < pos) { tmp[i] = tab[i]; } else if (i > pos) { tmp[i - 1] = tab[i]; } } return tmp; } function doSubmit() { var e = document.forms[0]; var strURL = '<fl:webapp/>/text_select_list.fl?fld=<%= WebUtils.urlEncode(context, fld) %><%= query == null ? "" : "&query=" + WebUtils.urlEncode(context, query) %>'; if (e.crit.value != '') { strURL += '&search=' + encodeURIComponent(e.crit.value); } _grid__select_js_.callAjaxForHtml(strURL,null,true,false,null,true); } </script> </head> <body> <table class="global" cellpadding="0"> <tr> <td class="header_top_left"></td> <td class="header_top_middle"></td> <td class="header_top_right"></td> </tr> <tr> <td class="header_center_left"></td> <td class="header_center_middle title"> <form action="javascript:doSubmit()"> <input type="hidden" name="$$multivalSeparator" value=";"/> <div style="display: inline"> <span class="criteria_label"><fl:getMessage code="A2009" alt="Rechercher"/></span> <span class="criteria_field"><input id="crit" name="crit" type="text" size="20" value=""></span> </div> <input type="image" src="<fl:link url="/icons/ico/valider.gif"/>" class="search_button"> </form> </td> <td class="header_center_right"></td> </tr> <tr> <td class="header_bottom_left"></td> <td class="header_bottom_middle"></td> <td class="header_bottom_right"></td> </tr> <tr> <td class="body_left"></td> <td class="body_middle"> <div style="height:290px"> <fl:grid name="select" width="100%" height="280px"></fl:grid> </div> </td> <td class="body_right"></td> </tr> <tr> <td class="body_bottom_left"></td> <td class="body_bottom_middle"><img src="<fl:link url="/icons/popup/pop14.gif"/>" width="9" height="18"></td> <td class="body_bottom_right"></td> </tr> </table> <table class="global"> <tr> <td class="separation" colspan="3"></td> </tr> <tr> <td class="selection_title_left"></td> <td class="selection_title_middle title"><fl:getMessage code="L63DF" alt="Votre séléction"/></td> <td class="selection_title_right"></td> </tr> <tr> <td class="selection_body_left"></td> <td class="selection_body_middle"> <div> <fl:grid name="result" width="100%"/> </div> </td> <td class="selection_body_right"></td> </tr> <tr> <td class="selection_bottom_left"></td> <td class="selection_bottom_middle"></td> <td class="selection_bottom_right"></td> </tr> </table> <div class="validation"><a href="javascript:validate()"><img src="<fl:link url="/icons/ico/cochevalid.gif"/>" class="valid_button"></a><a href="javascript:window.top.close();"><img src="<fl:link url="/icons/ico/close.gif"/>" class="cancel_button"></a></div> <div id="waiting" style="display:none"><fl:getMessage code="L639B" alt="Chargement ..."/></div> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de