Edit C:\Windows\install\galaxie_p02_26-09\common\list\list_action.jsp
<% /****************************************************************************** * Copyright (c) 2000-2011 E-DEAL * * E-DEAL S.A. * 41, rue Périer * 92120 Montrouge * France * * T: +33 (0)1 73 03 29 80 * 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 language="java" session="true"%> <%@ page import="com.edeal.frontline.navigation.*"%> <%@ page import="com.edeal.frontline.*"%> <%@ page import="com.edeal.frontline.helper.custom.*"%> <%@ page import="com.edeal.frontline.custom.*" %> <%@ page import="java.util.Hashtable"%> <%@page import="java.util.Vector"%> <jsp:useBean id="List" class="com.edeal.frontline.ListBean" scope="request" /> <%@ 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(); String objSql = flRequest.getRequestParameterOrAttribute("objsql"); String lc = flRequest.getRequestParameterOrAttribute("lc"); String pPhone = null; if (lc != null && lc.equals("ENTSEARCH")){ pPhone = flRequest.getSearchCriteria("EntPhone"); } else if (lc != null && lc.equals("PERSEARCH")){ pPhone = flRequest.getSearchCriteria("PerPhone"); } ListBean.ActionsMenu actionsMenu = List.getActionsMenu(); Hashtable variables = new Hashtable(); variables.put("objSql", objSql); EdealBigTabsNavigation bTabNav = new EdealBigTabsNavigation(flRequest); String jsGridObject=bTabNav.getBigTabsParameterValue(EdealBigTabsNavigation.BigTabsParams.NameSearchGridJs); boolean fHasCreationRight=true; DataDictionary dico=context.getDataDictionary(); //Get the object which the list is attached to, and check if the session actor is allowed to create such an object ObjectsBean object=dico.getTable("ID",List.getLstObjID()); BasicBean bean=object.getBasicBean(null,session); fHasCreationRight=bean.enforceAccess(AccessControlManager.CREATE); // Partie pour permettre la génération du catalogue d'associations Boolean listeTiers = false; String idCatAsso = ""; if (lc != null && lc.equals("MY_ASSOS")){ if (objSql.equalsIgnoreCase("enterprise")) { String[] fields = {"Cg_ID"}; String[][] query = {{"Cg_Code = 'ASSO'"}}; String[] orderBy = {"Cg_CrDt DESC"}; Vector list = Catalogue_Bean.listSummary(context, fields, query); // on prend le premier catalogue si la liste n'est pas vide if(list != null && !list.isEmpty()) { listeTiers = true; Hashtable tab = (Hashtable)list.firstElement(); idCatAsso = (String)tab.get("Cg_ID"); } } } Boolean fHasExcelExport = true; try { fHasExcelExport = actionsMenu.fHasExcelExport(); } catch (Exception e) { } %> <script language="javascript"> function doWord(id,obj,informat) { format = "Word"; if (informat && informat == "PDF") { format = "PDF"; } window.open('<fl:webapp/>/fusion_document.fl?format=' + format + '&idObj='+id+'&object='+obj, 'listOpp', 'menubar=no,status=no,toolbar=no,scrollbars=auto,resizable=yes,width=860,height=460'); } function doYellowPage() { var f = window.document.forms[0]; var phone =""; <%if (lc != null && lc.equals("ENTSEARCH")) {%> if (f && f.elements['EntPhone']) { phone = f.elements['EntPhone'].value; }else { <% if (pPhone!=null) { %> phone='<%= WebUtils.urlEncode(context,pPhone) %>'; <% } %> } phone = stripPhoneNo(phone); if (phone == '' || phone == '<<fl:getMessage code="F0049" alt="<Tel>" js="true"/>>') { alert('<fl:getMessage code="M60F9" alt="Une recherche sur l\'annuaire inversé Amabis ne peut être lancée si aucun numéro de téléphone n\'a été fourni." js="true"/>'); } else { window.parent.location = "<fl:webapp/>/check_phone.fl?$$presentFields=&type=Enterprise&EntPhone=" + phone + '&urlToForwardTo=' + escape('/list_criteria.fl?lc=ENTSEARCH'); } <% } else if (lc != null && lc.equals("PERSEARCH")){ %> if (f && f.elements['PerPhone']) { phone = f.elements['PerPhone'].value; }else { <% if (pPhone!=null) { %> phone='<%= WebUtils.urlEncode(context,pPhone) %>'; <% } %> } phone = stripPhoneNo(phone); if (phone == '' || phone == '<<fl:getMessage code="F0049" alt="<Tel>" js="true"/>>') { alert('<fl:getMessage code="M60F9" alt="Une recherche sur l\'annuaire inversé Amabis ne peut être lancée si aucun numéro de téléphone n\'a été fourni." js="true"/>'); } else { window.parent.location = "<fl:webapp/>/check_phone.fl?$$presentFields=&type=Person&PerPhone=" + phone + '&urlToForwardTo=' + escape('/list_criteria.fl?lc=PERSEARCH'); } <% } %> } function stripPhoneNo(phoneNo) { if (phoneNo == '') { return ''; } // We have to strip the extraneous characters from the phone to make it work properly var finalPhone = ''; var haveParan = false; for (var cnt = 0; cnt < phoneNo.length; cnt++) { var charPhoneNo = phoneNo.charAt(cnt); if (charPhoneNo == '(') { haveParan = true; continue; } if (charPhoneNo == ')') { haveParan = false; continue; } if (haveParan) { continue; } switch (charPhoneNo) { case '+': case '.': case ' ': continue; } finalPhone += charPhoneNo; } return finalPhone; } </script> <% if (fHasExcelExport) { %> <!--On enlève l'export excel sur toutes les listes --> <%-- <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1 actions_nolabel"> <a class="doc_fusion word" title="Excel" href="javascript:doGenerateCSV();"> <img src="<fl:webapp/>/icons/ico/excel.gif" border=0 width="15" height="15" alt="Excel"> </a> </div> </td> <td class="actions_cell_right"></td> </tr> --%> <% } if ((actionsMenu == null || actionsMenu.canCreate()) && fHasCreationRight) { %> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="<fl:link menu="true" list="false" url="<%= \"/create_\"+ objSql + \".fl\" %>"/>"> <p class="actions_tabletext"> <fl:getMessage code="A3057" alt="Créer" /> </p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> <% if (actionsMenu != null && actionsMenu.size() > 0) { %> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> <% } } String url=""; if(actionsMenu!=null){ for(int i=0; i<actionsMenu.size(); i++){ url=ListBean.getLinkUrl(actionsMenu.getUrlNode(i),session,variables); %> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1" id="action_<%= i %>"> <a <% if (actionsMenu.isMassSelectAction(i)) { %> href='javascript:<%=jsGridObject %>.sendMassSelect("<fl:link url='<%= url %>' list='true'/>","action_<%=i%>",<%= actionsMenu.isLayerAction(i)%>)' <%} else {%> href="<fl:link url="<%= url %>" />" <%}%>> <p class="actions_tabletext<%=actionsMenu.isMassSelectAction(i) ? " actions_massselect" : ""%>"> <% if (actionsMenu.getCodeLabel(i) != null) { %> <fl:getMessage code="<%=actionsMenu.getCodeLabel(i) %>" alt="---" /> <% } else { %> <%= actionsMenu.getDefaultLabel(i) %> <% } %> </p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> <% if (i + 1 != actionsMenu.size()) { %> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> <% } } } %> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <% String au = flRequest.getRequestParameterOrAttribute("au"); String doList = flRequest.getRequestParameterOrAttribute("doList"); String cleanUrl = "/list_criteria.fl?lc=" + lc + ((Utils.isEmpty(au)) ? "" : "&au=" + au) + ((Utils.isEmpty(doList)) ? "" : "&doList=" + doList); %> <a href="<fl:link url="<%= cleanUrl %>"/>"> <p class="actions_tabletext"> <fl:getMessage code="L70B5" alt="Reset" /> </p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> <% if (listeTiers) { %> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="javascript:doWord('<%=idCatAsso%>','Catalogue_','Word');"> <p class="actions_tabletext"><fl:getMessage code="LF0D7" alt="Générer le catalogue des Associations"/></p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> <% } %>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de