1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
| <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
<f:verbatim>
<center><u><h3>Mois courant</h3></u></center>
<br/>
<center>
<table>
<tr>
<td>
<SCRIPT>
<!-- Begin
var day_of_week = new Array('Dim','Lun','Mar','Mer','Jeu','Ven','Sam');
var month_of_year = new
Array('Janvier','Fevrier','Mars','Avril','Mai','Juin','Juillet','Aout','Septembre','
Octobre','Novembre','Decembre');
var Calendar = new Date();
var year = Calendar.getYear()+1900;
var month = Calendar.getMonth();
var today = Calendar.getDate();
var weekday = Calendar.getDay();
var DAYS_OF_WEEK = 7;// constante nombre jours semaine
var DAYS_OF_MONTH = 31;// Constante nombre jours mois
var cal;
Calendar.setDate(1);// commencer le calendrier avec le jour a '1'
Calendar.setMonth(month);// commencer le mois du calendrier avec le mois actuel
var TR_start = '<TR>';
var TR_end = '</TR>';
var highlight_start = '<TD WIDTH="30"><TABLE CELLSPACING=0 BORDER=1 BGCOLOR=DEDEFF
BORDERCOLOR=CCCCCC><TR><TD WIDTH=20><B><CENTER>';
var highlight_end = '</CENTER></TD></TR></TABLE></B>';
var TD_start = '<TD WIDTH="30"><CENTER>';
var TD_end = '</CENTER></TD>';
cal = '<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0 BORDERCOLOR=BBBBBB><TR><TD>';
cal += '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2>' + TR_start;
cal += '<TD COLSPAN="' + DAYS_OF_WEEK + '" BGCOLOR="#EFEFEF"><CENTER><B>';
cal += month_of_year[month] + ' ' + year + '</B>' + TD_end + TR_end;
cal += TR_start;
for(index=0; index < DAYS_OF_WEEK; index++)
{
if(weekday == index)
cal += TD_start + '<B>' + day_of_week[index] + '</B>' + TD_end;
else
cal += TD_start + day_of_week[index] + TD_end;
}
cal += TD_end + TR_end;
cal += TR_start;
for(index=0; index < Calendar.getDay(); index++)
cal += TD_start + ' ' + TD_end;
for(index=0; index < DAYS_OF_MONTH; index++)
{
if( Calendar.getDate() > index )
{
week_day =Calendar.getDay();
if(week_day == 0)
cal += TR_start;
if(week_day != DAYS_OF_WEEK)
{
var day = Calendar.getDate();
if( today==Calendar.getDate() )
cal += highlight_start + day + highlight_end + TD_end;
else
cal += TD_start + day + TD_end;
}
if(week_day == DAYS_OF_WEEK)
cal += TR_end;
}
Calendar.setDate(Calendar.getDate()+1);
}
cal += '</TD></TR></TABLE></TABLE>';
document.write(cal);
</SCRIPT>
</td>
</tr>
</table></center>
</f:verbatim> |
Partager