Edit C:\Windows\install\galaxie_p01_01-10\marketing\callinglist\list_criteria.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.lang.reflect.*,com.edeal.frontline.navigation.*"%> <%@ page import="com.edeal.frontline.controller.actions.SelectAction" %> <%@ page import="com.edeal.frontline.PersonEventBean" %> <%@ page import="com.edeal.frontline.controller.actions.custom.PersonEventsTableAction" %> <%@ page import="com.edeal.frontline.FlLocale" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl"%> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/jsOnload.jsp"></script> <% 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 preview = flRequest.getSearchCriteria("$$preview"); String nb = flRequest.getSearchCriteria("$$nb"); String nom = flRequest.getSearchCriteria("PvtPersonID:PerName"); String profession = flRequest.getSearchCriteria("PvtPersonID:PerFctID"); String commercial = flRequest.getSearchCriteria("PvtPersonID:PerEntID:EntActID"); String reload = flRequest.getSearchCriteria("reload"); String etat = flRequest.getSearchCriteria("PvtTMK"); String statut = flRequest.getSearchCriteria("PvtStatus"); //EVENT INFO String pvtEventID = flRequest.getRequestParameterOrAttribute("PvtEventID"); // if (pvtEventID==null) pvtEventID=""; String dispEvent = null; String evtLabel=Utils.getMessage(session, "L614B", "<Evénement>"); Vector eventStatusList = new Vector(); // List code String lc = flRequest.getRequestParameterOrAttribute("lc"); if (lc == null) { lc = flRequest.getRequestParameterOrAttribute("code"); } if (lc == null) { lc = "CALLINGLIST"; } request.setAttribute("lc", lc); // search criteria String sc = flRequest.getRequestParameterOrAttribute("sc"); // object uri String ou = flRequest.getRequestParameterOrAttribute("ou"); Map searchCriteria = new Hashtable(); String str = ""; if (sc != null) { searchCriteria = WebUtils.parseQueryString(sc); try { Vector v = (Vector)searchCriteria.get("PvtPersonID:PerName"); if (nom == null && v != null) { nom = (String) v.get(0); } v = (Vector)searchCriteria.get("PvtPersonID:PerFctID"); if (profession == null && v != null) { profession = (String) v.get(0); } v = (Vector)searchCriteria.get("PvtPersonID:PerEntID:EntActID"); if (commercial == null && v != null) { commercial = (String) v.get(0); } v = (Vector)searchCriteria.get("PvtEventID"); if (pvtEventID == null && v != null && !"1".equals(reload)) { pvtEventID = (String) v.get(0); } } catch(Exception e) { } } if (pvtEventID != null && !"".equals(pvtEventID)) { EventBean event = new EventBean(pvtEventID, session); String eCode = ""; try { eCode = event.getEvtCode(); } catch (FieldNotInitializedException fnie) { } try { evtLabel = event.getEvtLabel(); } catch (FieldNotInitializedException fnie) { } dispEvent = (eCode + " - " + evtLabel).trim(); for (int i = 0; i < 10; i++) { String evtStatus = null; try { Method getter = Class.forName("com.edeal.frontline.EventBean").getMethod("getEvtStatus" + i , null); evtStatus = (String) getter.invoke(event, null); } catch (Exception e) { } if (evtStatus != null) { Vector oneStatus = new Vector(); oneStatus.add(Integer.toString(i)); oneStatus.add(evtStatus); eventStatusList.add(oneStatus); } } } else { pvtEventID = ""; } request.setAttribute("selectedTab", "0"); %> <script language="javascript"> function showEditableCrits(val) { if(val!=false) val=true; if(val){ readyToResize = 2; $('#criteriaTableRow').show('normal',stepReadyResize); $('#ShowCritsLinkDiv').hide('normal',stepReadyResize); }else{ $('#resultZone').show(); $('#criteriaTableRow').hide(); } } function appel(fct) { } function myReplace(maChaine , ca , parCa) { return (maChaine.split(ca).join(parCa)); } function clearEvent() { var mf = document.forms[0]; mf.PvtEventID.value = ""; mf.lblPvtEventID.value = "<fl:getMessage code="L614B" alt="<Evénement>" js="true"/>"; doPvtEventIDChange(); } //THIS FUNCTION IS CALLED FROM THE EVENT SELECTION WINDOW. function doPvtEventIDChange() { var f = document.forms[0]; var query = ""; if (f.Nom.value != "<fl:getMessage code="L2040" alt="<Nom>" js="true"/>") { var strValue = f.Nom.value; query += "PvtPersonID:PerName=" + encodeURIComponent(strValue).split("+").join("%2b") + "&"; } if (f.Profession.value != "<fl:getMessage code="L2041" alt="<Profession>" js="true"/>") { var strValue = f.Profession.value; query += "PvtPersonID:PerFctID=" + encodeURIComponent(strValue).split("+").join("%2b") + "&"; } if (f.Commercial.value != "<fl:getMessage code="L1059" alt="<Commercial>" js="true"/>") { var strValue = f.Commercial.value; query += "PvtPersonID:PerEntID:EntActID=" + encodeURIComponent(strValue).split("+").join("%2b") + "&"; } if (f.PvtEventID.value != "") { var strValue = f.PvtEventID.value; query += "PvtEventID=" + encodeURIComponent(strValue).split("+").join("%2b") + "&"; } if (f.PvtTMK.options[f.PvtTMK.selectedIndex].value != "") { var strValue = f.PvtTMK.options[f.PvtTMK.selectedIndex].value; query += "PvtTMK=" + encodeURIComponent(strValue).split("+").join("%2b") + "&"; } //Flag submit query += "submitFlag=1"; query += "&reload=1" window.location = '<%= flRequest.computeURL("/callinglist_criteria.fl", true, true, true) %>' + '&' + query; } function doSearch() { showEditableCrits(false); //REFAIRE LA QUERY AVEC LES NOUVEAUX STANDARD var myQuery = ""; var debReq = ""; var myForm = document.forms[0]; try { if (acCurHighlightedDiv != null) { return false; } } catch (error) { } var nbInt = myForm.$$nb.options[myForm.$$nb.selectedIndex].value; var preview = myForm.$$preview.checked; var myQuery = '$$nb=' + nbInt + (preview ? '&$$preview=' + preview : ''); if (myForm.Nom.value != '<fl:getMessage code="L2040" alt="<Nom>" js="true"/>') { var strValue = myForm.Nom.value; myQuery += "&PvtPersonID:PerName=" + strValue; } if (myForm.Profession.value != '<fl:getMessage code="L2041" alt="<Profession>" js="true"/>') { var strValue = myForm.Profession.value; myQuery += "&PvtPersonID:PerFctID=" + strValue; } if (myForm.Commercial.value != '<fl:getMessage code="L1059" alt="<Commercial>" js="true"/>') { var strValue = myForm.Commercial.value; myQuery += "&PvtPersonID:PerEntID:EntActID=" + strValue; } if (myForm.PvtEventID.value != '') { var strValue = myForm.PvtEventID.value; myQuery += "&PvtEventID=" + strValue; } if (myForm.PvtStatus.options[myForm.PvtStatus.selectedIndex].value != "") { var strValue = myForm.PvtStatus.options[myForm.PvtStatus.selectedIndex].value; myQuery += "&PvtStatus=" + strValue; } if (myForm.PvtTMK.options[myForm.PvtTMK.selectedIndex].value != "") { var strValue = myForm.PvtTMK.options[myForm.PvtTMK.selectedIndex].value; myQuery += "&PvtTMK=" + strValue; } if (myQuery == "") { myQuery = '&submitFlag=1&sc='; } else { myQuery = '&'+myQuery+'submitFlag=1&' + 'sc='+encodeURIComponent(myQuery) ; } _grid__<%= lc %>_js_.callAjaxForHtml(null, myQuery); } function critOnKeyPress(event) { var keyPress = 0; try { keyPress = event.which; } catch (error) { } if (keyPress == 0) { try { keyPress = window.event.keyCode; } catch (error) { } } // Someone pressed the enter key, AND we're not AC'ing if (keyPress == 13 && acCurHighlightedDiv == null) { doSearch(); } } function doOnLoad() { window.document.forms[0].onsubmit = doSearch; document.onkeypress = critOnKeyPress; } </script> <form method="post" action="<fl:link url="/callinglist_result.fl"/>" > <input type="hidden" name="lc" value="<%= Utils.formatToWeb(lc, true) %>"> <input type="hidden" name="sc" value=""> <input type="hidden" name="ou" value="<%= Utils.formatToWeb(ou, true) %>"> <input type="hidden" name="lu" value="/callinglist_result.fl"> <input type="hidden" name="cu" value="/callinglist_criteria.fl"> <input type="hidden" name="obj.title" value="<%= Utils.getMessage(session, "L6200", "Liste d\'appel") %>"> <input type="hidden" name="gridName" value="callingList"> <fl:bigTabs objectTitle="<%=Utils.getMessage(session, \"L6200\", \"Liste d\\'appel\")%>" criteriaTitle="<%=Utils.getMessage(session, \"L64CD\", \"Recherche liste d\\'appel\")%>" listTitle="<%=Utils.getMessage(session, \"L6200\", false, true, \"Liste d\\'appel\")%>" lu="/callinglist_result.fl?gridName=callingList" cu="/callinglist_critetia.fl"> <table class="container" cellpadding="0"> <tr> <td> <div class="criteriaTableDiv"> <input class="criteriaField" type="text" name="Nom" value="<%= nom != null ? Utils.formatToWeb(nom,true) : Utils.getMessage(session, "L2040", "<Nom>") %>" onfocus="if (this.value=='<fl:getMessage code="L2040" alt="<Nom>" js="true"/>') this.value='';" onblur="if (this.value == '') this.value = '<fl:getMessage code="L2040" alt="<Nom>" js="true"/>';"> <input class="criteriaField" type="text" name="Profession" value="<%= profession != null ? Utils.formatToWeb(profession,true) : Utils.getMessage(session, "L2041", "<Profession>") %>" onfocus="if (this.value=='<fl:getMessage code="L2041" alt="<Profession>" js="true"/>') this.value='';" onblur="if (this.value == '') this.value = '<fl:getMessage code="L2041" alt="<Profession>" js="true"/>';"> <input class="criteriaField" type="text" name="Commercial" value="<%= commercial != null ? Utils.formatToWeb(commercial,true) : Utils.getMessage(session, "L1059", "<Commercial>") %>" onfocus="if (this.value=='<fl:getMessage code="L1059" alt="<Commercial>" js="true"/>') this.value='';" onblur="if (this.value == '') this.value = '<fl:getMessage code="L1059" alt="<Commercial>" js="true"/>';"><br> <br> <input id="PvtEventID" name="PvtEventID" type="hidden" value="<%=pvtEventID%>"> <input id="lblPvtEventID" name="lblPvtEventID" onblur="doPvtEventIDChange();" class="criteriaField" type="text" value="<%=evtLabel%>" autocomplete="off" onfocus="displayOnFocus(this);"> <a href="javascript:var win = window.open('<fl:webapp/>/select.fl?type=Event&field=PvtEventID&formIndex=0', 'SelectEvent', 'menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=800,height=350')" tabindex="3"><img src="<fl:webapp/>/icons/ico/rechercher.gif" class="icon"></a> <a href="javascript:clearEvent();" tabindex="4"><img src="<fl:webapp/>/icons/ico/supprimer.gif" class="icon"></a> <script language="javascript">runOnTime('installFobAC(document.forms[0].lblPvtEventID);', 200);</script> <select class="criteriaField" name="PvtStatus"> <option value=""><fl:getMessage code="L6203" alt="<Statut>"/></option> <% if (eventStatusList != null && eventStatusList.size() > 0) { for (int i=0 ; i < eventStatusList.size() ; i++) { // evtCurrentStatus int statusPos = Integer.parseInt((String) ((Vector) eventStatusList.elementAt(i)).elementAt(0)); String statusLabel = (String) ((Vector) eventStatusList.elementAt(i)).elementAt(1); %> <option value="<%= Integer.toString(statusPos) %>" <%= (statut != null && Integer.toString(statusPos).equals(statut)) ? " selected" : "" %> ><%= statusLabel %></option> <% } } %> </select> <select name="PvtTMK" class="criteriaField"> <option value=""><fl:getMessage code="L6202" alt="<Etat>"/></option> <% Vector vectEtat = dico.getRefList("PvtTMK"); for (int j=0 ; j < vectEtat.size() ; j++) { Vector vectorEtat = (Vector) vectEtat.elementAt(j); String etatID = (String) vectorEtat.elementAt(0); String etatDisp = (String) vectorEtat.elementAt(1); %> <option value="<%= etatID %>" <%= (etatID != null && etatID.equals(etat)) ? " selected" : "" %>><%= Utils.formatToWeb(etatDisp,false) %></option> <% } %> </select> </div> </td> <td class="separation"><div class="separation"></div></td> <td valign="top" style="width: 15%;"> <table class="container" cellpadding="0"> <tr> <td style="white-space: nowrap; width: 10%; text-align: left;"> <input name="$$preview" type="checkbox" value="1" > </td> <td style="text-align: left;"> <span class="dataLabel" style="width: auto; vertical-align:bottom; align=left">aperçu</span> </td> </tr> <tr class="ligne_separation"><td></td></tr> <tr> <td colspan="2" style="text-align: left;"> <select name="$$nb"> <option value="20" <%= nb == null || "20".equals(nb) ? "selected" : "" %> >20 / <fl:getMessage code="M60CC" alt="page" /></option> <option value="50" <%= "50".equals(nb) ? "selected" : "" %> >50 / <fl:getMessage code="M60CC" alt="page" /></option> <option value="All" <%= "All".equals(nb) ? "selected" : "" %> ><fl:getMessage code="L302C" alt="Toutes"/></option> </select> </td> </tr> <tr class="ligne_separation"><td></td></tr> <tr> <td colspan="2"> <a href="javascript:doSearch()"><img src="<fl:webapp/>/icons/ico/valid_green2_long.gif" ></a> </td> </tr> </table> </td> </tr> </table> <div id="resultZone" style="display:none"> <h2 id="H2Result" > <span><fl:getMessage code="L200C" alt="Résultat"/></span> </h2> <div id="ShowCritsLinkDiv" style="display:none; position: absolute; left: 50%; right: 50%;"> <a href="javascript:showEditableCrits()" title="Montrer les critères de recherche"><img src="<fl:webapp/>/icons/ico/expand.gif"></a> </div> <fl:grid height="100%" allowUpdate="true" name="<%= lc %>" ajaxUrl="/callinglist_ajax.fl?" /> </div> </fl:bigTabs>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de