diff options
author | Anton Luka Šijanec <sijanecantonluka@gmail.com> | 2020-11-09 15:06:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-09 15:06:18 +0100 |
commit | 05042924c5797d1bcf61794aad1a4965b7fb0e65 (patch) | |
tree | 32d9e014b24c76514be83467693a334872cdd6ab /dist/js/timetable.js | |
parent | Merge pull request #28 from beziapp/dev 🤞 (diff) | |
parent | added nginx config file for bežiapp html host (diff) | |
download | beziapp-05042924c5797d1bcf61794aad1a4965b7fb0e65.tar beziapp-05042924c5797d1bcf61794aad1a4965b7fb0e65.tar.gz beziapp-05042924c5797d1bcf61794aad1a4965b7fb0e65.tar.bz2 beziapp-05042924c5797d1bcf61794aad1a4965b7fb0e65.tar.lz beziapp-05042924c5797d1bcf61794aad1a4965b7fb0e65.tar.xz beziapp-05042924c5797d1bcf61794aad1a4965b7fb0e65.tar.zst beziapp-05042924c5797d1bcf61794aad1a4965b7fb0e65.zip |
Diffstat (limited to '')
-rwxr-xr-x | dist/js/timetable.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dist/js/timetable.js b/dist/js/timetable.js index 79539f6..aa73a9a 100755 --- a/dist/js/timetable.js +++ b/dist/js/timetable.js @@ -18,4 +18,4 @@ function displayTimetable(weekly_timetable,date_object){let transformed_timetabl let lesson_object={id:JSON.stringify(lesson_metadata),title:lesson["acronym"],start:date_string+" "+lesson_times[0],end:date_string+" "+lesson_times[1],backgroundColor:bg_color,textColor:fg_color};transformed_timetable.push(lesson_object);});} calendar_obj.removeAllEvents();calendar_obj.addEventSource(transformed_timetable);} function eventClickHandler(eventClickInfo){let lesson_metadata=JSON.parse(eventClickInfo.event.id);let lesson_subject=lesson_metadata["subject"];let lesson_teacher=lesson_metadata["teacher"];let lesson_classroom=lesson_metadata["classroom"];let lesson_class=lesson_metadata["class"];let lesson_duration=lesson_metadata["start"]+" - "+lesson_metadata["end"];$("#lesson-subject").text(lesson_subject);$("#lesson-teacher").text(lesson_teacher);$("#lesson-class").text(lesson_class);$("#lesson-classroom").text(lesson_classroom);$("#lesson-duration").text(lesson_duration);const modal=document.querySelectorAll(".side-modal")[0];M.Sidenav.getInstance(modal).open();} -document.addEventListener("DOMContentLoaded",()=>{checkLogin();let calendarEl=document.getElementById("calendar");calendar_obj=new FullCalendar.Calendar(calendarEl,{plugins:["timeGrid"],eventClick:eventClickHandler,defaultView:"timeGridWeek",contentHeight:"auto",height:"auto",width:"auto",timeGridEventMinHeight:35,nowIndicator:true,firstDay:1,weekends:false,minTime:"07:10:00",maxTime:"19:10:00"});calendar_obj.render();loadTimetable(new Date());$(".fc-today-button, .fc-prev-button, .fc-next-button").click(()=>{loadTimetable(calendar_obj.getDate());});$("#refresh-icon").click(()=>{loadTimetable(calendar_obj.getDate(),true);});const menus=document.querySelectorAll(".side-menu");M.Sidenav.init(menus,{edge:"right",draggable:true});const modals=document.querySelectorAll('.side-modal');M.Sidenav.init(modals,{edge:'left',draggable:false});});
\ No newline at end of file +document.addEventListener("DOMContentLoaded",()=>{checkLogin();let calendarEl=document.getElementById("calendar");calendar_obj=new FullCalendar.Calendar(calendarEl,{plugins:["timeGrid"],eventClick:eventClickHandler,defaultView:"timeGridWeek",contentHeight:"auto",height:"auto",width:"auto",timeGridEventMinHeight:35,nowIndicator:true,firstDay:1,weekends:false,timeFormat:'H(:mm)',minTime:"07:10:00",maxTime:"19:10:00"});calendar_obj.render();loadTimetable(new Date());$(".fc-today-button, .fc-prev-button, .fc-next-button").click(()=>{loadTimetable(calendar_obj.getDate());});$("#refresh-icon").click(()=>{loadTimetable(calendar_obj.getDate(),true);});const menus=document.querySelectorAll(".side-menu");M.Sidenav.init(menus,{edge:"right",draggable:true});const modals=document.querySelectorAll('.side-modal');M.Sidenav.init(modals,{edge:'left',draggable:false});});
\ No newline at end of file |