2021-09-01 21:26:00 +00:00
document . addEventListener ( "DOMContentLoaded" , function ( ) {
var timeZone = Intl . DateTimeFormat ( ) . resolvedOptions ( ) . timeZone ;
2021-09-01 23:17:32 +00:00
/ * v a r s l o t M i n = n e w D a t e ( " 2 0 2 1 - 0 9 - 1 3 : 1 4 : 0 0 Z " )
var slotMax = new Date ( "2021-09-13:23:30Z" )
if ( slotMax . getHours ( ) < slotMin . getHours ( ) ) {
slotMax . setHours ( 23 )
slotMax . setMinutes ( 59 )
2021-09-01 21:26:00 +00:00
}
2021-09-01 23:17:32 +00:00
console . log ( slotMin . toLocaleTimeString ( ) , slotMax . toLocaleTimeString ( ) ) * /
//document.getElementById("timezone").innerHTML=`Zona Horaria: ${timeZone}`;
var timeZoneSelectorEl = document . getElementById ( "time-zone-selector" ) ;
if ( timeZone !== "America/Montevideo" ) {
var optionEl = document . createElement ( 'option' ) ;
optionEl . value = "local" ;
optionEl . innerText = timeZone ;
timeZoneSelectorEl . appendChild ( optionEl )
}
var calendarEl = document . getElementById ( "calendar" ) ;
var calendar = new FullCalendar . Calendar ( calendarEl , {
2021-09-02 16:27:42 +00:00
schedulerLicenseKey : "CC-Attribution-NonCommercial-NoDerivatives" ,
eventDidMount : function ( info ) {
var tooltip = tippy ( info . el , {
content : ` <strong> ${ info . event . title } </strong><br/><strong> ${ info . event . extendedProps . speaker . nombre } </strong><br/> ${ info . event . extendedProps . description } ` ,
allowHTML : true ,
} ) ;
} ,
eventSources : [
{
url : "/api/eventos/cursos" ,
color : "#755baf" ,
/ * N O E S T Á F U N C A N D O E L R E C U R
2021-09-01 21:26:00 +00:00
startTime : "13:00" ,
endTime : "14:00" ,
startRecur : "2021-09-14" ,
endRecur : "2021-09-16" , * /
2021-09-02 16:27:42 +00:00
} ,
{
url : "/api/eventos/plenarias" ,
color : "#578e44" ,
} ,
{
url : "/api/eventos/semiplenarias" ,
color : "#3383cb" ,
} ,
{
url : "/api/eventos/publicas" ,
color : "#a57b00" ,
} ,
{
url : "/api/eventos/premiados" ,
color : "darkred" ,
} ,
2021-09-02 20:07:12 +00:00
{ url : "/api/eventos/sesiones/" , color : "gray" } ,
2021-09-02 16:27:42 +00:00
{
2021-09-02 20:07:12 +00:00
events : function ( info , success , fail ) {
2021-09-02 16:27:42 +00:00
let comisiones = [ ] ;
2021-09-07 14:53:24 +00:00
comisiones . push ( {
2021-09-08 19:31:46 +00:00
title :
"Mujeres y matemáticas en Chile: una mirada crítica e interdisciplinar al campo científico" ,
start : ` 2021-09-14T18:30-0300 ` ,
end : ` 2021-09-14T19:30-0300 ` ,
speaker : { nombre : "Organizadores" } ,
description : "El contenido de esta ponencia presenta algunos resultados preliminares del proyecto de investigación Anillo PIASOC180025 “Mujeres y matemáticas en Chile: sociología de un campo científico desde una perspectiva interdisciplinar y de género”. Específicamente, discute aspectos relativos a la construcción de subjetividades generizadas al interior de este campo científico. En base al análisis de 11 grupos focales y el diálogo con diferentes académicos/as e investigadores/as adscritos al campo de la matemática se distinguen modos de concebir sus posiciones desde la extrañeza y la otredad. En todos ellos, la perspectiva de género contribuye un marco crítico para abordar la práctica de la matemática como un proceso social, es por ello que el análisis se centra en las experiencias y trayectorias de quiénes la desarrollan, al estar marcadas por las características del campo social en que se despliegan" ,
color : "#812c64" ,
2021-09-07 14:53:24 +00:00
} ) ;
for ( let i = 0 ; i < 2 ; i ++ ) {
2021-09-02 20:07:12 +00:00
comisiones . push ( {
2021-09-07 14:53:24 +00:00
title : "Presentación de las Comisiones de Género y otros Colectivos de América Latina y el Caribe." ,
start : ` 2021-09- ${ 15 + i } T18:30-0300 ` ,
end : ` 2021-09- ${ 15 + i } T19:30-0300 ` ,
speaker : { nombre : "Comisiones de Género" } ,
description : "Actividad de Género" ,
2021-09-02 20:07:12 +00:00
color : "#812c64" ,
} ) ;
2021-09-02 16:27:42 +00:00
}
success ( comisiones ) ;
2021-09-02 20:07:12 +00:00
} ,
2021-09-02 16:27:42 +00:00
} ,
{
2021-09-02 20:07:12 +00:00
events : function ( info , success , fail ) {
2021-09-02 16:27:42 +00:00
let asamblea = {
2021-09-02 20:07:12 +00:00
title : "Asamblea UMALCA" ,
start : "2021-09-13T19:00-0300" ,
end : "2019-09-13T20:00-0300" ,
2021-09-07 14:53:24 +00:00
speaker : { nombre : "Representantes de cada una de las sociedades que integran UMALCA" } ,
description : "Estatutariamente, la asamblea reúne a los representantes de cada una de las sociedades que integran UMALCA. Las autoridades de los distintos comités (ejecutivo, científico, etc) están presentes para dar cuentas de lo actuado. No está abierta al público en general." ,
2021-09-02 20:07:12 +00:00
color : "black" ,
} ;
success ( [ asamblea ] ) ;
} ,
} ,
2021-09-02 16:27:42 +00:00
] ,
2021-09-02 20:07:12 +00:00
2021-09-02 16:27:42 +00:00
headerToolbar : {
2021-09-02 20:07:12 +00:00
center : "timeGridAll,timeGridThree,timeGridOne,listView" ,
2021-09-01 21:26:00 +00:00
} ,
2021-09-02 16:27:42 +00:00
eventTimeFormat : {
hour : "numeric" ,
minute : "2-digit" ,
meridiem : false ,
2021-09-01 21:26:00 +00:00
} ,
2021-09-02 16:27:42 +00:00
timeZone : "America/Montevideo" ,
locale : "es" ,
initialView : "timeGridAll" ,
initialDate : "2021-09-13" ,
validRange : {
start : "2021-09-13" ,
end : "2021-09-18" ,
2021-09-01 21:26:00 +00:00
} ,
2021-09-02 16:27:42 +00:00
nowIndicator : true ,
now : "2021-09-12" ,
slotMinTime : "11:00:00" ,
2021-09-02 20:07:12 +00:00
slotMaxTime : "21:00:00" ,
2021-09-02 16:27:42 +00:00
slotDuration : "00:15" ,
allDaySlot : false ,
slotLabelFormat : {
hour : "numeric" ,
minute : "2-digit" ,
omitZeroMinute : false ,
meridiem : "short" ,
2021-09-01 21:26:00 +00:00
} ,
2021-09-02 21:02:46 +00:00
eventTimeFormat : {
hour : "numeric" ,
minute : "2-digit" ,
omitZeroMinute : false ,
meridiem : "short" ,
} ,
2021-09-02 16:27:42 +00:00
eventDisplay : "block" ,
views : {
timeGridAll : {
type : "timeGrid" ,
duration : { days : 5 } ,
buttonText : "Todos los dias" ,
} ,
timeGridThree : {
type : "timeGrid" ,
duration : { days : 2 } ,
buttonText : "2 dias" ,
} ,
timeGridOne : {
type : "timeGrid" ,
duration : { days : 1 } ,
buttonText : "1 dia" ,
} ,
2021-09-02 20:07:12 +00:00
dayGridD : {
type : "dayGridDay" ,
} ,
dayGridW : {
type : "dayGridWeek" ,
duration : { days : 2 } ,
} ,
2021-09-02 21:02:46 +00:00
listView : {
type : "listWeek" ,
buttonText : "Lista" ,
duration : { days : 2 } ,
2021-09-02 20:07:12 +00:00
} ,
2021-09-01 21:26:00 +00:00
} ,
2021-09-02 16:27:42 +00:00
} ) ;
2021-09-01 21:26:00 +00:00
calendar . render ( ) ;
2021-09-02 19:24:05 +00:00
console . log ( calendar )
2021-09-01 23:17:32 +00:00
timeZoneSelectorEl . addEventListener ( "change" , function ( ) {
2021-09-02 19:24:05 +00:00
console . log ( calendar . getOption ( 'slotMinTime' ) )
2021-09-01 23:17:32 +00:00
calendar . setOption ( "timeZone" , this . value ) ;
2021-09-02 19:24:05 +00:00
switch ( this . value ) {
case "America/Montevideo" :
2021-09-02 21:02:46 +00:00
calendar . setOption ( "locale" , "es" ) ;
2021-09-02 19:24:05 +00:00
calendar . setOption ( "slotMinTime" , "11:00:00" ) ;
calendar . setOption ( "slotMaxTime" , "21:00:00" ) ;
calendar . setOption ( "initialDate" , "2021-09-13" ) ;
calendar . setOption ( "validRange" , {
start : "2021-09-13" ,
end : "2021-09-18" ,
} ) ;
2021-09-02 20:07:12 +00:00
calendar . changeView ( "timeGridAll" ) ;
2021-09-02 19:24:05 +00:00
break ;
case "UTC" :
2021-09-02 21:02:46 +00:00
calendar . setOption ( "locale" , "en" ) ;
2021-09-02 19:24:05 +00:00
calendar . setOption ( "slotMinTime" , "14:00:00" ) ;
calendar . setOption ( "slotMaxTime" , "23:59:00" ) ;
calendar . setOption ( "initialDate" , "2021-09-13" ) ;
calendar . setOption ( "validRange" , {
start : "2021-09-13" ,
end : "2021-09-18" ,
} ) ;
2021-09-02 20:07:12 +00:00
calendar . changeView ( "timeGridAll" ) ;
2021-09-02 19:24:05 +00:00
break ;
2021-09-02 21:02:46 +00:00
default :
calendar . setOption ( "locale" , 'en' )
2021-09-02 19:24:05 +00:00
let initial = moment ( "2021-09-13T14:00Z" ) ;
let final = moment ( "2021-09-17T23:30Z" ) ;
let offset = initial . utcOffset ( ) ;
2021-09-02 21:02:46 +00:00
calendar . setOption ( "initialDate" , initial . format ( "Y-MM-DD" ) ) ;
if ( offset > 0 && offset < 600 ) {
//calendar.setOption("slotMinTime", "initial.format("H:mm")");
calendar . setOption ( "slotMinTime" , "00:00" ) ;
//calendar.setOption("slotMaxTime", {days:1,hours:offset/60});
calendar . setOption ( "slotMaxTime" , "24:00" ) ;
calendar . changeView ( "listView" ) ;
2021-09-02 19:24:05 +00:00
}
//let currentOffset = moment().utcOffset();
//initial.add(currentOffset, "minutes");
//calendar.setOption('slotMinTime', initial.utc().format('H:mm'))
2021-09-02 21:02:46 +00:00
//calendar.setOption("slotMaxTime", {days:1,hours:currentOffset/60});
2021-09-02 19:24:05 +00:00
else {
2021-09-02 21:02:46 +00:00
calendar . setOption ( "slotMaxTime" , final . format ( "H:mm" ) ) ;
calendar . setOption ( "slotMinTime" , initial . format ( "H:mm" ) ) ;
2021-09-02 19:24:05 +00:00
}
2021-09-02 21:02:46 +00:00
2021-09-02 19:24:05 +00:00
calendar . setOption ( "validRange" , {
start : initial . format ( "Y-MM-DD" ) ,
end : final . add ( 1 , 'd' ) . format ( "Y-MM-DD" )
} ) ;
}
2021-09-01 23:17:32 +00:00
} ) ;
2021-09-01 21:26:00 +00:00
} ) ;