Edit C:\Windows\install\galaxie_p01_15-09\sales\interaction\list_criteria.jsp
<%@ page language="java"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="java.util.Map" %> <%@ page import="com.edeal.frontline.navigation.WebUtils" %> <%@ page import="com.edeal.frontline.ActorBean" %> <%@ page import="com.edeal.frontline.AccessDeniedException" %> <%@ page import="com.edeal.frontline.InteractionBean" %> <%@ page import="com.edeal.frontline.controller.actions.SelectAction" %> <%@page import="com.edeal.frontline.navigation.EdealBigTabsNavigation"%> <%@page import="com.edeal.frontline.navigation.EdealBigTabsNavigation.BigTabsParams"%> <%@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(); String pIntType = flRequest.getSearchCriteria("IntType"); if(pIntType == null) { pIntType = "0"; } String pIntStiID = flRequest.getSearchCriteria("IntStiID"); if (pIntStiID == null) { String status = flRequest.getSearchCriteria("IntSti"); status = status != null ? status : "TODO"; pIntStiID = dico.getRefIdByCode("IntStiID", status); } boolean isDoneList = dico.getRefIdByCode("IntStiID", "DONE").equals(pIntStiID); String preview = flRequest.getSearchCriteria("$$preview"); String nb = flRequest.getSearchCriteria("$$nb"); String actID = flRequest.getSearchCriteria("ActID"); String atvID = flRequest.getSearchCriteria("IntAtvID"); if (atvID != null) { InteractionBean interaction = (new InteractionBean(session)); interaction.setIntAtvID(atvID); pageContext.setAttribute("Interaction", interaction); } String nbDays = flRequest.getSearchCriteria("nbDays"); String beforeThisWeek = flRequest.getSearchCriteria("All"); String actName = flRequest.getRequestParameterOrAttribute("ActName"); if (actID == null) { actID = flRequest.getRequestParameterOrAttribute("actID"); } if (actID == null) { actID = (String)session.getAttribute("actorID"); } String actSesName = null; try { ActorBean actBean = new ActorBean(actID, session); actSesName = actBean.toString(); }catch (AccessDeniedException ex) { } // List code String lc = flRequest.getRequestParameterOrAttribute("lc"); if (lc == null) { lc = flRequest.getRequestParameterOrAttribute("code"); } if (lc == null) { lc = "INTERACTION"; } request.setAttribute("lc", lc); // search criteria String sc = flRequest.getRequestParameterOrAttribute("sc"); // object uri String ou = flRequest.getRequestParameterOrAttribute("ou"); // id String objTitle = flRequest.getRequestParameterOrAttribute("obj.title"); String SfwID = flRequest.getRequestParameterOrAttribute("SfwID"); Map searchCriteria = new Hashtable(); if (sc != null) { searchCriteria = WebUtils.parseQueryString(sc); } request.setAttribute("selectedTab", "0"); EdealBigTabsNavigation ebtn = new EdealBigTabsNavigation(request); // Is this our first time in here? (ie, we're not navigating back from an object) boolean isFirstTimeIn = !ebtn.isDoList(); %> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/jsOnload.jsp"></script> <script language="javascript"> function doSubmit() { var f = document.forms[0]; var nbInt = f.$$nb.options[f.$$nb.selectedIndex].value; var actID = f.IntActID.value; var atvID = f.IntAtvID.options[f.IntAtvID.selectedIndex].value; var nbDays = f.nbDays.value; var preview = f.$$preview.checked; var queryString = 'ActID=' + actID+ '&IntAtvID=' + atvID + '&$$nb=' + nbInt + '&IntType=<%= pIntType %>&IntStiID=<%= pIntStiID %>' + (preview ? '&$$preview=' + preview : '') + (nbDays != '' ? '&nbDays=' + toSysNum(nbDays) : '') + '&cu=/list_criteria_interaction.fl'; <% if (!isDoneList) { %> if (!f.beforeThisWeek.checked) { queryString += "&All=1"; f.All.value = "1"; } <% } %> f.sc.value = queryString; _grid__INTERACTIONS_LIST_A_JS_js_.callAjaxForHtml(myAjaxURL_INTERACTIONS_LIST_A_JS+"&"+queryString, null, null, $('input.btMassEdit:checked').length); //document.forms[0].submit(); } function doChangeActor() { var fenetreChoix = window.open('<fl:webapp/>/select.fl?type=Actor&field=IntActID' , 'ChoixActeur' , 'menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=<%= SelectAction.SELECT_WINDOW_WIDTH %>,height=350'); } 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) { doSubmit(); } } //function doOnLoad() { // document.onkeypress = critOnKeyPress; //} </script> <%-- Le Javascript ci-dessous doit etre inclus en page, car le JSP a besoin du request --%> <script language="javascript"> function massEdit(active, edealGrid){ if(active){ $("#resultZone form input[type=submit]").show(); $("#resultZone form input[type=reset]").show(); }else{ $("#resultZone form input[type=submit]").hide(); $("#resultZone form input[type=reset]").hide(); } edealGrid.editMode(active); } function doOnLoad() { document.onkeypress = critOnKeyPress; if($('input.btMassEdit:checked').length>0){ $("#resultZone input[type=submit]").show(); $("#resultZone input[type=reset]").show(); } $('input.btMassEdit').click(function(e){ massEdit($('input.btMassEdit:checked').length, _grid__<%= "INTERACTIONS_LIST_A_JS" %>_js_); }) } // executed after edealGrid saved // data: json sent by server function callBackSave(data){ if(data.beans!=null){ $("input.btMassEdit").attr("checked", false); $("#resultZone input[type=submit]").hide(); $("#resultZone input[type=reset]").hide(); } } var readyToResize; var DIF_HEIGHT_WINDOWS_BIGTAB = 160; var updateHeightRunning = false; /* TODO à suprimer quand j'aurais comrpis où est la boucle infini sans*/ /* fonction à nettoyer quand sur qu'elle marche */ function updateHeight(){ if(updateHeightRunning) return null; updateHeightRunning = true; var resultZone = $('#resultZone').get(0); var BTBody2 = resultZone.parentNode; var innerZone = $("div.edealGrid", BTBody2).get(0); var dataZone = $(".data", innerZone).get(0); if(dataZone){ var miniCriteriaHeight = $('#criteriaReducedTR').get(0).clientHeight; var maxCriteriaHeight = $('#criteriaTableRow').get(0).clientHeight; var grid = window[EdealGrid.getJsName($(".edealGrid",resultZone).get(0).getAttribute("ed:grid-name"))]; var form = $(grid.renderElement).parent("form").get(0); var heightDisplayPreview = $('.preview',grid.renderElement).get(0); heightDisplayPreview = heightDisplayPreview ? heightDisplayPreview.clientHeight : 0; var formHeight = form ? eval(form.clientHeight) : 0; var difTopFromResZone = form ? form.offsetTop -resultZone.offsetTop : 0; var val = BTBody2.tailleMax() -miniCriteriaHeight -maxCriteriaHeight-10; resultZone.style.height = val+"px"; //alert(getWindowHeight()-DIF_HEIGHT_WINDOWS_BIGTAB +" * "+BTBody2.tailleMax()); /* var insideBigTabToHeight = BTBody2.tailleMax() < eval(resultZone.clientHeight) + miniCriteriaHeight + maxCriteriaHeight; var insideResZoneToHeight = eval(resultZone.clientHeight) < formHeight +difTopFromResZone -heightDisplayPreview +grid.maxHeightPreview; var dataZoneHeighterBigTabMax = dataZone.clientHeight > BTBody2.tailleMax(); var freeSpaceOnScreenNotEqualBigTabMax = eval(getWindowHeight()-DIF_HEIGHT_WINDOWS_BIGTAB) != BTBody2.tailleMax(); */ // console.log(insideBigTabToHeight +" || "+ insideResZoneToHeight +" || "+ dataZoneHeighterBigTabMax); /* if(!freeSpaceOnScreenNotEqualBigTabMax) console.log(eval(getWindowHeight()-DIF_HEIGHT_WINDOWS_BIGTAB)+" != " + BTBody2.tailleMax()); */ // if( insideBigTabToHeight || insideResZoneToHeight || dataZoneHeighterBigTabMax /*|| freeSpaceOnScreenNotEqualBigTabMax*/){ var difFormGrid = form ? form.offsetHeight - grid.renderElement.offsetHeight : 0; var tmp = eval(resultZone.offsetHeight -1 -(grid.maxHeightPreview + difFormGrid + ( offsetTopOrigin(dataZone) -offsetTopOrigin(resultZone) )))+"px"; dataZone.style.height = tmp; /* }else console.log(eval(getWindowHeight()-DIF_HEIGHT_WINDOWS_BIGTAB)+" != " + BTBody2.tailleMax()); */ } updateHeightRunning = false; } $(document).ready(function(){ defBigTabMaxHeight(); $(".BTBody").each(function(){ this.tailleMax = function(){ if(this.style.maxHeight){ var maxHeight = this.style.maxHeight; if(typeof(maxHeight)=="string"){ maxHeight = maxHeight.substring(0,maxHeight.indexOf("px")); return eval(maxHeight); } return this.style.maxHeight; }else{ return this.offsetHeight; } }; }); $(window).resize(function(){defBigTabMaxHeight();updateHeight();}); }) function defBigTabMaxHeight(){ var height =getWindowHeight(); $(".BTBody").each(function(){ this.style.maxHeight = eval(height-DIF_HEIGHT_WINDOWS_BIGTAB)+"px"; }); } function getWindowHeight() { var windowHeight=0; if (typeof(window.innerHeight)=='number') { windowHeight=window.innerHeight; } else { if (document.documentElement&& document.documentElement.clientHeight) { windowHeight = document.documentElement.clientHeight; } else { if (document.body&&document.body.clientHeight) { windowHeight=document.body.clientHeight; } } } return windowHeight; } function offsetTopOrigin(elt){ if(elt.offsetParent) return elt.offsetTop+offsetTopOrigin(elt.offsetParent); else return 0; } </script> <form action="<fl:link url="/list_interaction_ajax.fl"/>" method="get"> <% //if coming from the agenda, store these values. String nbAgenda =flRequest.getRequestParameterOrAttribute("nbAgenda"); if (nbAgenda != null) { %> <input type=hidden name="nbAgenda" value="<%=nbAgenda%>"> <% } %> <% String initDate = flRequest.getRequestParameterOrAttribute("initDate"); if (initDate != null) { %> <input type=hidden name="initDate" value="<%=initDate%>"> <% } %> <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="cu" value="/list_criteria_interaction.fl"> <input type="hidden" name="lu" value="/list_interaction.fl"> <input type="hidden" name="obj.title" value="<%= Utils.formatToWeb(objTitle, true) %>"> <input type="hidden" name="IntStiID" value="<%= pIntStiID %>"> <input type="hidden" name="IntType" value="<%= pIntType %>"> <input type="hidden" name="criteria.title" value="<fl:getMessage code="L6476" alt="Recherche interaction" />"> <input type="hidden" name="All" value=""> <% if (SfwID != null) { %> <input type="hidden" name="SfwID" value="<%= SfwID %>"> <% } %> <fl:bigTabs criteriaTitle="<%= Utils.getMessage(session, \"L6476\", false, true, \"Recherche interaction\") %>"> <table class="container" cellpadding="0"> <tr> <td> <div class="criteriaTableDiv"> <span class="criteriaLabel"><fl:getMessage code="L2089" alt="Acteur"/></span><input type="hidden" id="IntActID" name="IntActID" value="<%= actID %>"><input id="lblIntActID" type="text" class="criteriaField leftMargin10" name="lblIntActID" value="<%= actSesName %>" size="40" autocomplete="off" onfocus="displayOnFocus(this);"><script language="javascript">runOnTime('installFobAC(document.forms[0].lblIntActID);', 200);</script> <a href="javascript:doChangeActor();"><img src="<fl:webapp/>/icons/ico/rechercher.gif" class="icon" alt="<fl:getMessage code="A3004" alt="Choisir un acteur"/>"></a> <select name="IntAtvID" class="criteriaField leftMargin10"> <option value=""><<fl:getMessage code="F3010" alt="Activité"/>></option> <fl:getProperty name="Interaction" property="IntAtvID" alt="" edit="true" type="select"/> </select> <br><br> <span class="criteriaLabel"><fl:getMessage code="L6212" alt="pour les"/> </span><input type="text" name="nbDays" value="<%= nbDays != null ? nbDays : "7" %>" class="criteriaField" style="width: 40px;" size="2" onblur="ctrlNumField(this, 'integer', '<fl:getMessage code="M302F" alt="Format de nombre incorrect. Veuillez corriger." js="true"/>');"><span class="criteriaLabel"> <% if (isDoneList) { %><fl:getMessage code="L6213" alt="derniers jours"/><% } else { %><fl:getMessage code="L6214" alt="prochains jours"/><% } %></span> <% if (!isDoneList) { %> <!-- <input class="leftMargin10 checkbox" style="width: auto; height: auto;" type="checkbox" name="beforeThisWeek" value="true" <%= sc == null || "1".equals(beforeThisWeek) ? "" : "checked" %> ><span class="criteriaLabel"> <fl:getMessage code="L3029" alt="� partir de la semaine courante"/></span> --> <input class="leftMargin10 checkbox" style="width: auto; height: auto;" type="checkbox" name="beforeThisWeek" value="true" <%= sc == null || "0".equals(beforeThisWeek) ? "checked" : "" %> ><span class="criteriaLabel"> <fl:getMessage code="L3029" alt="� partir de la semaine courante"/></span> <% } %> </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" <%= preview != null ? "checked" : "" %>> <span class="dataLabel" style="width: auto; vertical-align:bottom"><label for="$$preview"><fl:getMessage code="L6319" alt="aperçu"/></label></span> </td> </tr> <tr class="ligne_separation"><td></td></tr> <tr> <td 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> <a href="javascript:doSubmit();"><img src="<fl:webapp/>/icons/ico/valid_green2_long.gif"></a> </td> </tr> </table> </td> </tr> </table> <div id="resultZone" > <h2 id="H2Result" <%= (isFirstTimeIn ? "" : "style=\"margin-top: 0px;\"") %>> <span><fl:getMessage code="L200C" alt="Résultat"/></span> </h2> <div id="ShowCritsLinkDiv" style="display: <%= (isFirstTimeIn ? "none" : "inline") %>; 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 name="INTERACTIONS_LIST_A_JS" width="100%" height="400" ajaxUrl="/list_interaction_ajax.fl" allowUpdate="true"/> </div> <div class="BTFoot"> <div class="BTFootL"></div> <div class="BTFootMiddle"> </div> <div class="BTFootR"></div> </div> </fl:bigTabs> </form>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de