Edit C:\Windows\install\galaxie_p01_01-10\marketing\callinglist\call.jsp
<%@page import="org.apache.commons.lang.StringUtils"%> <%/****************************************************************************** * 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.text.*,java.lang.reflect.*, com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.services.cti.CTIServiceClient" %> <%@ taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <script language="javascript" type="text/javascript" src="<fl:webapp/>/js/smalltabs.jsp"></script> <jsp:useBean class="com.edeal.frontline.PersonEventBean" id="PersonEvent" scope="request"/> <% 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 id = flRequest.getRequestParameterOrAttribute("id"); String lc = flRequest.getRequestParameterOrAttribute("lc"); String pPhone = flRequest.getRequestParameterOrAttribute("pPhone"); Vector tmkLabels = dico.getRefList(session, "Tmk", "Te1"); PersonBean person = new PersonBean(PersonEvent.getPvtPersonID(), session); String pvtEventID = null; try { pvtEventID = PersonEvent.getPvtEventID(); } catch(FieldNotInitializedException fnie){ } ScriptBean script = null; String[][] query = {{"ScrEventID = " + Utils.formatToSQL(context, pvtEventID)}}; String[] fields = {"ScrID"}; Vector list = ScriptBean.list(session, query); if (list != null && list.size() > 0) { script = (ScriptBean) list.elementAt(0); } //Code récupéré de marketing/callinglist/list.jsp boolean isCTIActive = false; try { final CTIServiceClient cti = (CTIServiceClient)context.getServiceManager().getServiceClient(session, "CTI"); isCTIActive = (cti != null); } catch (Exception e) { } String actID = (String)session.getAttribute("actorID"); boolean actHasCTILic; try { actHasCTILic = ((Boolean)session.getAttribute("actorHasCTI")).booleanValue(); } catch (Exception e) { // Lic V3 version actHasCTILic = context.getLicenceManager().actorHasSoftware(actID, CTIServiceClient.CTI_LIC_CODE, LicenceManager.LicenceType.PermanentLicence, null); session.setAttribute("actorHasCTI", new Boolean(actHasCTILic)); } String strActID = (String) session.getAttribute("actorID"); %> <html> <head> <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/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/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 language="javascript"> function useCTI(){ <% if (isCTIActive && actHasCTILic) { %> doCall(<%= pPhone %>, '', '',1 ); <% } %> } function doCall(tmkID, note, statut, interloc) { var mf = document.forms[0]; if (note == 1) { if (mf.elements["PvtNote_" + tmkID].value == "") { alert('<fl:getMessage code="M6069" alt="Veuillez saisir une note." js="true"/>'); mf.elements["PvtNote_" + tmkID].focus(); return; } else { mf.PvtNote.value = mf.elements["PvtNote_" + tmkID].value; } } mf.PvtInsStatus.value = statut; mf.PvtTMK.value = tmkID; if (interloc == 1) { if ('<%= script %>' == 'null') { alert('<fl:getMessage code="M606A" alt="Aucun script n\'est rattaché à cet événement." js="true"/>'); return; } //**************************************************************************************** //Je ne touche pas a cette partie tant que les pages des scriptResponse ne sont pas faites //**************************************************************************************** var url = "<fl:webapp/>/preview_scriptresponse.fl?scriptID=<%= script != null ? script.getScrID() : "" %>&preview=0&lsePosition=0&hasNotes=<%= (script != null && script.isScrHasNotes()) ? "true": ""%>&perID=<%= PersonEvent.getPvtPersonID() %>"; var returnScript = "<scr" + "ipt language=\"JavaScript\">" + "window.resizeTo(800,700);" + "window.location = '" + url + "';</scr" + "ipt>"; mf.elements["$$returnedHtmlHead"].value = returnScript; mf.elements["$$returnedHtmlBody"].value = "..."; } else { var returnScript = "<scr" + "ipt language=\"JavaScript\">window.top.close();</scr" + "ipt>" <% if (StringUtils.isNotEmpty(lc)) { %> returnScript = "<scr" + "ipt language=\"JavaScript\">if (window.top.opener._grid__<%= lc %>_js_ != undefined) { window.top.opener._grid__<%= lc %>_js_.reLoad(); } window.top.close();</scr" + "ipt>" <% } %> mf.elements["$$returnedHtmlHead"].value = returnScript; mf.elements["$$returnedHtmlBody"].value = "..."; } mf.submit(); } </script> <title><fl:getMessage code="L2025" alt="e-Deal"/></title> </head> <body onload="useCTI()"> <div id="object_css" style="top: 0px; left: 0px; bottom: 0px; height: 100%;"> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"L6204\", false, true, \"Appel\") + \" : \" + person %>" showFooter="false"> <form method="post" action="<%= flRequest.computeURL("/save_personevent_scr.fl?id=" + id) %>" > <input type="hidden" name="$$multivalSeparator" value=";"> <input type="hidden" name="$$presentFields"> <input type="hidden" name="$$returnedHtmlHead" value=""> <input type="hidden" name="$$returnedHtmlBody" value=""> <input type="hidden" name="PvtInsStatus" value="<fl:getProperty name="PersonEvent" property="PvtInsStatus" alt=""/>"> <input type="hidden" name="PvtTMK" value=""> <input type="hidden" name="PvtNote" value=""> <table cellspacing="3" cellpadding="3" width="95%" border=0 align="center"> <% //FOR EACH POSSIBLE TMK STATUS for (int i = 0 ; i < tmkLabels.size() ; i++) { //TMK STATUS LABEL String label = (String)((Vector)tmkLabels.elementAt(i)).elementAt(1); String tmkID = (String)((Vector)tmkLabels.elementAt(i)).elementAt(0); //WHETHER THIS TMK STATUS NEEDS A NOTE Double note = (Double)dico.getRefDisp(session, "Tmk", "Nu1", tmkID); //THE PVTSTATUS THAT WILL BE SET //Double statut = (Double)dico.getRefDisp(session, "Tmk", "Nu2", tmkID); String codeStatut = (String)dico.getRefDisp(session, "Tmk", "Te2", tmkID); String statut = null; try { statut = dico.getRefIdByCode("PvtInsStatus", codeStatut); } catch (Exception e) { } //WHETHER THIS TMK STATUS MEANS THAT WE SUCCEED IN SPEAKING TO THE PERSON (HENCE THE SCRIPT) Double interloc = (Double)dico.getRefDisp(session, "Tmk", "Nu3", tmkID); String link = "javascript:doCall('" + tmkID + "', " + (note != null ? note.toString() : "0") + ", '" + (statut != null ? statut : "") + "', " + (interloc != null ? interloc.toString() : "0") + ")"; %> <tr valign="top"> <td class="dataLabel" style="text-align: left" width="40%"> <%--<a href="<%= link %>"><%= label %></a>--%> <%= label %> </td> <td class="dataValue" width="50%"> <% String input = "<input type=\"hidden\" name=\"mandatory\" value=\"" + "PvtNote_" + tmkID + "\">"; input += "<input type=\"hidden\" id=\"mandatory.PvtNote_" + tmkID + "\" name=\"mandatory.PvtNote_" + tmkID + "\" value=\"" + Utils.getMessage(session, "M6069", "Veuillez saisir une note.") + "\">"; input += "<input class=\"chpsTextObligatoire\" type=\"text\" name=\"PvtNote_" + tmkID + "\" maxlength=\"250\" style=\"width:100%\">" ; input += "<span id=\"" + "PvtNote_" + tmkID + "_msg\" class=\"mandatory_alert\" style=\"display: none\">!</span>"; %> <%= note.equals(new Double("1")) ? input : " " %> </td> <td width="10%"><a href="<%= link %>"><img src="<fl:webapp/>/icons/ico/cochevalid.gif"/></a></td> </tr> <% } %> </table> </form> </fl:bigTabs> <br> <div align="center"><a href="javaScript:window.top.close()"><img src="<fl:webapp/>/icons/ico/fermer_red_long.gif" class="cancel_button_new"></a></div> </body>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de