<%@page import="com.edeal.frontline.*,java.util.*,com.edeal.frontline.services.*,com.edeal.frontline.services.cti.*,com.edeal.frontline.navigation.FlRequest"%><%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %><%FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); Boolean actHasCTILic = (Boolean)flRequest.getAttribute("actHasCTILic"); Boolean isDoCTIWindow = (Boolean)flRequest.getAttribute("isDoCTIWindow"); String actID = (String)session.getAttribute("actorID"); if (actHasCTILic == null) { actHasCTILic = false; } if (isDoCTIWindow == null) { isDoCTIWindow = false; } //if CTI is activated, the CTI window will pop up. //if not, it is hidden in the main frameset and the ActiveX control should not be loaded. CTIServiceClient cti; try { cti = (CTIServiceClient)context.getServiceManager().getServiceClient(session, "CTI"); } catch (FlServiceException e) { cti = null; } boolean activateCTI = (cti != null); // DGE : vocalcom add-on. boolean vocalcomCTI = false; boolean C3TCTI = false; if (activateCTI) { try { String idService = cti.getProviderId(); vocalcomCTI = "vocalcom".equalsIgnoreCase(idService); C3TCTI = "C3T".equalsIgnoreCase(idService); } catch(Exception e) { //logger.error("CTI Service Error : ", e); } } String windowWidth = "200"; if (vocalcomCTI) { windowWidth = "800"; } if (isDoCTIWindow && actHasCTILic) {%> var cookieValue = readCookie('EdealCtiWindow_<%=actID%>'); <%if (C3TCTI) {%> if (window.top.location === window.location) { //prevent loading C3T Panel for dashboards $("body").append("
"); $('#C3TPanel').load('/cti/C3T/cti.jsp'); } <%} else {%> if (cookieValue == null) { // if the cookie could not be set in the CTI before the attempt to read it // in the lines upper, then set it now in order to avoid loading the // window ctiWindow multiple times if these instructions are executed // concurrently cookieValue = createCookie('EdealCtiWindow_<%=actID%>', '1'); var ctiWindow = window.open('/cti/cti.jsp', 'CTI', 'menubar=no,status=yes,toolbar=no,scrollbars=no,resizable=yes,width=<%= windowWidth %>,height=200'); } <% } %> <% } %>