Edit C:\Users\Administrator\Desktop\Back\galaxie\navigation\dashboard\gridPages\calendar_dash.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 session="true" contentType="text/html; charset=UTF-8" %> <%@ page import="com.edeal.frontline.navigation.FlRequest, com.edeal.frontline.DataDictionary, com.edeal.frontline.DateParseException, com.edeal.frontline.FlContext, com.edeal.frontline.FlLocale, com.edeal.frontline.FrontlineException, com.edeal.frontline.Utils, java.text.SimpleDateFormat, java.util.Calendar, java.util.Date, java.util.GregorianCalendar, java.util.Vector" %> <%@ 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 fullPage = flRequest.getRequestParameterOrAttribute("fullpage"); if (fullPage == null) fullPage = "1"; Date date = (Date)flRequest.getAttribute("agendaDate"); if (date==null) { date = new Date(); } String type; type = flRequest.getRequestParameterOrAttribute("type"); if (type==null) type = "MONTH"; String actId = (String) session.getAttribute("actorID"); String actor = flRequest.getRequestParameterOrAttribute("actor"); if (actor == null) actor = (String)session.getAttribute("actorID"); String actorName = null; try { actorName = dico.getTable("sql", "Actor").toString(session, actor); } catch (FrontlineException fe) { } GregorianCalendar calendar = FlLocale.getInstance(session).getCalendar(); if (date != null) calendar.setTime(date); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); while (calendar.get(Calendar.DAY_OF_WEEK) != Calendar.MONDAY) calendar.add(Calendar.DAY_OF_YEAR, -1); GregorianCalendar endCal = FlLocale.getInstance(session).getCalendar(); endCal.setTime(calendar.getTime()); endCal.add(Calendar.DAY_OF_YEAR, 4); SimpleDateFormat monthFormat = FlLocale.getInstance(session).getSimpleDateFormat("M"); SimpleDateFormat yearFormat = FlLocale.getInstance(session).getSimpleDateFormat("yyyy"); %><html> <head> <link rel="stylesheet" href="<fl:webapp/>/css/common_css.jsp" type="text/css"> <link rel="stylesheet" href="<fl:webapp/>/css/tooltip.css" type="text/css"> <link rel="stylesheet" href="<fl:webapp/>/css/master_css.jsp?sfwCode=SALES" type="text/css"/> <link rel="stylesheet" href="<fl:webapp/>/sales/agenda/agenda_css.jsp" type="text/css"> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/sidebar/actions_css.jsp"> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/sidebar/sidebar.css"> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/calendar/fullcalendar-1.5.1.css"> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/calendar/fullcalendar-1.5.1.print.css" media='print' /> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/tooltip_js.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/presentField.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/ajax/sarissa.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/ajax/ajax.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/master_js.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/ac/fobAC_js.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/utils.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/libraries/includeJS/include.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/tools/utils.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/libraries/jquery/ui/jquery-ui-1.8.22.custom.min.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/libraries/jquery/plugins/fullcalendar/1.5.1/fullcalendar-1.5.1.min.js"></script> <link type="text/css" rel="stylesheet" href="<fl:webapp/>/js/edeal/libraries/jquery/plugins/jquery.qtip/2.0/jquery.qtip.min.css" /> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/libraries/jquery/plugins/jquery.qtip/2.0/jquery.qtip.min.js"></script> <script type="text/javascript" language="javascript"> function read_actor(id) { window.top.opener.location = "<fl:webapp/>/read_actor.fl?id=" + id; window.top.opener.focus(); } function read_person(id) { window.top.opener.location = "<fl:webapp/>/read_person.fl?id=" + id; window.top.opener.focus(); } function read_enterprise(id) { window.top.opener.location = "<fl:webapp/>/read_enterprise.fl?id=" + id; window.top.opener.focus(); } function show(type, id) { window.open('<fl:webapp/>/read_interaction.fl?id=' + id, 'ReadInteraction', 'menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=1024,height=768'); } $(document).ready(function() { var date = new Date(); var d = date.getDate(); var m = date.getMonth(); var y = date.getFullYear(); $('#calendar').fullCalendar({ allDaySlot: false, allDayText:'<fl:getMessage code="L661D" alt="Journée" js="true"/>', aspectRatio: 2.2, axisFormat:'H:mm', buttonText: { prev: '<img align="middle" src="<fl:webapp/>/icons/ico/flecheG.gif" border="0">', next: '<img align="middle" src="<fl:webapp/>/icons/ico/flecheD.gif" border="0">', prevYear: ' << ', // << nextYear: ' >> ', // >> today: '', month: '', week: '', day: '' }, columnFormat:{ month: 'dddd', week: 'dddd dd/MM', day: 'dddd dd/MM' }, date: <%= date.getDate() %>, dayNames: ['<fl:getMessage code="F60A6" alt="Dimanche" js="true"/>','<fl:getMessage code="F60A0" alt="Lundi" js="true"/>','<fl:getMessage code="F60A1" alt="Mardi" js="true"/>','<fl:getMessage code="F60A2" alt="Mercredi" js="true"/>','<fl:getMessage code="F60A3" alt="Jeudi" js="true"/>','<fl:getMessage code="F60A4" alt="Vendredi" js="true"/>','<fl:getMessage code="F60A5" alt="Samedi" js="true"/>'], editable: true, firstDay: 1, firstHour: 9, header: { right: 'prev,next', left: 'title' }, month: <%= date.getMonth() %>, monthNames: ['<fl:getMessage code="L1070" alt="Janvier" js="true"/>','<fl:getMessage code="L1071" alt="Février" js="true"/>','<fl:getMessage code="L1072" alt="Mars" js="true"/>','<fl:getMessage code="L1073" alt="Avril" js="true"/>','<fl:getMessage code="L1074" alt="Mai" js="true"/>','<fl:getMessage code="L1075" alt="Juin" js="true"/>','<fl:getMessage code="L1076" alt="Juillet" js="true"/>', '<fl:getMessage code="L1077" alt="Août" js="true"/>','<fl:getMessage code="L1078" alt="Septembre" js="true"/>','<fl:getMessage code="L1079" alt="Octobre" js="true"/>', '<fl:getMessage code="L107A" alt="Novembre" js="true"/>','<fl:getMessage code="L107B" alt="Décembre" js="true"/>'], slotMinutes: 30, theme: false, timeFormat: { agenda: 'H:mm{ - H:mm}', '': 'H:mm' }, titleFormat: { month: "'<fl:getMessage code="L309C" alt="Agenda de" js="true"/> <%=actorName%> 'MMMM yyyy", week: "'<fl:getMessage code="L309C" alt="Agenda de" js="true"/> <%=actorName%> <fl:getMessage code="L661E" alt="du" js="true"/> '<%=FlLocale.getInstance(session).getDateFormat().toPattern()%>{ '<fl:getMessage code="L3127" alt="au" js="true"/>'[ <%=FlLocale.getInstance(session).getDateFormat().toPattern()%>}", day: "'<fl:getMessage code="L309C" alt="Agenda de" js="true"/> <%=actorName%> <fl:getMessage code="L661E" alt="du" js="true"/> 'dddd dd MMMM yyyy" }, year: <%= date.getYear() + 1900 %>, <% if ("DAY".equalsIgnoreCase(type)) { %> defaultView: 'agendaDay', <% } if ("WEEK".equalsIgnoreCase(type)) { %> defaultView: 'agendaWeek', weekends: true, <% } if ("WORKWEEK".equalsIgnoreCase(type)) { %> defaultView: 'agendaWeek', weekends: false, <% } if ("MONTH".equalsIgnoreCase(type)) { %> defaultView: 'month', <% } if(actId.equalsIgnoreCase(actor)){%> eventDrop: function(event, delta, minuteDelta, revert) { doAjax("<fl:webapp/>/agenda_update_data.fl?id="+event.id+"&delta="+delta+"&minuteDelta="+minuteDelta+"&event=drop&allDay="+event.allDay); }, eventResize: function(event, delta, minuteDelta, revert) { doAjax("<fl:webapp/>/agenda_update_data.fl?id="+event.id+"&delta="+delta+"&minuteDelta="+minuteDelta+"&event=resize"); }, dayClick: function(dayDate, allDay, jsEvent, view){ window.open("<fl:webapp/>/create_interaction_popup.fl?fromAgenda=1&initIntDate="+$.fullCalendar.formatDate(dayDate, "<%=FlLocale.getInstance(session).getDateFormat().toPattern()%>")+"&initIntActID=<%=actor%>&initIntTimeBeg="+$.fullCalendar.formatDate(dayDate, "H")+":"+$.fullCalendar.formatDate(dayDate, "mm"),"link", "menubar=no, status=no, toolbar=no, scrollbars=no, resizable=no, width=800, height=500"); }, <% } %> events: function(start, end, callback) { var calendarUrl="<fl:webapp/>/agenda_json_data.fl?actor=<%= actor %>&type=<%= type %>&date="+$.fullCalendar.formatDate(start, "<%= FlLocale.getInstance(session).getDateFormat().toPattern() %>"); $.getJSON( calendarUrl, { start: start.getTime(), end: end.getTime() }, function(result) { try { callback(result); } catch(e) { alert(e); } }); } , eventRender: function(event, element) { element.qtip({ content: event.description, show: 'click', hide: 'unfocus' }); } }); }); </script> <style type="text/css"> #calendar { width: 99%; margin: 0 auto; } .header { background-image: url(<fl:webapp/>/icons/calendar/arrDaySelec.gif); height: 20px; } <% Vector<Vector<String>> refList = dico.getRefList(session, "Cat", "Te2",true); for (Vector<String> ref : refList) { String refId = (String) ref.elementAt(0); String refCode = dico.getRefCode("Cat", "Te2", refId); String refValue = (String) ref.elementAt(1); %> .class-<%= refCode %>, .fc-agenda .class-<%= refCode %> .fc-event-time, .class-<%= refCode %> a { border-style: solid; border-color: <%= refValue.substring(refValue.lastIndexOf("|") + 1) %>; background-color: <%= refValue.substring(refValue.lastIndexOf("|") + 1) %>; color: black; } <% } %> .fc-event-time, .fc-event-title { text-decoration:none; word-wrap: break-word; } .fc-event-time { color: #000; } .fc-event-title { color: #444; } .fc-header-title { margin-top: 0; white-space: nowrap; font-size:xx-small; font-weight: bold; height: 10px; } .fc-content { background-color:white; text-decoration: none; } #calendar a:link { text-decoration: none; color: #ccc; } #calendar a:visited { text-decoration: none; color: #ccc; } #calendar a:hover { text-decoration: none; color: #ccc; } .fc-widget-header{ background-color : #BBDAE4; } .div-calendar-action { text-align: center; } .div-calendar-action a { color: black; } </style> <title><fl:getMessage code="L2025" alt="E-DEAL"/> CRM - Agenda</title> </head> <body> <div class="div-calendar-action"> <% if (!"DAY".equalsIgnoreCase(type)) { %> <a href="<fl:webapp/>/dash_day_calendar.fl?actor=<%= actor %>&date=<%= FlLocale.getInstance(session).getDateFormat().format(new Date()) %>&fullpage=<%=fullPage %>"><p class="actions_tabletext"><fl:getMessage code="F6021" alt="Jour"/></p></a> <% } %> <% if (!"WORKWEEK".equalsIgnoreCase(type)) { %> <%if (!"DAY".equalsIgnoreCase(type)) { %>| <%} %><a href="<fl:webapp/>/dash_workweek_calendar.fl?actor=<%= actor %>&fullpage=<%= fullPage %>"><p class="actions_tabletext"><fl:getMessage code="L63F0" alt="Semaine de travail"/></p></a> <% } %> <% if (!"WEEK".equalsIgnoreCase(type)) { %> | <a href="<fl:webapp/>/dash_week_calendar.fl?actor=<%= actor %>&fullpage=<%= fullPage %>"><p class="actions_tabletext"><fl:getMessage code="L6227" alt="Semaine"/></p></a> <% } %> <% if (!"MONTH".equalsIgnoreCase(type)) { %> | <a href="<fl:webapp/>/dash_month_calendar.fl?actor=<%= actor %>&fullpage=<%= fullPage %>"><p class="actions_tabletext"><fl:getMessage code="L200B" alt="Mois"/></p></a> <% } %> </div> <table style="width:99%"> <tr> <td> </td> <td> <div id="calendar"></div> </td> </tr> </table> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de