Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\marketing\population\add_multiple.jsp
<%@ page language="java"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="java.util.Vector" %> <%@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 popID = flRequest.getParameter("PopID"); String popType = flRequest.getParameter("PopType"); if (popType == null) { popType = "0"; } String multivalSeparator = flRequest.getParameter("multivalSeparator"); if (multivalSeparator == null || "".equals(multivalSeparator)) { multivalSeparator = "|"; } %><html> <head> <link rel="stylesheet" type="text/css" href="<fl:link url="/sales/correspondent/select_css.jsp"/>"> <script type="text/javascript" src="<fl:link url="/js/ajax/sarissa.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 vectID = new FlVector(); var vectDisp = new FlVector(); var vectType = new FlVector(); function closeWindow() { window.top.close(); } function doAddEntry(pEntID, pPerID, pDisp,pType) { if(!pEntID && !pPerID) return; if(!pEntID) pEntID = ''; if(!pPerID) pPerID = ''; var id = pPerID + ':' + pEntID; if(!vectID.contains(id)) { vectID.addElement(id); vectDisp.addElement(pDisp); vectType.addElement(pType); if (!myData_result) { myData_result = new Array(); } myData_result[myData_result.length] = new Array("<a href=\"javascript:unselect(\'" + id + "\')\"><img src=\"<fl:link url="/icons/ico/close.gif"/>\" class=\"unselect_button\"></a>", pDisp); myGrid_result.setRowCount(vectID.size()); myGrid_result.refresh(); } } function unselect(id) { var pos = -1; for (var i = 0; i < vectID.size(); i++) { if (vectID.elementAt(i) == id) { pos = i; } } if (pos == -1) { return; } vectID.removeElementAt(pos); vectDisp.removeElementAt(pos); vectType.removeElementAt(pos); // suppression de la ligne numerote pos dans myData_result myData_result = removeFrom(myData_result, pos); if (!myData_result) { myData_result = new Array(); } myGrid_result.setRowCount(vectID.size()); myGrid_result.refresh(); } 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 validate() { var strURL = '<fl:link url="<%= \"/add_populationentry_valid.fl?PopID=\" + popID + \"&PopType=\" + popType %>"/>&ids=' + vectID.toString('<%= multivalSeparator %>') + '&types=' + vectType.toString('<%= multivalSeparator %>') + '&multivalSeparator=' + encodeURIComponent('<%= multivalSeparator %>'); doAjax(strURL); } function doSubmit(f) { var type = ''; if (f.type.options) { type = f.type.options[f.type.selectedIndex].value; } else { type = f.type.value; } var strURL = '<fl:webapp/>/add_populationentry_list.fl?type=' + encodeURIComponent(type) + '&query=' + encodeURIComponent(f.query.value + '%') + '&criteria=' + encodeURIComponent(f.criteria.value); doAjax(strURL); } function changeCriteria(form, type) { if (type =="enterprise") { form.criteria.value = "EntCorpName"; } else if (type == "support") { form.criteria.value = "SupTitle"; } else if (type == "person") { form.criteria.value = "PerName"; } else if (type == "journalist") { form.criteria.value = "JouName"; } else if ( type == "silhouette") { form.criteria.value = "SilName"; } } function doSelectIndiv(groupID, type) { var strURL = '<fl:webapp/>/select_correspondent_list.fl?type='; if (type == 'Journalist') { strURL += 'journalist&criteria=JouSupID'; } else { strURL += 'person&criteria=PerEntID'; } strURL += '&query=' + encodeURIComponent(groupID); doAjax(strURL); } function doOnload() { } </script> <style type="text/css"> form { display: inline; } search_button { width: 74px; height: 17px; margin-left: 10px; border: none; vertical-align: middle; background: transparent; } </style> </head> <body onload="doOnload()"> <div style="width: 750px"> <table class="global" cellpadding="0"> <tr> <td class="header_top_left"></td> <td class="header_top_middle" style="width: 343px"></td> <td class="header_top_right"></td> <td class="header_top_left"></td> <td class="header_top_middle" style="width: 343px"></td> <td class="header_top_right"></td> </tr> <tr> <td class="header_center_left"></td> <td width="320px"class="header_center_middle title"> <form action="javascript:doSubmit(window.document.forms[0])"> <div style="display: inline"> <div class="criteria"> <% if ("1".equals(popType)) { %> <input type="hidden" name="criteria" id="criteria" value="SupTitle"/> <input type="hidden" name="type" id="type" value="support"/> <fl:getMessage code="F201A" alt="Support"/> <% } else { %> <input type="hidden" name="criteria" id="criteria" value="EntCorpName"> <input type="hidden" name="type" id="type" value="enterprise"/> <span class="criteria_field"> <fl:getMessage code="F002B" alt="Entreprise"/> </span> <% } %> <span class="criteria_field"><input id="query" name="query" type="text" size="20" value=""></span> </div> </div> <input type="image" src="<fl:link url="/icons/ico/valid_green2_long.gif"/>" style="width:74px; height: 17px; margin-left: 10px; border: none; vertical-align: middle; background: transparent;"> </form> </td> <td class="header_center_right"></td> <td class="header_center_left"></td> <td width="400px" class="header_center_middle title"> <form action="javascript:doSubmit(window.document.forms[1])"> <div style="display: inline"> <div class="criteria"> <% if ("1".equals(popType)) { %> <input type="hidden" name="criteria" id="criteria" value="JouName"/> <input type="hidden" name="type" id="type" value="journalist"/> <fl:getMessage code="L6513" alt="Journaliste"/> <% } else { %> <input type="hidden" name="criteria" id="criteria" value="PerName"> <fl:getMessage code="F002E" alt="Personne"/> <span class="criteria_field"> <select id="type" name="type" onchange="changeCriteria(this.form, this.options[this.selectedIndex].value);"> <option value="person"><fl:getMessage code="F002E" alt="Personne"/></option> <option value="silhouette"><fl:getMessage code="F002F" alt="Silhouette"/></option> </select> </span> <% } %> <span class="criteria_field"><input id="query" name="query" type="text" size="20" value=""></span> </div> </div> <input type="image" src="<fl:link url="/icons/ico/valid_green2_long.gif"/>" style="width:74px; height: 17px; margin-left: 10px; border: none; vertical-align: middle; background: transparent;"> </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> <td class="header_bottom_left"></td> <td class="header_bottom_middle"></td> <td class="header_bottom_right"></td> </tr> <tr style="height: 250px"> <td class="body_left"></td> <td class="body_middle"><div><fl:grid name="select_group" width="275px" height="250px"></fl:grid></div></td> <td class="body_right"></td> <td class="body_left"></td> <td class="body_middle"><div><fl:grid name="select_indiv" width="20%" height="250px"></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> <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"><fl:grid name="result" height="140px"/></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> <tr><td class="separation" colspan="3"> </td></tr> </table> <div class="validation"><input type="image" src="<fl:link url="/icons/ico/valid_green_long.gif"/>" onclick="javascript:validate();" style="width:74px; height: 20px; margin-left: 10px; border: none; vertical-align: middle; background: transparent;"> <input type="image" src="<fl:link url="/icons/ico/fermer_red_long.gif"/>" onclick="javascript:closeWindow();" style="width:74px; height: 20px; margin-left: 10px; border: none; vertical-align: middle; background: transparent;"></div> </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