Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\sales\person\select_doublons_popup.jsp
<%@page import="java.util.Iterator"%> <%@page import="org.json.JSONObject"%> <%@page import="org.json.JSONArray"%> <% /****************************************************************************** * 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 session="true"%> <%@ page import="com.google.gdata.model.Element"%> <%@ page import="com.google.gson.JsonElement"%> <%@ page import="com.google.gson.JsonObject"%> <%@ page import="com.edeal.frontline.helper.MatchCodeBaseHelper"%> <%@ page import="com.google.gson.JsonArray"%> <%@ page import="com.google.gson.JsonParser"%> <%@ page import="java.util.Hashtable"%> <%@ page import="java.util.Vector"%> <%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ 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="com.edeal.frontline.helper.ContextHelper" %> <%@ page import="com.edeal.frontline.helper.DoubloonServices" %> <%@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(); JSONArray doublons = (JSONArray)flRequest.getAttribute("doublons"); String objID = flRequest.getRequestParameterOrAttribute("objID"); DoubloonServices doubloonServices = DoubloonServices.getInstance(context, objID, true, true, true); Vector<String>[] fieldsSqlAndDisplay = doubloonServices.initialyseForWrite(); Vector<String> matchCodeFields = fieldsSqlAndDisplay[0]; Vector<String> fieldDisplay = fieldsSqlAndDisplay[1]; int seuilcert = doubloonServices.getCertThreshold(); boolean newPer = false; Vector individualFields = dico.getRefList("Idf", "Te1"); %> <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> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <style type="text/css"> .popup-div { /*width: 800px;*/ } .popup-content { height: 99%; margin-top: 5px; margin-bottom: 5px; } </style> <script type="text/javascript" language="javascript"> function newFunctionFromDuplicatePopup(parentID) { var w = window; if (w.doRefreshPerson) { w.doRefreshPerson(parentID); } } </script> <table cellspacing="0" border="0"> <tr class="tooltip" height="10px"> <td class="corner" id="topleft" width="19px"><img src="<fl:webapp/>/icons/tooltip/bubble-1.png"/></td> <td class="top" style="background-image:url('<fl:webapp/>/icons/tooltip/bubble-2.png'); align: center"></td> <td class="corner" id="topright"><img src="<fl:webapp/>/icons/tooltip/bubble-3.png"/></td> </tr> <tr class="tooltip"> <td class="left" style="background-image:url('<fl:webapp/>/icons/tooltip/bubble-4.png');"></td> <td style="vertical-align: top;"> <table class="data_column, innerPopup" cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td nowrap="nowrap"> <div class="popup-div"> <div class="popup-content"> <table cellspacing="0" cellpadding="0" border="0" style="width: 500px; height: 200px"> <tr style="height: 43px;"> <td><img width="10" height="10" src="<fl:webapp/>/icons/spacer.gif"></td> <td width="98%" valign="top" colspan="3"> <table cellpadding="0" class="container" id="BTabs"> <tr> <td style="text-align: right; width: 15px;"><img style="width: 15px; height: 43px;" src="<fl:webapp/>/icons/nav/principal_onglet/ong_blanc_pos_1.gif"></td> <td class="ongletblanc"> <fl:getMessage code="L812E" alt="Détection de doublons"/> </td> <td class="actif-fin"></td> <td style="width: 90%; text-align: right; background: url("<fl:webapp/>/icons/nav/principal_onglet/fd_cell.gif") repeat scroll 0% 0% transparent;" class="tabRightSpace"></td> <td class="finTab"> </td> </tr> </table> </td> <td width="10"><img width="10" height="10" src="<fl:webapp/>/icons/spacer.gif"></td> </tr> <tr style="height: 100%;"> <td width="10"><img width="10" height="10" src="<fl:webapp/>/icons/spacer.gif"></td> <td width="15" background="<fl:webapp/>/icons/nav/principal_cadre/fd_cell_g.gif"><img width="15" height="42" src="<fl:webapp/>/icons/spacer.gif"></td> <td valign="top"> <div class="edealGrid" style="valign:top;"> <div id="grid-data" style="valign:top"> <table class="container" id="doublon_content" cellpadding="0"> <thead> <tr valign="top"> <th style="width: 10%"> </th> <% for (String fieldDisp : matchCodeFields) { %> <th><fl:label field="<%= fieldDisp %>" /></th> <% } %> </tr> </thead> <% String lastPerFctParentID = null; boolean oddRow = false; for (int i=0; i<doublons.length(); i++) { JSONObject doub = (JSONObject)doublons.get(i); // for (JSONObject doub : doublons) { oddRow = !oddRow; String perFctParentID = (String)doub.get("perFctParentID"); String id = (String)doub.get("id"); int poids = (Integer)doub.get("poids"); newPer = false; if (lastPerFctParentID == null || !lastPerFctParentID.equals(perFctParentID)) { lastPerFctParentID = perFctParentID; newPer = true; } String poidsColor = ""; if (poids >= seuilcert) { poidsColor = "background-color: #F2D5D9;"; %> <tr id="tr_<%= id %>" style="<%= (newPer ? "font-weight: bold;" : "" ) %>" class="<%= (!oddRow ? "even" : "odd") %> bean"> <% } else { poidsColor = "background-color: #FBFAC8;"; %> <tr id="tr_<%= id %>" style="<%= (newPer ? "font-weight: bold;" : "" ) %>" class="<%= (!oddRow ? "even" : "odd") %> bean"> <% } %> <td style="<%= poidsColor %>"> <% if (newPer) { %> <a href="javascript:newFunctionFromDuplicatePopup('<%= perFctParentID %>')"><img title="<fl:getMessage code="L813C" alt="Nouvelle fonction"/>" alt="<fl:getMessage code="L813C" alt="Nouvelle fonction"/>" src="<fl:webapp/>/icons/ico/creer.gif"></a> <% } else { %> <img height="17" width="17" src="<fl:webapp/>/icons/spacer.gif"> <% } %> <a href="javascript:doMerge('<%= id %>')"><img title="<fl:getMessage code="L6181" alt="Fusionner"/>" alt="<fl:getMessage code="L6181" alt="Fusionner"/>" src="<fl:webapp/>/icons/fusion.gif"></a> <a href="javascript:isNotDoublon('<%= id %>','<%= poids %>')"><img title="<fl:getMessage code="L81AE" alt="Enregistrer en non doublon"/>" alt="<fl:getMessage code="L81AE" alt="Enregistrer en non doublon"/>" src="<fl:webapp/>/icons/ico/supprimer.gif"></a> </td> <% for (String field : matchCodeFields) { if (newPer && !individualFields.contains(field)) { %> <td style="text-align: center"> <% } else { %> <td style="text-align: center; font-style: italic;"> <% } String val = ""; try { val = Utils.formatToWeb((String)doub.get(field), true); } catch (Exception ex) { logger.error("Error when getting json value for field", ex); } %> <%= val %> </td> <% } %> </tr> <% } %> </table> </div> </div> </td> <td width="15" background="<fl:webapp/>/icons/nav/principal_cadre/fd_cell_d.gif"><img width="15" height="42" src="<fl:webapp/>/icons/spacer.gif"></td> <td width="10"><img width="10" height="10" src="<fl:webapp/>/icons/spacer.gif"></td> </tr> <tr style="height: 15px;"> <td width="10"><img width="10" height="10" src="<fl:webapp/>/icons/spacer.gif"></td> <td width="15"><img width="15" height="15" src="<fl:webapp/>/icons/nav/principal_cadre/cell_bas_g.gif"></td> <td width="98%" background="<fl:webapp/>/icons/nav/principal_cadre/fd_cell_bas_m.gif"><img width="15" height="15" src="<fl:webapp/>/icons/spacer.gif"></td> <td width="15"><img width="15" height="15" src="<fl:webapp/>/icons/nav/principal_cadre/cell_bas_d.gif"></td> <td width="10"><img width="10" height="10" src="<fl:webapp/>/icons/spacer.gif"></td> </tr> <tr style="height: 20px;"> <td colspan="5" style="text-align: center;"> <div> <a title="<fl:getMessage code="A3035" alt="Fermer"/>" href="javascript:doClosePopUp('doublonPopup');"><img src="<fl:webapp/>/icons/ico/fermer_red_long.gif" /></a> </div> </td> </tr> </table> </div> </div> </td> </tr> </table> </td> <td class="right" style="background-image:url('<fl:webapp/>/icons/tooltip/bubble-5.png')" width="19px"></td> </tr> <tr class="tooltip"> <td class="corner" id="bottomleft" style="background-image:url('<fl:webapp/>/icons/tooltip/bubble-6.png')" ></td> <td class="bottom" style="background-image:url('<fl:webapp/>/icons/tooltip/bubble-7.png')" width="30" height="20"></td> <td class="corner" id="bottomright" style="background-image:url('<fl:webapp/>/icons/tooltip/bubble-8.png')"></td> </tr> </table>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de