Edit C:\galaxie\Back\galaxie\edealMobile\agenda\list_week.jsp
<%@page session="true" import="com.edeal.frontline.*,java.util.*"%> <%@ page import="java.util.GregorianCalendar" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.CorrespondentBean" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.AccessDeniedException" %> <%@ page import="com.edeal.frontline.PersonBean" %> <%@ page import="java.util.Calendar" %> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@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 todo = dico.getRefIdByCode("IntStiID","TODO"); String dateBegin = Utils.getRequestParameter(request,"fromDate",false); boolean firstCall = dateBegin == null; Date fromDate = new Date(); if (dateBegin != null && !dateBegin.equals(Utils.getMessage(session, "M602F", "<Date>"))) { fromDate = Utils.formatFromWeb(dateBegin); if (fromDate == null) fromDate = new Date(); }else { fromDate = new Date(); } Vector days = new Vector(); String dateValue = Utils.formatToWebDate(fromDate,false); fromDate = Utils.formatFromWeb(dateValue); GregorianCalendar myCalendar = new GregorianCalendar(); myCalendar.setTime(fromDate); //Récupération du premier jour de la semaine courante myCalendar.set(Calendar.DAY_OF_WEEK, myCalendar.getFirstDayOfWeek()); Date beginDate = myCalendar.getTime(); for (int j = 0; j < 7; j++) { days.addElement(Utils.formatToWebDate(session, myCalendar.getTime(), false)); myCalendar.setTime(new Date(myCalendar.getTime().getTime() + 86400000)); } beginDate = Utils.formatDateFromWeb(session, (String) days.firstElement()); Date endDate = Utils.formatDateFromWeb(session, (String) days.lastElement()); java.text.SimpleDateFormat sdfDayName = FlLocale.getInstance(session).getSimpleDateFormat("EEE"); //SimpleDateFormat sdfDay = new SimpleDateFormat("d", usrLocale); java.text.SimpleDateFormat sdfDay = FlLocale.getInstance(session).getSimpleDateFormat("dd/MM"); %> <HTML> <HEAD> <title><fl:getMessage code="L309D" alt="Agenda"/></title> <LINK href="<fl:webapp/>/edealMobile/css/css.css" rel="stylesheet" type="text/css"> <meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" /> </HEAD> <BODY> <jsp:include page="/edealMobile/menu.jsp"> <jsp:param name="URLDISP" value="AGENDAWEEK"/> </jsp:include> <DIV class="action-bar" style="margin-bottom: 10px;"> <% GregorianCalendar greg = new GregorianCalendar(); greg.setTime(fromDate); //hier greg.add(Calendar.DATE,-1); Date yesterday = greg.getTime(); //demain greg.setTime(fromDate); greg.add(Calendar.DATE,1); Date tomorrow = greg.getTime(); //last week greg.setTime(fromDate); greg.add(Calendar.DATE,-7); Date lastWeek = greg.getTime(); //next week greg.setTime(fromDate); greg.add(Calendar.DATE,7); Date nextWeek = greg.getTime(); %> <a href="<fl:webapp/>/listm_week.fl?fromDate=<%= Utils.formatToWebDate(lastWeek,false)%>"><</a> <span class="label" style="font-size: 80%;"><fl:getMessage code="FFFFF" alt="Sem."/> <fl:getMessage code="L62E6" alt="du"/> <%= Utils.formatToWebDate(beginDate,false)%></span> <a href="<fl:webapp/>/listm_week.fl?fromDate=<%= Utils.formatToWebDate(nextWeek,false)%>">></a> <a href="<fl:webapp/>/listm_interaction.fl?fromDate=<%= Utils.formatToWebDate(fromDate,false) %>"><fl:getMessage code="F6021" alt="Jour"/></a> </DIV> <DIV> <form method="GET" action="<fl:webapp/>/listm_week.fl"> <table border="0" cellpadding="0" > <tr class="criteria"> <td> <input type="text" name="fromDate" value="<%= (dateBegin != null) ? Utils.formatToWeb(dateBegin,false) : Utils.getMessage(session, "M602F", "<Date>") %> "> <input type="submit" value="OK"> </td> </tr> </table> </form> </DIV> <% String actorID = (String)session.getAttribute("actorID"); GregorianCalendar calGreg = new GregorianCalendar(); for (int k = 0; k < 5; k ++) { calGreg.setTime(beginDate); calGreg.add(Calendar.DATE,k); Date baseDate = calGreg.getTime(); %> <DIV class="resultset"> <table border="0" cellpadding="0" cellspacing="0"> <tr><td width="20%" class="calendar-start"><%=sdfDayName.format(baseDate)%> <%=sdfDay.format(baseDate)%> </td> <td width="5%"> </td> <td width="75%"> <% Vector list = new Vector() ; if (!firstCall) { String[] field = {"IntID","IntTimeBeg","IntTimeEnd","IntSubject","IntDetails","IntCorID"}; String[][] query = {{"IntActID contains (" + Utils.formatToSQL(context, actorID) + ")","IntDate = "+Utils.formatToSQL(context,baseDate),"IntStiID = "+Utils.formatToSQL(context,todo)}}; String[] orderBy = {"IntTimeBeg"}; list = InteractionBean.listSummary(session,field,query,orderBy); } if(list != null && !list.isEmpty()){ for(int i=0; i < list.size(); i++){ Hashtable row = (Hashtable)list.elementAt(i); String id = (String) row.get("IntID"); Date beginHour = (Date) row.get("IntTimeBeg"); Date endHour = (Date) row.get("IntTimeEnd"); String subject = Utils.formatToWeb((String) row.get("IntSubject"),false); String hourBeg = Utils.formatToWebTime(session, beginHour,false); String hourEnd = Utils.formatToWebTime(session, endHour,false); String notes = (String) row.get("IntDetails"); Vector vectCor = (Vector) row.get("IntCorID"); String personName = ""; String perID = null; String perPhone = null; String perMail = null; if (vectCor != null && vectCor.size() > 0) { String corID = (String) vectCor.firstElement(); PersonBean perBean = null; try { CorrespondentBean corBean = new CorrespondentBean(corID,session); perID = corBean.getCorPerID(); perBean = new PersonBean(perID,session); }catch (AccessDeniedException e){ }catch (FieldNotInitializedException ex){} if (perBean != null) { try { String perFstName = perBean.getPerFstName(); personName = perFstName +" "; }catch (FieldNotInitializedException ex){} try { String perName = perBean.getPerName(); personName += perName; }catch (FieldNotInitializedException ex){} try { perPhone = perBean.getPerMobile(); }catch (FieldNotInitializedException ex){} try { perMail = perBean.getPerMail(); }catch (FieldNotInitializedException ex){} } } %> <a href="<fl:webapp/>/readm_interaction.fl?id=<%= id %>" class="title"> <%= hourBeg %><%= ((hourEnd != null) ? " - " + hourEnd : "") %> <%= (subject != null) ? subject : "" %> </a><br/> <%-- if (notes != null) { %> <TR> <td><%= Utils.formatToWeb(notes,false)%></td> </TR> <% } %> <% if (perID != null) { %> <TR> <td><%= Utils.formatToWeb(personName,false)%></td> </TR> <% } %> <% if (perPhone != null) { %> <TR> <td><fl:getMessage code="L70BE" alt="M."/><%= Utils.formatPhoneToMobile(perPhone,session)%></td> </TR> <% } %> <% if (perMail != null) { %> <TR> <td><fl:getMessage code="LFFFF" alt="E."/><a href="mailto:<%= Utils.formatToWeb(perMail,false)%>"><%= Utils.formatToWeb(perMail,false)%></a></td> </TR> <% } --%> <% } %> <% }else { %> <% } %> <a class="light" href="<fl:webapp/>/editm_interaction.fl?fromDate=<%= Utils.formatToWeb(baseDate,false)%>">[+]</a> </td> </tr> </table> </div> <% } %> <jsp:include page="/edealMobile/footer.jsp"/> </BODY> </HTML>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de