+<style type="text/css">
+.hover-title { color: black; border: 1px solid #888; padding: 3px; background-color: #DDD; position: absolute; bottom: 0; border-radius: 3px; width: auto; width: 200%; opacity: .9; }
+.fc-event-inner { background-color: #E0ECFF; }
+.fc-header-title { margin: auto 1em; }
+#fullcalendar_#ID_MOT-#ID_RUBRIQUE { position: relative; margin: 1em auto; padding: 1em; [(#LARGEUR|is_null|non)width: #LARGEURpx;] }
+</style>
+
+#SET{data,#ARRAY}
+<BOUCLE_articles(ARTICLES) {id_mot ?} {id_rubrique ?} {par date} {inverse} ><BOUCLE_événements(EVENEMENTS) {id_article} >[
+(#SET{événement,#ARRAY{title,'',hover,#TITRE,start,#DATE_DEBUT,end,#DATE_FIN,id,#ID_ARTICLE,url,#URL_ARTICLE}})][
+(#SET{data,#GET{data}|push{#GET{événement}}})
+]</BOUCLE_événements></BOUCLE_articles>
+
+[(#SET{json_data,#GET{data}|json_encode{2}})]
+
+<div id="fullcalendar_#ID_MOT-#ID_RUBRIQUE"></div>
+
+#SET{français,0}
+[(#LANG|is_null|oui)#SET{français,1}]
+[(#LANG|=={fr}|oui)#SET{français,1}]
+
+<script type="text/javascript">
+$(function() {
+ $.getScript('#CHEMIN{lib/fullcalendar/fullcalendar.min.js}', function() {
+ $('head').append('<link rel="stylesheet" type="text/css" media="screen" href="#CHEMIN{lib/fullcalendar/fullcalendar.css}">');
+ $('head').append('<link rel="stylesheet" type="text/css" media="print" href="#CHEMIN{lib/fullcalendar/fullcalendar.print.css}">');
+ var data = #GET{json_data};
+ $('#fullcalendar_#ID_MOT-#ID_RUBRIQUE').fullCalendar({
+ header: {
+ left: '',
+ center: 'prev,title,next',
+ right: ''
+ },
+ [(#ENV{hauteur}|is_null|non)height: #HAUTEUR,]
+
+ monthNames:['<:date_mois_1|attribut_html:>','<:date_mois_2|attribut_html:>','<:date_mois_3|attribut_html:>','<:date_mois_4|attribut_html:>','<:date_mois_5|attribut_html:>','<:date_mois_6|attribut_html:>','<:date_mois_7|attribut_html:>','<:date_mois_8|attribut_html:>','<:date_mois_9|attribut_html:>','<:date_mois_10|attribut_html:>','<:date_mois_11|attribut_html:>','<:date_mois_12|attribut_html:>'],
+ monthNamesShort:['<:date_mois_1_abbr|attribut_html:>','<:date_mois_2_abbr|attribut_html:>','<:date_mois_3_abbr|attribut_html:>','<:date_mois_4_abbr|attribut_html:>','<:date_mois_5_abbr|attribut_html:>','<:date_mois_6_abbr|attribut_html:>','<:date_mois_7_abbr|attribut_html:>','<:date_mois_8_abbr|attribut_html:>','<:date_mois_9_abbr|attribut_html:>','<:date_mois_10_abbr|attribut_html:>','<:date_mois_11_abbr|attribut_html:>','<:date_mois_12_abbr|attribut_html:>'],
+ dayNames:['<:date_jour_1|attribut_html:>','<:date_jour_2|attribut_html:>','<:date_jour_3|attribut_html:>','<:date_jour_4|attribut_html:>','<:date_jour_5|attribut_html:>','<:date_jour_6|attribut_html:>','<:date_jour_7|attribut_html:>'],
+ dayNamesShort:['<:date_jour_1_abbr|attribut_html:>','<:date_jour_2_abbr|attribut_html:>','<:date_jour_3_abbr|attribut_html:>','<:date_jour_4_abbr|attribut_html:>','<:date_jour_5_abbr|attribut_html:>','<:date_jour_6_abbr|attribut_html:>','<:date_jour_7_abbr|attribut_html:>'],
+ buttonText: {
+ prev: "<span class='fc-text-arrow'>‹</span>",
+ next: "<span class='fc-text-arrow'>›</span>",
+ prevYear: "<span class='fc-text-arrow'>«</span>",
+ nextYear: "<span class='fc-text-arrow'>»</span>",
+ today: '<:date_aujourdhui|attribut_html:>',
+ month: '<:cal_par_mois|attribut_html:>',
+ day: '<:cal_par_jour|attribut_html:>',
+ week: '<:cal_par_semaine|attribut_html:>'
+ },
+ // time formats
+ titleFormat: {
+ month: 'MMMM yyyy',
+ week: "d MMM[ yyyy]{ '—'d[ MMM] yyyy}",
+ day: 'dddd, d MMM, yyyy'
+ },
+ columnFormat: {
+ month: 'ddd',
+ week: 'ddd d/M',
+ day: 'dddd d/M'
+ },
+ firstDay: 1,
+ events: data,
+ defaultView: '[(#VUE|=={semaine}|?{week,month})]',
+ // events: data,
+ eventMouseover: function(event, jsEvent, view) {
+ $('.fc-event-inner', this).append('<div id=\"'+event.id+'\" class=\"hover-title\" style=\"\">'+event.hover+'</div>');
+ },
+ eventMouseout: function(event, jsEvent, view) {
+ $('#'+event.id).remove();
+ },
+ eventClick: function(event) {
+ console.log(event);
+ if (false) {
+ var url = '/?page=location_donnees&who=direction_scientifique&id_location=' + mrbs_ids[event.id];
+ var win=window.open(url, '_blank');
+ win.focus();
+ }
+ }
+ })
+ });
+});
+</script>