diff --git a/app/assets/javascripts/calendar.js b/app/assets/javascripts/calendar.js index 54017e9..9ffdd24 100644 --- a/app/assets/javascripts/calendar.js +++ b/app/assets/javascripts/calendar.js @@ -1,26 +1,131 @@ +window.auto_close_popup = false; +$.fn.fullCalendar = function(args){ + var self = this[0] + if(!self.calendar_args) + self.calendar_args = args; + else + args = Object.assign(self.calendar_args, args); + var calendar = new FullCalendar.Calendar(self,args); + calendar.render(); + $(window).on("load",function(){ + calendar.render(); + }) + this.calendar = calendar; + self.calendar = calendar; + $.fullCalendar = calendar; + return calendar; +}; +function correct_date(date){ + var new_date = new Date(); + new_date.setTime(date.getTime() + date.getTimezoneOffset() * 60 * 1000); + return new_date; +} +FullCalendar.Calendar.prototype.get_all_events = function(){ + this.currentData.all_events = []; + var all_events = this.currentData.all_events; + if(this.currentData.eventStore && this.currentData.eventStore.instances){ + var instances = this.currentData.eventStore.instances; + Object.keys(instances).forEach(function(k){ + var instance = instances[k]; + var range = Object.assign({},instance.range); + range.start = correct_date(range.start); + range.end = correct_date(range.end); + all_events.push(range); + }) + } + return this.currentData.all_events; +} +FullCalendar.Calendar.prototype.isAnOverlapEvent = function(eventStartDay, eventEndDay){ + eventStartDay = eventStartDay || eventEndDay; + eventEndDay = eventEndDay || eventStartDay; + if((typeof(eventStartDay)).toLowerCase() == "string") + eventStartDay = new Date(eventStartDay); + if((typeof(eventEndDay)).toLowerCase() == "string") + eventEndDay = new Date(eventEndDay); + var events = this.get_all_events(); + for (var i = 0; i < events.length; i++) { + var eventA = events[i]; + // start-time in between any of the events + if (eventStartDay >= eventA.start && eventStartDay <= eventA.end) { + return true; + } + //end-time in between any of the events + if (eventEndDay >= eventA.start && eventEndDay <= eventA.end) { + return true; + } + //any of the events in between/on the start-time and end-time + if (eventStartDay <= eventA.start && eventEndDay >= eventA.end) { + return true; + } + } + return false; +} +window.is_chinese = ( I18n && I18n.locale.indexOf('zh') != -1 ); +window.datetime_format = is_chinese ? 'y M d h:m b' : 'd M, y h:m b'; +window.date_format = is_chinese ? 'y M d' : 'd M, y'; +window.datetime_format = window.date_format; +window.time_format = "h:m b"; +window.std_date_format = 'y-MM-d'; +window.short_day = (is_chinese ? "d (w)" : "w d"); +window.short_date = (is_chinese ? "M d (w)" : "w d, M"); +window.short_date_time = (is_chinese ? "M d (w) h:m b" : "w d, M h:m b"); +window.getDateString = function(date, format,is_chinese) { + var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + var week_days = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']; + if(is_chinese){ + months = []; + for(var i=0;i<12;i++){ + months.push((i+1)+"月"); + } + week_days = ["週日","週一","週二","週三","週四","週五","週六"] + } + var getPaddedComp = function(comp) { + return ((parseInt(comp) < 10) ? ('0' + comp) : comp) + }, + formattedDate = format, + o = { + "y+": date.getFullYear() + (is_chinese ? "年" : ""), // year + "MM+": getPaddedComp(date.getMonth() + 1), //raw month + "M+": months[date.getMonth()], //month + "d+": (is_chinese ? (date.getDate() + "日") : getPaddedComp(date.getDate())), //day + "w+": week_days[date.getDay()], //weekday + "h+": getPaddedComp((date.getHours() > 12) ? date.getHours() % 12 : date.getHours()), //hour + "H+": getPaddedComp(date.getHours()), //hour + "m+": getPaddedComp(date.getMinutes()), //minute + "s+": getPaddedComp(date.getSeconds()), //second + "S+": getPaddedComp(date.getMilliseconds()), //millisecond, + "b+": (date.getHours() >= 12) ? 'PM' : 'AM' + }; + + for (var k in o) { + if (new RegExp("(" + k + ")").test(format)) { + formattedDate = formattedDate.replace(RegExp.$1, o[k]); + } + } + return formattedDate; +}; var Calendar = function(dom){ - c = this; + var c = this; this.create_event_btn = $("#create_event_btn"); this.event_create_space = $("#event_create_space"); + this.mousePosition = {}; this.title = $("#current_title"); - this.calendar = $(dom); + this.calendar_dom = $(dom); this.nextBtn = $("#next_month_btn"); this.prevBtn = $("#prev_month_btn"); this.todayBtn = $("#today_btn"); this.modeBtns = $(".calendar_mode button"); this.refreshBtn = $("#refresh_btn"); - this.mousePosition = {}; this.dialog = new EventDialog(c); this.loading = $('#calendar-loading'); - this.success_event = null; this.agenda_space = $("#calendar_agenda"); - this.currentView = "month"; + this.currentView = "dayGridMonth"; this.navigation = $("#navigation"); this.rangeSelection = $("#range_selection"); var agendaView = new AgendaView(c); var loadeventsonviewchange = false; - + this.success_event = null; this.initialize = function(){ var date = new Date(); var d = date.getDate(); @@ -28,8 +133,8 @@ var Calendar = function(dom){ var y = date.getFullYear(); var change_event = function(_event, delta) { _event.end = (_event.end ? _event.end : _event.start); - var s = $.fullCalendar.parseDate(c.calendar.find(".fc-view table tbody td:first").data("date")); - var e = $.fullCalendar.parseDate(c.calendar.find(".fc-view table tbody td:first").data("date")); + var s = $.fullCalendar.parseDate(c.calendar_dom.find(".fc-view table tbody td:first").data("date")); + var e = $.fullCalendar.parseDate(c.calendar_dom.find(".fc-view table tbody td:first").data("date")); $.ajax({ url: "/admin/calendars/"+_event.id, // data: {event:{id:_event.id,start:_event.start,end: _event.end,_s:Math.round(+s / 1000), _e:Math.round(+e / 1000)}}, @@ -37,9 +142,9 @@ var Calendar = function(dom){ type: 'put' , datatype: 'JSON', error: function(jqXHR, textStatus, errorThrown) {}, - success: function(data) { - console.log('event was success updated'); - } + success: function(data) { + console.log('event was success updated'); + } }); } var success_event = function(data,allDay,type,addbtn){ @@ -102,12 +207,12 @@ var Calendar = function(dom){ pickers.eq(i).val(value + " " + d.getHours() + ":" + d.getMinutes()) } pickers.eq(i).ui_datetimepicker({ - dateFormat: 'yy/mm/dd', - controlType: 'select', - timeInput: true, - oneLine: true, - timeFormat: 'HH:mm' - }) + dateFormat: 'yy/mm/dd', + controlType: 'select', + timeInput: true, + oneLine: true, + timeFormat: 'HH:mm' + }) } } } @@ -144,7 +249,7 @@ var Calendar = function(dom){ if(type == "new") c.renderEvent(data); if(type == "edit") - c.calendar.fullCalendar("refetchEvents"); + c.calendar_dom.fullCalendar("refetchEvents"); }); c.event_create_space.find("#event_period").change(function(){ //repeat_function(); @@ -152,36 +257,66 @@ var Calendar = function(dom){ //repeat_function(); } c.success_event = success_event; - var dview = (c.currentView == "agenda" ? "month" : c.currentView); - c.calendar.fullCalendar({ - editable: true, + var dview = (c.currentView == "agenda" ? "dayGridMonth" : c.currentView); + c.calendar_dom.css("overflow","visible"); + c.calendar_dom.fullCalendar({ + themeSystem: 'bootstrap', + editable: false, selectable: true, - events: window.location.href, - eventResize: change_event, - eventDrop: change_event , - header: false, - default: dview, + width: "100%", height: $(window).height() - 315, + events: function(args, success_callback, fail_callback) { + var start = args.start; + var end = args.end; + $.ajax({ + url: window.location.href, + dataType: 'json', + type: 'GET', + data: { + start: Math.round(start.getTime() / 1000), + end: Math.round(end.getTime() / 1000), + _: Date.now() + }, + success: function(json) { + // json = json.map(function(obj){ + // obj.start = new Date(obj.start).toJSON(); + // obj.end = new Date(obj.end).toJSON(); + // return obj; + // }) + success_callback(json); + } + }); + }, + // events: 'https://fullcalendar.io/demo-events.json', + headerToolbar: false, + fixedWeekCount: false, + initialView: dview, loading: function(bool) { - if (bool) c.loading.css("left",($(window).width()/2 - 60) + "px").show(); + if (bool) c.loading.show(); else c.loading.hide(); + if(this.currentData) + $('#current_title').html(this.currentData.viewTitle); }, windowResize : function(view){ - view.setHeight($(window).height() - 315); - c.calendar.fullCalendar("refetchEvents"); + c.calendar_dom.calendar.refetchEvents(); }, - viewDisplay: function(view) { - c.title.html(view.title); - }, - eventClick: function(calEvent, e, view) { - c.event_create_space.html("").hide(); - c.dialog.dismiss(); - c.dialog.inflate(calEvent); - c.dialog.show({"x":e.originalEvent.clientX,"y":e.originalEvent.clientY}); - }, - select : function(startDate, endDate, allDay, jsEvent, view){ - var start = new Date(startDate), - end = new Date(endDate), + eventTimeFormat: { hour12: true, hour: '2-digit', minute: '2-digit', omitZeroMinute: true, meridiem: 'narrow' }, + eventClick: function(eventClickInfo) { + var calEvent = {"event": eventClickInfo.event}, + originalEvent = eventClickInfo.jsEvent, + view = eventClickInfo.view, + el = $(eventClickInfo.el); + c.event_create_space.html("").hide(); + c.dialog.dismiss(); + c.dialog.inflate(calEvent); + c.dialog.show({"x": originalEvent.clientX,"y": originalEvent.clientY}); + }, + select : function(selectionInfo){ + var jsEvent = selectionInfo.jsEvent, + view = selectionInfo.view; + var start = selectionInfo.start, + end = selectionInfo.end, + allDay = selectionInfo.allDay, startString = start.getFullYear() + "/"+ (start.getMonth() + 1 > 9 ? start.getMonth() + 1 : "0" + (start.getMonth() + 1)) + "/" + (start.getDate() > 9 ? start.getDate() : "0" + start.getDate()), endString = end.getFullYear() + "/" + (end.getMonth() + 1 > 9 ? end.getMonth() + 1 : "0" + (end.getMonth() + 1)) + "/" + (end.getDate() > 9 ? end.getDate() : "0" + end.getDate()); @@ -193,15 +328,20 @@ var Calendar = function(dom){ endString += " " + end.getMinutes() + ":" + end.getMinutes(); } - $.ajax({ - type : "get", - url : c.create_event_btn.attr("href"), - data : {"startDate":startString,"endDate":endString,"allDay":allDay}, - success : function(data){ - success_event(data,allDay,"new"); - } - }) - } + $.ajax({ + type : "get", + url : c.create_event_btn.attr("href"), + data : {"startDate":startString,"endDate":endString,"allDay":allDay}, + success : function(data){ + success_event(data,allDay,"new"); + } + }) + }, + views: { + dayGridMonth: { + dayMaxEvents: false + } + } }); c.create_event_btn.click(function(){ $.ajax({ @@ -215,19 +355,18 @@ var Calendar = function(dom){ }); c.nextBtn.click(function(){ c.dialog.dismiss(); - c.calendar.fullCalendar('next'); + c.calendar_dom.calendar.next(); }); c.prevBtn.click(function(){ c.dialog.dismiss(); - c.calendar.fullCalendar('prev'); + c.calendar_dom.calendar.prev(); }); c.todayBtn.click(function(){ c.dialog.dismiss(); - c.calendar.fullCalendar('today'); + c.calendar_dom.calendar.today(); }); c.modeBtns.click(function(){ c.dialog.dismiss(); - c.event_create_space.html("").hide(); toggleViews($(this).data("mode")); }); c.refreshBtn.click(function(){ @@ -235,18 +374,17 @@ var Calendar = function(dom){ if(c.currentView == "agenda") agendaView.refresh(); else - c.calendar.fullCalendar("refetchEvents"); + c.calendar_dom.calendar.refetchEvents(); }); - c.calendar.mouseup(function(e){ + c.calendar_dom.mouseup(function(e){ c.mousePosition = {"x" : e.pageX, "y" : e.pageY}; }) - var toggleViews = function(view){ c.modeBtns.removeClass("active"); c.modeBtns.each(function(){ if ($(this).data("mode") == view) $(this).addClass("active"); - }) + }); if(view != "agenda"){ if(c.currentView == "agenda"){ // $("#sec1").addClass("span3").removeClass("span7"); @@ -254,7 +392,7 @@ var Calendar = function(dom){ // $("#sec3").addClass("span4").removeClass("span5"); agendaView.hide(); } - c.calendar.fullCalendar('changeView',view); + c.calendar_dom.calendar.changeView(view); }else{ // $("#sec1").addClass("span7").removeClass("span3"); $("#sec2").hide(); @@ -263,47 +401,22 @@ var Calendar = function(dom){ } c.currentView = view; if(loadeventsonviewchange){ - c.calendar.fullCalendar("refetchEvents"); + c.calendar_dom.calendar.refetchEvents(); loadeventsonviewchange = false; } - } + if(c.calendar_dom.calendar.currentData){ + var viewTitle = c.calendar_dom.calendar.currentData.viewTitle; + if(view == "timeGridDay" && $('.fc-col-header-cell-cushion ').text() != "") + viewTitle = $('.fc-col-header-cell-cushion ').text() + ', ' + viewTitle; + $('#current_title').html(viewTitle); + } + c.calendar_dom.calendar.render(); //Rerender to fix layout + }; if(c.currentView == "agenda"){toggleViews("agenda");loadeventsonviewchange = true;} - c.calendar.on("DOMMouseScroll mousewheel", function(e){ - if(c.calendar.fullCalendar("getView").name == "month"){ - if(!c.isFormVisible()){ - c.dialog.dismiss(); - if(/Firefox/i.test(navigator.userAgent)){ - if(e.originalEvent.detail == 1){ - c.calendar.fullCalendar('next'); - }else if(e.originalEvent.detail == -1){ - c.calendar.fullCalendar('prev'); - } - }else{ - if(e.originalEvent.wheelDelta /120 > 0) - c.calendar.fullCalendar('prev'); - else - c.calendar.fullCalendar('next'); - } - } - } - }); - - } - - this.isFormVisible = function(){ - return (c.event_create_space.html() == "" ? false : true); - } - - this.renderEvent = function(eventStick){ - if(eventStick.recurring == true){ - c.calendar.fullCalendar("refetchEvents"); - }else{ - c.calendar.fullCalendar("renderEvent",eventStick); - } - } + }; this.updateEvent = function(eventStick){ - c.calendar.fullCalendar("updateEvent",eventStick); + c.calendar_dom.fullCalendar("updateEvent",eventStick); } this.deleteEvent = function(delete_url,_id){ @@ -311,7 +424,7 @@ var Calendar = function(dom){ type : "delete", url : delete_url, success : function(){ - c.calendar.fullCalendar("removeEvents",[_id]); + c.calendar_dom.fullCalendar("removeEvents",[_id]); c.dialog.dismiss(); } }) @@ -328,53 +441,80 @@ var Calendar = function(dom){ }) } + this.renderEvent = function(eventStick){ + if(eventStick.recurring === true) + c.calendar_dom.calendar.refetchEvents(); + else + c.calendar_dom.calendar.addEvent(eventStick); + }; + + $(document).ready(function() { c.initialize(); }); -} +}; var EventDialog = function(calendar,event){ _t = this; var event_quick_view = null; var template = ""; var _this_event = null; - var month_names = ["Jan","Feb","March","April","May","June","July","Aug","Sep","Oct","Nov","Dec"]; this.inflate = function(_event){ if(!_event) throw new UserException("EventStick can't be null!"); + _event.allDay = _event.event.allDay; + _event._start = _event.event.start; + _event._end = (_event.event.end ? _event.event.end : _event.event.start); + // var start_date = getDateString(_event._start,date_format); + // var end_date = getDateString(_event._end,date_format); + if(_event._end - _event._start > 86400 * 1000){ + _event.allDay = true; + } + _event.title = _event.event.title; + var extendedProps = _event.event.extendedProps; + Object.keys(extendedProps).forEach(function(k){ + _event[k] = extendedProps[k]; + }) + if(_event.hiring_person_name == undefined) + _event.hiring_person_name = ""; _this_event = _event; var start_time = "", - end_time = "", - time_string = null; - Event_e = _event + end_time = "", + time_string = null; if(_event.allDay) { - start_time = $.fullCalendar.formatDate(_event._start,"MMM dd, yyyy"); + start_time = getDateString(_event._start,datetime_format, is_chinese); if(_event._end) - end_time = $.fullCalendar.formatDate(_event._end,"MMM dd, yyyy"); - time_string = (_event._start === _event._end || !_event._end ? "
" + start_time + "
" : " " + start_time + " " + end_time + ""); + end_time = getDateString(_event._end,datetime_format, is_chinese); + time_string = (_event._start === _event._end || !_event._end ? "" + start_time + "
" : "" + start_time + "" + start_time + "
" + stime + " " + etime : "
" + start_time + "" + stime + "
" + end_time + "" + etime + "
"); + start_time = getDateString(_event._start,date_format, is_chinese); + end_time = getDateString(_event._end,date_format, is_chinese); + var stime = getDateString(_event._start,time_format, is_chinese), + etime = getDateString(_event._end,time_format, is_chinese), + same = (start_time == end_time); + if( same ){ + time_string = "" + + start_time + + "
" + stime +
+ " " + etime ;
+ }else{
+ time_string = "" + start_time + " " + stime +
+ "
" +
+ end_time + " " + etime + ""
+ }
+ // time_string = (same ? "
" + start_time + "
" + stime + " " + etime : "
" + start_time + "" + stime + "
" + end_time + "" + etime + "
"); } - event_quick_view = $(''); - template = 'Date | ' + - 'Time | ' + - 'Events | ' + - '
---|---|---|
No events for this month. | ' + - '
Date | ' + + 'Time | ' + + 'Events | ' + + 'Borrower | ' + + '
---|---|---|---|
No events for this month. | ' + + '
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|
No events for this month. |
" + start_time + "
" : " " + start_time + " " + end_time + ""); + end_time = getDateString(_event._end,datetime_format, is_chinese); + time_string = (_event._start === _event._end || !_event._end ? "" + start_time + "
" : "" + start_time + "" + start_time + "
" + stime + " " + etime : "
" + start_time + "" + stime + "
" + end_time + "" + etime + "
"); + start_time = getDateString(_event._start,date_format, is_chinese); + end_time = getDateString(_event._end,date_format, is_chinese); + var stime = getDateString(_event._start,time_format, is_chinese), + etime = getDateString(_event._end,time_format, is_chinese), + same = (start_time == end_time); + if( same ){ + time_string = "" + + start_time + + "
" + stime +
+ " " + etime ;
+ }else{
+ time_string = "" + start_time + " " + stime +
+ "
" +
+ end_time + " " + etime + ""
+ }
+ // time_string = (same ? "
" + start_time + "
" + stime + " " + etime : "
" + start_time + "" + stime + "
" + end_time + "" + etime + "
"); } event_quick_view = $(''); template = 'Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|
" + start_time + "
" : " " + start_time + " " + end_time + ""); + } else { + var sh = _event._start.getHours() > 12 ? _event._start.getHours() - 12 : _event._start.getHours(), + eh = _event._end.getHours() > 12 ? _event._end.getHours() - 12 : _event._end.getHours(), + sm = _event._start.getMinutes() < 10 ? '0' + _event._start.getMinutes() : _event._start.getMinutes(), + em = _event._end.getMinutes() < 10 ? '0' + _event._end.getMinutes() : _event._end.getMinutes(), + stime = _event._start.getHours() > 12 ? sh + ':' + sm + " PM" : sh + ':' + sm + " AM", + etime = _event._end.getHours() > 12 ? eh + ':' + em + " PM" : eh + ':' + em + " AM", + same = (_event._start.getDate() == _event._end.getDate() && _event._start.getMonth() == _event._end.getMonth() && _event._start.getFullYear() == _event._end.getFullYear()); + start_time = month_names[_event._start.getMonth()] + " " + _event._start.getDate() + ", " + _event._start.getFullYear(); + end_time = month_names[_event._end.getMonth()] + " " + _event._end.getDate() + ", " + _event._end.getFullYear(); + + time_string = (same ? "" + start_time + "
" + stime + " " + etime : "
" + start_time + "" + stime + "
" + end_time + "" + etime + "
"); + } + event_quick_view = $(''); + template = 'Sun | ' + + 'Mon | ' + + 'Tue | ' + + 'Wed | ' + + 'Thu | ' + + 'Fri | ' + + 'Sat | ' + + '
---|
Date | ' + + 'Time | ' + + 'Events | ' + + '
---|---|---|
No events for this month. | ' + + '
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|
No events for this month. |
" + start_time + "
" : " " + start_time + " " + end_time + ""); + } else { + var sh = _event._start.getHours() > 12 ? _event._start.getHours() - 12 : _event._start.getHours(), + eh = _event._end.getHours() > 12 ? _event._end.getHours() - 12 : _event._end.getHours(), + sm = _event._start.getMinutes() < 10 ? '0' + _event._start.getMinutes() : _event._start.getMinutes(), + em = _event._end.getMinutes() < 10 ? '0' + _event._end.getMinutes() : _event._end.getMinutes(), + stime = _event._start.getHours() > 12 ? sh + ':' + sm + " PM" : sh + ':' + sm + " AM", + etime = _event._end.getHours() > 12 ? eh + ':' + em + " PM" : eh + ':' + em + " AM", + same = (_event._start.getDate() == _event._end.getDate() && _event._start.getMonth() == _event._end.getMonth() && _event._start.getFullYear() == _event._end.getFullYear()); + start_time = month_names[_event._start.getMonth()] + " " + _event._start.getDate() + ", " + _event._start.getFullYear(); + end_time = month_names[_event._end.getMonth()] + " " + _event._end.getDate() + ", " + _event._end.getFullYear(); + + time_string = (same ? "" + start_time + "
" + stime + " " + etime : "
" + start_time + "" + stime + "
" + end_time + "" + etime + "
"); + } + event_quick_view = $(''); + template = 'Sun | ' + + 'Mon | ' + + 'Tue | ' + + 'Wed | ' + + 'Thu | ' + + 'Fri | ' + + 'Sat | ' + + '
---|
Date | ' + + 'Time | ' + + 'Events | ' + + '
---|---|---|
No events for this month. | ' + + '
"; - } - - for (i=0; i | " + - "" + - " | "; - } - - for (j=0; j
---|
" + opt('allDayText') + " | " + - "" +
- " " +
- " | " +
- "" + - " |
---|
" + - ((!slotNormal || !minutes) ? formatDate(d, opt('axisFormat')) : ' ') + - " | " + - "" +
- " | " +
- "
---|
3;)e.pop()();if(e[1] * {
- margin: 0 5px;
- }
+ & > * {
+ margin: 0 5px;
+ }
- @media screen and (max-width: 479px) {
- margin-right: 0;
+ @media screen and (max-width: 479px) {
+ margin-right: 0;
- & > * {
- margin: 0;
- }
+ & > * {
+ margin: 0;
+ }
- & > label,
- #show_events {
- display: block;
- margin-top: 10px;
- margin-bottom: 10px;
- }
+ & > label,
+ #show_events {
+ display: block;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ }
- & > select {
- display: block;
- width: 100%;
- margin-bottom: 5px;
- }
- }
+ & > select {
+ display: block;
+ width: 100%;
+ margin-bottom: 5px;
+ }
+ }
- @media screen and (max-width: 767px) {
- & > select {
- .internal-page & {
- margin-bottom: 5px;
- }
- }
- }
- }
+ @media screen and (max-width: 767px) {
+ & > select {
+ .internal-page & {
+ margin-bottom: 5px;
+ }
+ }
+ }
+ }
- .fc-view {
- font-size: 1em;
- background-color: #fff;
- }
+ .fc-view {
+ font-size: 1em;
+ background-color: #fff;
+ }
}
#view_holder {
- clear: both;
+ clear: both;
}
.calendar_color_tag {
- display: inline-block;
- width: 18px;
- height: 18px;
- margin-right: 4px;
- vertical-align: bottom;
+ display: inline-block;
+ width: 18px;
+ height: 18px;
+ margin-right: 4px;
+ vertical-align: bottom;
}
.calendar_mode {
- z-index: 2;
+ z-index: 2;
}
.mode_switch {
- text-transform: capitalize;
+ text-transform: capitalize;
}
.today {
- background-color: #D9EDF7;
+ background-color: #D9EDF7;
}
.event {
- font-size: 12px;
- border-radius: 3px;
- cursor: pointer;
- padding: 1px 3px;
- font-weight: bold;
- box-shadow: inset 0 0 1px black;
- -webkit-box-shadow: inset 0 0 1px black;
- -moz-box-shadow: inset 0 0 1px black;
+ font-size: 12px;
+ border-radius: 3px;
+ cursor: pointer;
+ padding: 1px 3px;
+ font-weight: bold;
+ box-shadow: inset 0 0 1px black;
+ -webkit-box-shadow: inset 0 0 1px black;
+ -moz-box-shadow: inset 0 0 1px black;
}
.modal-body {
- max-height: 400px;
+ max-height: 400px;
}
.event_list_wrapper {
- position: relative;
+ position: relative;
}
.event_list {
- .cell {
- height: 39px;
- border: solid 1px #ddd;
- border-top: 0;
- }
+ .cell {
+ height: 39px;
+ border: solid 1px #ddd;
+ border-top: 0;
+ }
- .divide {
- height: 19px;
- margin-bottom: 18px;
- border-bottom: solid 1px #eee;
- }
+ .divide {
+ height: 19px;
+ margin-bottom: 18px;
+ border-bottom: solid 1px #eee;
+ }
- .day_time {
- height: 31px;
- border-bottom: solid 1px #ddd;
- border-left: solid 1px #ddd;
- text-align: right;
- padding: 4px;
- }
+ .day_time {
+ height: 31px;
+ border-bottom: solid 1px #ddd;
+ border-left: solid 1px #ddd;
+ text-align: right;
+ padding: 4px;
+ }
}
.event {
- dl, dt, dd {
- margin: 0;
- padding: 0;
- }
+ dl, dt, dd {
+ margin: 0;
+ padding: 0;
+ }
- dl {
- padding: 3px;
- }
+ dl {
+ padding: 3px;
+ }
- dt {
- font-size: 11px;
- font-weight: normal;
- line-height: 12px;
- }
+ dt {
+ font-size: 11px;
+ font-weight: normal;
+ line-height: 12px;
+ }
}
/* day view */
#calendar_day {
- .event_holder {
- width: 100%;
- /*height: 100%;*/
- position: absolute;
- top: 0;
- z-index: 1;
- }
+ .event_holder {
+ width: 100%;
+ /*height: 100%;*/
+ position: absolute;
+ top: 0;
+ z-index: 1;
+ }
- .header {
- margin-bottom: 10px;
- }
+ .header {
+ margin-bottom: 10px;
+ }
- .header th {
- text-align: center;
- }
+ .header th {
+ text-align: center;
+ }
- td {
- border: 0;
- }
+ td {
+ border: 0;
+ }
- .event {
- margin-bottom: 2px;
- }
+ .event {
+ margin-bottom: 2px;
+ }
- .all_day_event {
- background: #eee;
- border: solid 1px #ddd;
- }
+ .all_day_event {
+ background: #eee;
+ border: solid 1px #ddd;
+ }
- .event_list .table {
- border-top: solid 1px #ddd;
- }
+ .event_list .table {
+ border-top: solid 1px #ddd;
+ }
- .event_list td {
- padding: 0;
- }
+ .event_list td {
+ padding: 0;
+ }
}
.event_holder {
- .inner {
- position: relative;
- margin: 0 16px 0 2px;
- }
+ .inner {
+ position: relative;
+ margin: 0 16px 0 2px;
+ }
- .event {
- padding: 0px;
- position: absolute;
- width: 100%;
- }
- .event.half {}
+ .event {
+ padding: 0px;
+ position: absolute;
+ width: 100%;
+ }
+ .event.half {}
- .event.over {
- border: solid 1px #fff;
- }
+ .event.over {
+ border: solid 1px #fff;
+ }
}
/* month view */
#calendar_month {
- border-bottom: solid 1px #ddd;
+ border-bottom: solid 1px #ddd;
- .month_row {
- position: relative;
- border: solid 1px #ddd;
- border-bottom: 0;
- height: 60px;
- overflow: hidden;
+ .month_row {
+ position: relative;
+ border: solid 1px #ddd;
+ border-bottom: 0;
+ height: 60px;
+ overflow: hidden;
- &.header {
- height: 28px;
- border: 0;
+ &.header {
+ height: 28px;
+ border: 0;
- th {
- font-size: 12px;
- padding: 4px;
- border: 0;
- }
- }
+ th {
+ font-size: 12px;
+ padding: 4px;
+ border: 0;
+ }
+ }
- .table {
- table-layout: fixed;
- margin-bottom: 0;
- width: 100%;
- position: absolute;
+ .table {
+ table-layout: fixed;
+ margin-bottom: 0;
+ width: 100%;
+ position: absolute;
- td {
- border: 0;
- border-left: solid 1px #ddd;
- padding: 2px 4px 0 4px;
+ td {
+ border: 0;
+ border-left: solid 1px #ddd;
+ padding: 2px 4px 0 4px;
- &.today {
- border-bottom: solid 1px #fff;
- border-top: solid 1px #fff;
- }
+ &.today {
+ border-bottom: solid 1px #fff;
+ border-top: solid 1px #fff;
+ }
- &.disable {
- background-color: #f6f6f6;
- color: #ccc;
- border-left: solid 1px #ddd;
- }
+ &.disable {
+ background-color: #f6f6f6;
+ color: #ccc;
+ border-left: solid 1px #ddd;
+ }
- &:first-child {
- border-left: 0;
- }
- }
- }
+ &:first-child {
+ border-left: 0;
+ }
+ }
+ }
- .month_table {
- height: 100%;
- }
+ .month_table {
+ height: 100%;
+ }
- .month_date {
- color: #666;
- font-size: 11px;
- cursor: pointer;
+ .month_date {
+ color: #666;
+ font-size: 11px;
+ cursor: pointer;
- td {
- border-left: 0;
- }
+ td {
+ border-left: 0;
+ }
- .day_title:hover {
- text-decoration: underline;
- }
+ .day_title:hover {
+ text-decoration: underline;
+ }
- .event:hover {
- text-decoration: none !important;
- }
- }
+ .event:hover {
+ text-decoration: none !important;
+ }
+ }
- .event {
- margin: 0 -2px;
- position: relative;
- color: #000;
- }
- }
+ .event {
+ margin: 0 -2px;
+ position: relative;
+ color: #000;
+ }
+ }
- .event.single {
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
- }
+ .event.single {
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+ }
}
/* agenda view */
#calendar_agenda {
- margin-top: 20px;
- font-size: 12px;
+ margin-top: 20px;
+ font-size: 12px;
> .row {
- margin-bottom: 30px;
+ margin-bottom: 30px;
}
- .table {
- margin-bottom: 0;
- background-color: #fff;
- }
+ .table {
+ margin-bottom: 0;
+ background-color: #fff;
+ }
- .tiny_calendar {
- .table {
- th {
- text-align: center;
- border-top: 0;
- }
+ .tiny_calendar {
+ .table {
+ th {
+ text-align: center;
+ border-top: 0;
+ }
- td {
- text-align: center;
- }
- }
- }
+ td {
+ text-align: center;
+ }
+ }
+ }
- .event {
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
- }
+ .event {
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+ }
- .row-fluid {
- margin-top: 20px;
- padding-top: 20px;
- border-top: dashed 1px #ddd;
+ .row-fluid {
+ margin-top: 20px;
+ padding-top: 20px;
+ border-top: dashed 1px #ddd;
- &:first-child {
- border-top: 0;
- padding-top: 0;
- margin-top: 0;
- }
- }
+ &:first-child {
+ border-top: 0;
+ padding-top: 0;
+ margin-top: 0;
+ }
+ }
}
.event_time {
- font-family: Tahoma, sans-serif;
+ font-family: Tahoma, sans-serif;
}
.has_event {
- background-color: #08c;
- color: #fff;
+ background-color: #08c;
+ color: #fff;
}
/* week view */
#calendar_week {
- .cell_wrapper {
- position: absolute;
- width: 100%;
- }
+ .cell_wrapper {
+ position: absolute;
+ width: 100%;
+ }
- td {
- padding: 0;
- }
+ td {
+ padding: 0;
+ }
- .table {
- margin-bottom: 0;
- }
+ .table {
+ margin-bottom: 0;
+ }
- .header {
- margin-bottom: 12px;
- border-top: 0;
- table-layout: fixed;
- }
+ .header {
+ margin-bottom: 12px;
+ border-top: 0;
+ table-layout: fixed;
+ }
- .header {
- th {
- text-align: center;
- font-size: 12px;
- }
+ .header {
+ th {
+ text-align: center;
+ font-size: 12px;
+ }
- td {
- border: solid 1px #ddd;
- /*background-color: #eee;*/
- }
- }
+ td {
+ border: solid 1px #ddd;
+ /*background-color: #eee;*/
+ }
+ }
- .week_day {
- padding: 0 2px;
- border: solid 1px #ddd;
- }
+ .week_day {
+ padding: 0 2px;
+ border: solid 1px #ddd;
+ }
- .header .week_day {
- padding: 2px 4px 0px 2px;
- }
+ .header .week_day {
+ padding: 2px 4px 0px 2px;
+ }
- .event_list .event {
- position: absolute;
- width: 100%;
- margin-bottom: 2px;
- }
+ .event_list .event {
+ position: absolute;
+ width: 100%;
+ margin-bottom: 2px;
+ }
- .cell_map {
- margin-bottom: 18px;
+ .cell_map {
+ margin-bottom: 18px;
- td {
- border-top: 0;
- border-bottom: 0;
- }
+ td {
+ border-top: 0;
+ border-bottom: 0;
+ }
- tr:first-child td {
- border-top: solid 1px #ddd;
- }
- }
+ tr:first-child td {
+ border-top: solid 1px #ddd;
+ }
+ }
- .event_holder .inner {
- margin: 0 8px 0 0;
- }
+ .event_holder .inner {
+ margin: 0 8px 0 0;
+ }
- .all_day_event_holder {
- position: relative;
- width: 100%;
- table-layout: fixed;
- }
+ .all_day_event_holder {
+ position: relative;
+ width: 100%;
+ table-layout: fixed;
+ }
- .all_day_event_holder td {
- border: 0;
- background-color: transparent;
- }
+ .all_day_event_holder td {
+ border: 0;
+ background-color: transparent;
+ }
- .all_day_event {
- background: #eee;
- }
+ .all_day_event {
+ background: #eee;
+ }
}
/* calendars(category) */
.calendars_color_tag {
- width: 20px;
- height: 20px;
- display: inline-block;
- border-radius: 3px;
- box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.2);
+ width: 20px;
+ height: 20px;
+ display: inline-block;
+ border-radius: 3px;
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}
/* Event Controller */
.event_controller {
- .form-horizontal {
- margin-bottom: 0;
+ .form-horizontal {
+ margin-bottom: 0;
- .control-label {
- width: 60px;
- }
+ .control-label {
+ width: 60px;
+ }
- .controls {
- margin-left: 80px;
+ .controls {
+ margin-left: 80px;
- input[type="text"],
- select,
- textarea,
- .uneditable-input {
- width: 100%;
- height: 30px;
- line-height: 30px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- }
+ input[type="text"],
+ select,
+ textarea,
+ .uneditable-input {
+ width: 100%;
+ height: 30px;
+ line-height: 30px;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ }
- input[type="checkbox"] {
- margin-top: 0;
- }
+ input[type="checkbox"] {
+ margin-top: 0;
+ }
- textarea {
- height: auto;
- line-height: 1em;
- resize: vertical;
- }
- }
- }
+ textarea {
+ height: auto;
+ line-height: 1em;
+ resize: vertical;
+ }
+ }
+ }
- .last {
- margin-bottom: 0;
- }
+ .last {
+ margin-bottom: 0;
+ }
- .row-fluid {
- margin-bottom: 6px;
+ .row-fluid {
+ margin-bottom: 6px;
- .control-label {
- line-height: 30px;
- }
- }
+ .control-label {
+ line-height: 30px;
+ }
+ }
}
.close {
- border: 0;
- background: none;
+ border: 0;
+ background: none;
}
/* miniColors tweak */
.miniColors-trigger {
- width: 20px;
- height: 20px;
- margin-bottom: 10px;
- margin-left: 10px;
- border-color: #f1f1f1;
+ width: 20px;
+ height: 20px;
+ margin-bottom: 10px;
+ margin-left: 10px;
+ border-color: #f1f1f1;
}
.miniColors-selector {
- float: none;
- margin: 4px 0 0 0;
+ float: none;
+ margin: 4px 0 0 0;
}
/* category edit */
.edit_cal {
- margin: -8px;
- background-color: whitesmoke;
+ margin: -8px;
+ background-color: whitesmoke;
- .table,
- .table td {
- border: 0 !important;
- background-color: transparent !important;
- margin: 0 !important;
- }
+ .table,
+ .table td {
+ border: 0 !important;
+ background-color: transparent !important;
+ margin: 0 !important;
+ }
}
.main-list td {
- border-top: solid 1px #ddd;
+ border-top: solid 1px #ddd;
}
/* create / edit event panel */
#tags_panel {
- top: auto;
- bottom: 34px;
- width: 258px;
- height: 170px;
- padding: 8px 0;
- overflow: hidden;
- position: absolute;
- clear: none;
+ top: auto;
+ bottom: 34px;
+ width: 258px;
+ height: 170px;
+ padding: 8px 0;
+ overflow: hidden;
+ position: absolute;
+ clear: none;
- .viewport {
- height: 170px;
- }
+ .viewport {
+ height: 170px;
+ }
- .scrollbar {
- top: 8px;
- }
+ .scrollbar {
+ top: 8px;
+ }
}
#tags_list {
- padding: 8px;
+ padding: 8px;
}
.bootstrap-datetimepicker-widget.dropdown-menu {
- z-index: 1051;
+ z-index: 1051;
}
#main-wrap {
- padding-bottom: 0;
+ padding-bottom: 0;
}
.fc-other-month {
- background-color: #F6F6F6;
+ background-color: #F6F6F6;
}
#calendar-loading {
- position: absolute;
- top: 40%;
- z-index: 10;
- width: 120px;
- height: 120px;
- padding: 5px;
- border-radius: 4px;
- border: 1px solid #dbdbdb;
- background-color: rgba(255, 255, 255, 0.95);
- background-image: url("/assets/loading1.gif");
- background-repeat: no-repeat;
- background-position: center 20px;
- background-size: 50%;
- box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.2);
+ position: absolute;
+ top: 40%;
+ z-index: 10;
+ width: 120px;
+ height: 120px;
+ padding: 5px;
+ border-radius: 4px;
+ border: 1px solid #dbdbdb;
+ background-color: rgba(255, 255, 255, 0.95);
+ background-image: url("/assets/loading1.gif");
+ background-repeat: no-repeat;
+ background-position: center 20px;
+ background-size: 50%;
+ box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.2);
- &:after {
- content: "Loading...";
- position: absolute;
- bottom: 0;
- display: block;
- width: 100%;
- line-height: 4em;
- text-align: center;
- }
+ &:after {
+ content: "Loading...";
+ position: absolute;
+ bottom: 0;
+ display: block;
+ width: 100%;
+ line-height: 4em;
+ text-align: center;
+ }
}
#event_create_space {
- display: none;
- position: fixed;
- width: 400px;
- margin: 0;
- background-color: #fff;
- z-index: 1050;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
- outline: none;
- -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
- -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
- box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
- -webkit-background-clip: padding-box;
- -moz-background-clip: padding-box;
- background-clip: padding-box;
+ display: none;
+ position: fixed;
+ width: 400px;
+ margin: 0;
+ background-color: #fff;
+ z-index: 1050;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+ outline: none;
+ -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+ -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+ box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding-box;
+ background-clip: padding-box;
- .alert {
- margin-bottom: 0;
- }
+ .alert {
+ margin-bottom: 0;
+ }
- .new_event {
- margin-bottom: 0;
- }
- .modal-body {
- overflow-x: hidden;
- padding: 25px 25px 15px 15px;
- }
- .datetimepick {
- > input {
+ .new_event {
+ margin-bottom: 0;
+ }
+ .modal-body {
+ overflow-x: hidden;
+ padding: 25px 25px 15px 15px;
+ }
+ .datetimepick {
+ > input {
width: 90%;
- }
- }
+ }
+ }
}
.calendar-modal {
- position: fixed;
- z-index: 1050;
- width: 300px;
- margin: 0;
- font-size: 12px;
+ position: fixed;
+ z-index: 1050;
+ width: 300px;
+ margin: 0;
+ font-size: 12px;
- & > .modal-content {
- h3 {
- margin: 0;
- }
- }
+ & > .modal-content {
+ h3 {
+ margin: 0;
+ }
+ }
- .event_summary {
- margin-right: -15px;
- margin-bottom: 15px;
- margin-left: -15px;
- padding-right: 15px;
- padding-bottom: 15px;
- padding-left: 15px;
- border-bottom: 1px solid #eee;
+ .event_summary {
+ margin-right: -15px;
+ margin-bottom: 15px;
+ margin-left: -15px;
+ padding-right: 15px;
+ padding-bottom: 15px;
+ padding-left: 15px;
+ border-bottom: 1px solid #eee;
- > p {
- margin-bottom: 0;
- }
+ > p {
+ margin-bottom: 0;
+ }
- i {
- color: #989898;
- }
- }
+ i {
+ color: #989898;
+ }
+ }
}
.calendar-form-actions {
- margin-top: 0;
- margin-bottom: 0;
- padding-top: 10px;
- padding-right: 0;
- padding-bottom: 0;
- padding-left: 0;
+ margin-top: 0;
+ margin-bottom: 0;
+ padding-top: 10px;
+ padding-right: 0;
+ padding-bottom: 0;
+ padding-left: 0;
}
.agenda-event {
@@ -735,7 +735,26 @@
overflow-y: auto;
height: 200px;
margin-top: 40px;
- @media screen and (max-width: 767px) {
+ @media screen and (max-width: 767px) {
height: auto;
}
+}
+
+.modal-content {
+ position: relative;
+ background-color: #fff;
+ -webkit-background-clip: padding-box;
+ background-clip: padding-box;
+ border: 1px solid #999;
+ border: 1px solid rgba(0,0,0,0.2);
+ border-radius: 6px;
+ outline: 0;
+ -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
+ box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
+}
+@media (min-width:768px){
+ .modal-content {
+ -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
+ }
}
\ No newline at end of file
diff --git a/app/assets/stylesheets/fullcalendar.css b/app/assets/stylesheets/fullcalendar.css
index c9add0b..475287b 100644
--- a/app/assets/stylesheets/fullcalendar.css
+++ b/app/assets/stylesheets/fullcalendar.css
@@ -1,579 +1,1494 @@
-/*!
- * FullCalendar v1.6.1 Stylesheet
- * Docs & License: http://arshaw.com/fullcalendar/
- * (c) 2013 Adam Shaw
- */
+/* classes attached to
';
+ el.querySelector('table').style.height = '100px';
+ el.querySelector('div').style.height = '100%';
+ document.body.appendChild(el);
+ var div = el.querySelector('div');
+ var possible = div.offsetHeight > 0;
+ document.body.removeChild(el);
+ return possible;
+ }
+
+ var EMPTY_EVENT_STORE = createEmptyEventStore(); // for purecomponents. TODO: keep elsewhere
+ var Splitter = /** @class */ (function () {
+ function Splitter() {
+ this.getKeysForEventDefs = memoize(this._getKeysForEventDefs);
+ this.splitDateSelection = memoize(this._splitDateSpan);
+ this.splitEventStore = memoize(this._splitEventStore);
+ this.splitIndividualUi = memoize(this._splitIndividualUi);
+ this.splitEventDrag = memoize(this._splitInteraction);
+ this.splitEventResize = memoize(this._splitInteraction);
+ this.eventUiBuilders = {}; // TODO: typescript protection
+ }
+ Splitter.prototype.splitProps = function (props) {
+ var _this = this;
+ var keyInfos = this.getKeyInfo(props);
+ var defKeys = this.getKeysForEventDefs(props.eventStore);
+ var dateSelections = this.splitDateSelection(props.dateSelection);
+ var individualUi = this.splitIndividualUi(props.eventUiBases, defKeys); // the individual *bases*
+ var eventStores = this.splitEventStore(props.eventStore, defKeys);
+ var eventDrags = this.splitEventDrag(props.eventDrag);
+ var eventResizes = this.splitEventResize(props.eventResize);
+ var splitProps = {};
+ this.eventUiBuilders = mapHash(keyInfos, function (info, key) { return _this.eventUiBuilders[key] || memoize(buildEventUiForKey); });
+ for (var key in keyInfos) {
+ var keyInfo = keyInfos[key];
+ var eventStore = eventStores[key] || EMPTY_EVENT_STORE;
+ var buildEventUi = this.eventUiBuilders[key];
+ splitProps[key] = {
+ businessHours: keyInfo.businessHours || props.businessHours,
+ dateSelection: dateSelections[key] || null,
+ eventStore: eventStore,
+ eventUiBases: buildEventUi(props.eventUiBases[''], keyInfo.ui, individualUi[key]),
+ eventSelection: eventStore.instances[props.eventSelection] ? props.eventSelection : '',
+ eventDrag: eventDrags[key] || null,
+ eventResize: eventResizes[key] || null,
+ };
+ }
+ return splitProps;
+ };
+ Splitter.prototype._splitDateSpan = function (dateSpan) {
+ var dateSpans = {};
+ if (dateSpan) {
+ var keys = this.getKeysForDateSpan(dateSpan);
+ for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
+ var key = keys_1[_i];
+ dateSpans[key] = dateSpan;
+ }
+ }
+ return dateSpans;
+ };
+ Splitter.prototype._getKeysForEventDefs = function (eventStore) {
+ var _this = this;
+ return mapHash(eventStore.defs, function (eventDef) { return _this.getKeysForEventDef(eventDef); });
+ };
+ Splitter.prototype._splitEventStore = function (eventStore, defKeys) {
+ var defs = eventStore.defs, instances = eventStore.instances;
+ var splitStores = {};
+ for (var defId in defs) {
+ for (var _i = 0, _a = defKeys[defId]; _i < _a.length; _i++) {
+ var key = _a[_i];
+ if (!splitStores[key]) {
+ splitStores[key] = createEmptyEventStore();
+ }
+ splitStores[key].defs[defId] = defs[defId];
+ }
+ }
+ for (var instanceId in instances) {
+ var instance = instances[instanceId];
+ for (var _b = 0, _c = defKeys[instance.defId]; _b < _c.length; _b++) {
+ var key = _c[_b];
+ if (splitStores[key]) { // must have already been created
+ splitStores[key].instances[instanceId] = instance;
+ }
+ }
+ }
+ return splitStores;
+ };
+ Splitter.prototype._splitIndividualUi = function (eventUiBases, defKeys) {
+ var splitHashes = {};
+ for (var defId in eventUiBases) {
+ if (defId) { // not the '' key
+ for (var _i = 0, _a = defKeys[defId]; _i < _a.length; _i++) {
+ var key = _a[_i];
+ if (!splitHashes[key]) {
+ splitHashes[key] = {};
+ }
+ splitHashes[key][defId] = eventUiBases[defId];
+ }
+ }
+ }
+ return splitHashes;
+ };
+ Splitter.prototype._splitInteraction = function (interaction) {
+ var splitStates = {};
+ if (interaction) {
+ var affectedStores_1 = this._splitEventStore(interaction.affectedEvents, this._getKeysForEventDefs(interaction.affectedEvents));
+ // can't rely on defKeys because event data is mutated
+ var mutatedKeysByDefId = this._getKeysForEventDefs(interaction.mutatedEvents);
+ var mutatedStores_1 = this._splitEventStore(interaction.mutatedEvents, mutatedKeysByDefId);
+ var populate = function (key) {
+ if (!splitStates[key]) {
+ splitStates[key] = {
+ affectedEvents: affectedStores_1[key] || EMPTY_EVENT_STORE,
+ mutatedEvents: mutatedStores_1[key] || EMPTY_EVENT_STORE,
+ isEvent: interaction.isEvent,
+ };
+ }
+ };
+ for (var key in affectedStores_1) {
+ populate(key);
+ }
+ for (var key in mutatedStores_1) {
+ populate(key);
+ }
+ }
+ return splitStates;
+ };
+ return Splitter;
+ }());
+ function buildEventUiForKey(allUi, eventUiForKey, individualUi) {
+ var baseParts = [];
+ if (allUi) {
+ baseParts.push(allUi);
+ }
+ if (eventUiForKey) {
+ baseParts.push(eventUiForKey);
+ }
+ var stuff = {
+ '': combineEventUis(baseParts),
+ };
+ if (individualUi) {
+ __assign(stuff, individualUi);
+ }
+ return stuff;
+ }
+
+ function getDateMeta(date, todayRange, nowDate, dateProfile) {
+ return {
+ dow: date.getUTCDay(),
+ isDisabled: Boolean(dateProfile && !rangeContainsMarker(dateProfile.activeRange, date)),
+ isOther: Boolean(dateProfile && !rangeContainsMarker(dateProfile.currentRange, date)),
+ isToday: Boolean(todayRange && rangeContainsMarker(todayRange, date)),
+ isPast: Boolean(nowDate ? (date < nowDate) : todayRange ? (date < todayRange.start) : false),
+ isFuture: Boolean(nowDate ? (date > nowDate) : todayRange ? (date >= todayRange.end) : false),
+ };
+ }
+ function getDayClassNames(meta, theme) {
+ var classNames = [
+ 'fc-day',
+ "fc-day-" + DAY_IDS[meta.dow],
+ ];
+ if (meta.isDisabled) {
+ classNames.push('fc-day-disabled');
+ }
+ else {
+ if (meta.isToday) {
+ classNames.push('fc-day-today');
+ classNames.push(theme.getClass('today'));
+ }
+ if (meta.isPast) {
+ classNames.push('fc-day-past');
+ }
+ if (meta.isFuture) {
+ classNames.push('fc-day-future');
+ }
+ if (meta.isOther) {
+ classNames.push('fc-day-other');
+ }
+ }
+ return classNames;
+ }
+ function getSlotClassNames(meta, theme) {
+ var classNames = [
+ 'fc-slot',
+ "fc-slot-" + DAY_IDS[meta.dow],
+ ];
+ if (meta.isDisabled) {
+ classNames.push('fc-slot-disabled');
+ }
+ else {
+ if (meta.isToday) {
+ classNames.push('fc-slot-today');
+ classNames.push(theme.getClass('today'));
+ }
+ if (meta.isPast) {
+ classNames.push('fc-slot-past');
+ }
+ if (meta.isFuture) {
+ classNames.push('fc-slot-future');
+ }
+ }
+ return classNames;
+ }
+
+ var DAY_FORMAT = createFormatter({ year: 'numeric', month: 'long', day: 'numeric' });
+ var WEEK_FORMAT = createFormatter({ week: 'long' });
+ function buildNavLinkAttrs(context, dateMarker, viewType, isTabbable) {
+ if (viewType === void 0) { viewType = 'day'; }
+ if (isTabbable === void 0) { isTabbable = true; }
+ var dateEnv = context.dateEnv, options = context.options, calendarApi = context.calendarApi;
+ var dateStr = dateEnv.format(dateMarker, viewType === 'week' ? WEEK_FORMAT : DAY_FORMAT);
+ if (options.navLinks) {
+ var zonedDate = dateEnv.toDate(dateMarker);
+ var handleInteraction = function (ev) {
+ var customAction = viewType === 'day' ? options.navLinkDayClick :
+ viewType === 'week' ? options.navLinkWeekClick : null;
+ if (typeof customAction === 'function') {
+ customAction.call(calendarApi, dateEnv.toDate(dateMarker), ev);
+ }
+ else {
+ if (typeof customAction === 'string') {
+ viewType = customAction;
+ }
+ calendarApi.zoomTo(dateMarker, viewType);
+ }
+ };
+ return __assign({ title: formatWithOrdinals(options.navLinkHint, [dateStr, zonedDate], dateStr), 'data-navlink': '' }, (isTabbable
+ ? createAriaClickAttrs(handleInteraction)
+ : { onClick: handleInteraction }));
+ }
+ return { 'aria-label': dateStr };
+ }
+
+ var _isRtlScrollbarOnLeft = null;
+ function getIsRtlScrollbarOnLeft() {
+ if (_isRtlScrollbarOnLeft === null) {
+ _isRtlScrollbarOnLeft = computeIsRtlScrollbarOnLeft();
+ }
+ return _isRtlScrollbarOnLeft;
+ }
+ function computeIsRtlScrollbarOnLeft() {
+ var outerEl = document.createElement('div');
+ applyStyle(outerEl, {
+ position: 'absolute',
+ top: -1000,
+ left: 0,
+ border: 0,
+ padding: 0,
+ overflow: 'scroll',
+ direction: 'rtl',
+ });
+ outerEl.innerHTML = '';
+ document.body.appendChild(outerEl);
+ var innerEl = outerEl.firstChild;
+ var res = innerEl.getBoundingClientRect().left > outerEl.getBoundingClientRect().left;
+ removeElement(outerEl);
+ return res;
+ }
+
+ var _scrollbarWidths;
+ function getScrollbarWidths() {
+ if (!_scrollbarWidths) {
+ _scrollbarWidths = computeScrollbarWidths();
+ }
+ return _scrollbarWidths;
+ }
+ function computeScrollbarWidths() {
+ var el = document.createElement('div');
+ el.style.overflow = 'scroll';
+ el.style.position = 'absolute';
+ el.style.top = '-9999px';
+ el.style.left = '-9999px';
+ document.body.appendChild(el);
+ var res = computeScrollbarWidthsForEl(el);
+ document.body.removeChild(el);
+ return res;
+ }
+ // WARNING: will include border
+ function computeScrollbarWidthsForEl(el) {
+ return {
+ x: el.offsetHeight - el.clientHeight,
+ y: el.offsetWidth - el.clientWidth,
+ };
+ }
+
+ function computeEdges(el, getPadding) {
+ if (getPadding === void 0) { getPadding = false; }
+ var computedStyle = window.getComputedStyle(el);
+ var borderLeft = parseInt(computedStyle.borderLeftWidth, 10) || 0;
+ var borderRight = parseInt(computedStyle.borderRightWidth, 10) || 0;
+ var borderTop = parseInt(computedStyle.borderTopWidth, 10) || 0;
+ var borderBottom = parseInt(computedStyle.borderBottomWidth, 10) || 0;
+ var badScrollbarWidths = computeScrollbarWidthsForEl(el); // includes border!
+ var scrollbarLeftRight = badScrollbarWidths.y - borderLeft - borderRight;
+ var scrollbarBottom = badScrollbarWidths.x - borderTop - borderBottom;
+ var res = {
+ borderLeft: borderLeft,
+ borderRight: borderRight,
+ borderTop: borderTop,
+ borderBottom: borderBottom,
+ scrollbarBottom: scrollbarBottom,
+ scrollbarLeft: 0,
+ scrollbarRight: 0,
+ };
+ if (getIsRtlScrollbarOnLeft() && computedStyle.direction === 'rtl') { // is the scrollbar on the left side?
+ res.scrollbarLeft = scrollbarLeftRight;
+ }
+ else {
+ res.scrollbarRight = scrollbarLeftRight;
+ }
+ if (getPadding) {
+ res.paddingLeft = parseInt(computedStyle.paddingLeft, 10) || 0;
+ res.paddingRight = parseInt(computedStyle.paddingRight, 10) || 0;
+ res.paddingTop = parseInt(computedStyle.paddingTop, 10) || 0;
+ res.paddingBottom = parseInt(computedStyle.paddingBottom, 10) || 0;
+ }
+ return res;
+ }
+ function computeInnerRect(el, goWithinPadding, doFromWindowViewport) {
+ if (goWithinPadding === void 0) { goWithinPadding = false; }
+ var outerRect = doFromWindowViewport ? el.getBoundingClientRect() : computeRect(el);
+ var edges = computeEdges(el, goWithinPadding);
+ var res = {
+ left: outerRect.left + edges.borderLeft + edges.scrollbarLeft,
+ right: outerRect.right - edges.borderRight - edges.scrollbarRight,
+ top: outerRect.top + edges.borderTop,
+ bottom: outerRect.bottom - edges.borderBottom - edges.scrollbarBottom,
+ };
+ if (goWithinPadding) {
+ res.left += edges.paddingLeft;
+ res.right -= edges.paddingRight;
+ res.top += edges.paddingTop;
+ res.bottom -= edges.paddingBottom;
+ }
+ return res;
+ }
+ function computeRect(el) {
+ var rect = el.getBoundingClientRect();
+ return {
+ left: rect.left + window.pageXOffset,
+ top: rect.top + window.pageYOffset,
+ right: rect.right + window.pageXOffset,
+ bottom: rect.bottom + window.pageYOffset,
+ };
+ }
+ function computeClippedClientRect(el) {
+ var clippingParents = getClippingParents(el);
+ var rect = el.getBoundingClientRect();
+ for (var _i = 0, clippingParents_1 = clippingParents; _i < clippingParents_1.length; _i++) {
+ var clippingParent = clippingParents_1[_i];
+ var intersection = intersectRects(rect, clippingParent.getBoundingClientRect());
+ if (intersection) {
+ rect = intersection;
+ }
+ else {
+ return null;
+ }
+ }
+ return rect;
+ }
+ function computeHeightAndMargins(el) {
+ return el.getBoundingClientRect().height + computeVMargins(el);
+ }
+ function computeVMargins(el) {
+ var computed = window.getComputedStyle(el);
+ return parseInt(computed.marginTop, 10) +
+ parseInt(computed.marginBottom, 10);
+ }
+ // does not return window
+ function getClippingParents(el) {
+ var parents = [];
+ while (el instanceof HTMLElement) { // will stop when gets to document or null
+ var computedStyle = window.getComputedStyle(el);
+ if (computedStyle.position === 'fixed') {
+ break;
+ }
+ if ((/(auto|scroll)/).test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) {
+ parents.push(el);
+ }
+ el = el.parentNode;
+ }
+ return parents;
+ }
+
+ // given a function that resolves a result asynchronously.
+ // the function can either call passed-in success and failure callbacks,
+ // or it can return a promise.
+ // if you need to pass additional params to func, bind them first.
+ function unpromisify(func, success, failure) {
+ // guard against success/failure callbacks being called more than once
+ // and guard against a promise AND callback being used together.
+ var isResolved = false;
+ var wrappedSuccess = function () {
+ if (!isResolved) {
+ isResolved = true;
+ success.apply(this, arguments); // eslint-disable-line prefer-rest-params
+ }
+ };
+ var wrappedFailure = function () {
+ if (!isResolved) {
+ isResolved = true;
+ if (failure) {
+ failure.apply(this, arguments); // eslint-disable-line prefer-rest-params
+ }
+ }
+ };
+ var res = func(wrappedSuccess, wrappedFailure);
+ if (res && typeof res.then === 'function') {
+ res.then(wrappedSuccess, wrappedFailure);
+ }
+ }
+
+ var Emitter = /** @class */ (function () {
+ function Emitter() {
+ this.handlers = {};
+ this.thisContext = null;
+ }
+ Emitter.prototype.setThisContext = function (thisContext) {
+ this.thisContext = thisContext;
+ };
+ Emitter.prototype.setOptions = function (options) {
+ this.options = options;
+ };
+ Emitter.prototype.on = function (type, handler) {
+ addToHash(this.handlers, type, handler);
+ };
+ Emitter.prototype.off = function (type, handler) {
+ removeFromHash(this.handlers, type, handler);
+ };
+ Emitter.prototype.trigger = function (type) {
+ var args = [];
+ for (var _i = 1; _i < arguments.length; _i++) {
+ args[_i - 1] = arguments[_i];
+ }
+ var attachedHandlers = this.handlers[type] || [];
+ var optionHandler = this.options && this.options[type];
+ var handlers = [].concat(optionHandler || [], attachedHandlers);
+ for (var _a = 0, handlers_1 = handlers; _a < handlers_1.length; _a++) {
+ var handler = handlers_1[_a];
+ handler.apply(this.thisContext, args);
+ }
+ };
+ Emitter.prototype.hasHandlers = function (type) {
+ return Boolean((this.handlers[type] && this.handlers[type].length) ||
+ (this.options && this.options[type]));
+ };
+ return Emitter;
+ }());
+ function addToHash(hash, type, handler) {
+ (hash[type] || (hash[type] = []))
+ .push(handler);
+ }
+ function removeFromHash(hash, type, handler) {
+ if (handler) {
+ if (hash[type]) {
+ hash[type] = hash[type].filter(function (func) { return func !== handler; });
+ }
+ }
+ else {
+ delete hash[type]; // remove all handler funcs for this type
+ }
+ }
+
+ /*
+ Records offset information for a set of elements, relative to an origin element.
+ Can record the left/right OR the top/bottom OR both.
+ Provides methods for querying the cache by position.
+ */
+ var PositionCache = /** @class */ (function () {
+ function PositionCache(originEl, els, isHorizontal, isVertical) {
+ this.els = els;
+ var originClientRect = this.originClientRect = originEl.getBoundingClientRect(); // relative to viewport top-left
+ if (isHorizontal) {
+ this.buildElHorizontals(originClientRect.left);
+ }
+ if (isVertical) {
+ this.buildElVerticals(originClientRect.top);
+ }
+ }
+ // Populates the left/right internal coordinate arrays
+ PositionCache.prototype.buildElHorizontals = function (originClientLeft) {
+ var lefts = [];
+ var rights = [];
+ for (var _i = 0, _a = this.els; _i < _a.length; _i++) {
+ var el = _a[_i];
+ var rect = el.getBoundingClientRect();
+ lefts.push(rect.left - originClientLeft);
+ rights.push(rect.right - originClientLeft);
+ }
+ this.lefts = lefts;
+ this.rights = rights;
+ };
+ // Populates the top/bottom internal coordinate arrays
+ PositionCache.prototype.buildElVerticals = function (originClientTop) {
+ var tops = [];
+ var bottoms = [];
+ for (var _i = 0, _a = this.els; _i < _a.length; _i++) {
+ var el = _a[_i];
+ var rect = el.getBoundingClientRect();
+ tops.push(rect.top - originClientTop);
+ bottoms.push(rect.bottom - originClientTop);
+ }
+ this.tops = tops;
+ this.bottoms = bottoms;
+ };
+ // Given a left offset (from document left), returns the index of the el that it horizontally intersects.
+ // If no intersection is made, returns undefined.
+ PositionCache.prototype.leftToIndex = function (leftPosition) {
+ var _a = this, lefts = _a.lefts, rights = _a.rights;
+ var len = lefts.length;
+ var i;
+ for (i = 0; i < len; i += 1) {
+ if (leftPosition >= lefts[i] && leftPosition < rights[i]) {
+ return i;
+ }
+ }
+ return undefined; // TODO: better
+ };
+ // Given a top offset (from document top), returns the index of the el that it vertically intersects.
+ // If no intersection is made, returns undefined.
+ PositionCache.prototype.topToIndex = function (topPosition) {
+ var _a = this, tops = _a.tops, bottoms = _a.bottoms;
+ var len = tops.length;
+ var i;
+ for (i = 0; i < len; i += 1) {
+ if (topPosition >= tops[i] && topPosition < bottoms[i]) {
+ return i;
+ }
+ }
+ return undefined; // TODO: better
+ };
+ // Gets the width of the element at the given index
+ PositionCache.prototype.getWidth = function (leftIndex) {
+ return this.rights[leftIndex] - this.lefts[leftIndex];
+ };
+ // Gets the height of the element at the given index
+ PositionCache.prototype.getHeight = function (topIndex) {
+ return this.bottoms[topIndex] - this.tops[topIndex];
+ };
+ return PositionCache;
+ }());
+
+ /* eslint max-classes-per-file: "off" */
+ /*
+ An object for getting/setting scroll-related information for an element.
+ Internally, this is done very differently for window versus DOM element,
+ so this object serves as a common interface.
+ */
+ var ScrollController = /** @class */ (function () {
+ function ScrollController() {
+ }
+ ScrollController.prototype.getMaxScrollTop = function () {
+ return this.getScrollHeight() - this.getClientHeight();
+ };
+ ScrollController.prototype.getMaxScrollLeft = function () {
+ return this.getScrollWidth() - this.getClientWidth();
+ };
+ ScrollController.prototype.canScrollVertically = function () {
+ return this.getMaxScrollTop() > 0;
+ };
+ ScrollController.prototype.canScrollHorizontally = function () {
+ return this.getMaxScrollLeft() > 0;
+ };
+ ScrollController.prototype.canScrollUp = function () {
+ return this.getScrollTop() > 0;
+ };
+ ScrollController.prototype.canScrollDown = function () {
+ return this.getScrollTop() < this.getMaxScrollTop();
+ };
+ ScrollController.prototype.canScrollLeft = function () {
+ return this.getScrollLeft() > 0;
+ };
+ ScrollController.prototype.canScrollRight = function () {
+ return this.getScrollLeft() < this.getMaxScrollLeft();
+ };
+ return ScrollController;
+ }());
+ var ElementScrollController = /** @class */ (function (_super) {
+ __extends(ElementScrollController, _super);
+ function ElementScrollController(el) {
+ var _this = _super.call(this) || this;
+ _this.el = el;
+ return _this;
+ }
+ ElementScrollController.prototype.getScrollTop = function () {
+ return this.el.scrollTop;
+ };
+ ElementScrollController.prototype.getScrollLeft = function () {
+ return this.el.scrollLeft;
+ };
+ ElementScrollController.prototype.setScrollTop = function (top) {
+ this.el.scrollTop = top;
+ };
+ ElementScrollController.prototype.setScrollLeft = function (left) {
+ this.el.scrollLeft = left;
+ };
+ ElementScrollController.prototype.getScrollWidth = function () {
+ return this.el.scrollWidth;
+ };
+ ElementScrollController.prototype.getScrollHeight = function () {
+ return this.el.scrollHeight;
+ };
+ ElementScrollController.prototype.getClientHeight = function () {
+ return this.el.clientHeight;
+ };
+ ElementScrollController.prototype.getClientWidth = function () {
+ return this.el.clientWidth;
+ };
+ return ElementScrollController;
+ }(ScrollController));
+ var WindowScrollController = /** @class */ (function (_super) {
+ __extends(WindowScrollController, _super);
+ function WindowScrollController() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ WindowScrollController.prototype.getScrollTop = function () {
+ return window.pageYOffset;
+ };
+ WindowScrollController.prototype.getScrollLeft = function () {
+ return window.pageXOffset;
+ };
+ WindowScrollController.prototype.setScrollTop = function (n) {
+ window.scroll(window.pageXOffset, n);
+ };
+ WindowScrollController.prototype.setScrollLeft = function (n) {
+ window.scroll(n, window.pageYOffset);
+ };
+ WindowScrollController.prototype.getScrollWidth = function () {
+ return document.documentElement.scrollWidth;
+ };
+ WindowScrollController.prototype.getScrollHeight = function () {
+ return document.documentElement.scrollHeight;
+ };
+ WindowScrollController.prototype.getClientHeight = function () {
+ return document.documentElement.clientHeight;
+ };
+ WindowScrollController.prototype.getClientWidth = function () {
+ return document.documentElement.clientWidth;
+ };
+ return WindowScrollController;
+ }(ScrollController));
+
+ var Theme = /** @class */ (function () {
+ function Theme(calendarOptions) {
+ if (this.iconOverrideOption) {
+ this.setIconOverride(calendarOptions[this.iconOverrideOption]);
+ }
+ }
+ Theme.prototype.setIconOverride = function (iconOverrideHash) {
+ var iconClassesCopy;
+ var buttonName;
+ if (typeof iconOverrideHash === 'object' && iconOverrideHash) { // non-null object
+ iconClassesCopy = __assign({}, this.iconClasses);
+ for (buttonName in iconOverrideHash) {
+ iconClassesCopy[buttonName] = this.applyIconOverridePrefix(iconOverrideHash[buttonName]);
+ }
+ this.iconClasses = iconClassesCopy;
+ }
+ else if (iconOverrideHash === false) {
+ this.iconClasses = {};
+ }
+ };
+ Theme.prototype.applyIconOverridePrefix = function (className) {
+ var prefix = this.iconOverridePrefix;
+ if (prefix && className.indexOf(prefix) !== 0) { // if not already present
+ className = prefix + className;
+ }
+ return className;
+ };
+ Theme.prototype.getClass = function (key) {
+ return this.classes[key] || '';
+ };
+ Theme.prototype.getIconClass = function (buttonName, isRtl) {
+ var className;
+ if (isRtl && this.rtlIconClasses) {
+ className = this.rtlIconClasses[buttonName] || this.iconClasses[buttonName];
+ }
+ else {
+ className = this.iconClasses[buttonName];
+ }
+ if (className) {
+ return this.baseIconClass + " " + className;
+ }
+ return '';
+ };
+ Theme.prototype.getCustomButtonIconClass = function (customButtonProps) {
+ var className;
+ if (this.iconOverrideCustomButtonOption) {
+ className = customButtonProps[this.iconOverrideCustomButtonOption];
+ if (className) {
+ return this.baseIconClass + " " + this.applyIconOverridePrefix(className);
+ }
+ }
+ return '';
+ };
+ return Theme;
+ }());
+ Theme.prototype.classes = {};
+ Theme.prototype.iconClasses = {};
+ Theme.prototype.baseIconClass = '';
+ Theme.prototype.iconOverridePrefix = '';
+
+ /// elements work best with integers. round up to ensure contents fits
+ }
+ function getSectionHasLiquidHeight(props, sectionConfig) {
+ return props.liquid && sectionConfig.liquid; // does the section do liquid-height? (need to have whole scrollgrid liquid-height as well)
+ }
+ function getAllowYScrolling(props, sectionConfig) {
+ return sectionConfig.maxHeight != null || // if its possible for the height to max out, we might need scrollbars
+ getSectionHasLiquidHeight(props, sectionConfig); // if the section is liquid height, it might condense enough to require scrollbars
+ }
+ // TODO: ONLY use `arg`. force out internal function to use same API
+ function renderChunkContent(sectionConfig, chunkConfig, arg, isHeader) {
+ var expandRows = arg.expandRows;
+ var content = typeof chunkConfig.content === 'function' ?
+ chunkConfig.content(arg) :
+ createElement('table', {
+ role: 'presentation',
+ className: [
+ chunkConfig.tableClassName,
+ sectionConfig.syncRowHeights ? 'fc-scrollgrid-sync-table' : '',
+ ].join(' '),
+ style: {
+ minWidth: arg.tableMinWidth,
+ width: arg.clientWidth,
+ height: expandRows ? arg.clientHeight : '', // css `height` on a
serves as a min-height
+ },
+ }, arg.tableColGroupNode, createElement(isHeader ? 'thead' : 'tbody', {
+ role: 'presentation',
+ }, typeof chunkConfig.rowContent === 'function'
+ ? chunkConfig.rowContent(arg)
+ : chunkConfig.rowContent));
+ return content;
+ }
+ function isColPropsEqual(cols0, cols1) {
+ return isArraysEqual(cols0, cols1, isPropsEqual);
+ }
+ function renderMicroColGroup(cols, shrinkWidth) {
+ var colNodes = [];
+ /*
+ for ColProps with spans, it would have been great to make a single
",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);var t=0/ elements with colspans.
+ SOLUTION: making individual
+ _this.frameElRefs = new RefMap(); // the fc-daygrid-day-frame
+ _this.fgElRefs = new RefMap(); // the fc-daygrid-day-events
+ _this.segHarnessRefs = new RefMap(); // indexed by "instanceId:firstCol"
+ _this.rootElRef = createRef();
+ _this.state = {
+ framePositions: null,
+ maxContentHeight: null,
+ eventInstanceHeights: {},
+ };
+ return _this;
+ }
+ TableRow.prototype.render = function () {
+ var _this = this;
+ var _a = this, props = _a.props, state = _a.state, context = _a.context;
+ var options = context.options;
+ var colCnt = props.cells.length;
+ var businessHoursByCol = splitSegsByFirstCol(props.businessHourSegs, colCnt);
+ var bgEventSegsByCol = splitSegsByFirstCol(props.bgEventSegs, colCnt);
+ var highlightSegsByCol = splitSegsByFirstCol(this.getHighlightSegs(), colCnt);
+ var mirrorSegsByCol = splitSegsByFirstCol(this.getMirrorSegs(), colCnt);
+ var _b = computeFgSegPlacement(sortEventSegs(props.fgEventSegs, options.eventOrder), props.dayMaxEvents, props.dayMaxEventRows, options.eventOrderStrict, state.eventInstanceHeights, state.maxContentHeight, props.cells), singleColPlacements = _b.singleColPlacements, multiColPlacements = _b.multiColPlacements, moreCnts = _b.moreCnts, moreMarginTops = _b.moreMarginTops;
+ var isForcedInvisible = // TODO: messy way to compute this
+ (props.eventDrag && props.eventDrag.affectedInstances) ||
+ (props.eventResize && props.eventResize.affectedInstances) ||
+ {};
+ return (createElement("tr", { ref: this.rootElRef, role: "row" },
+ props.renderIntro && props.renderIntro(),
+ props.cells.map(function (cell, col) {
+ var normalFgNodes = _this.renderFgSegs(col, props.forPrint ? singleColPlacements[col] : multiColPlacements[col], props.todayRange, isForcedInvisible);
+ var mirrorFgNodes = _this.renderFgSegs(col, buildMirrorPlacements(mirrorSegsByCol[col], multiColPlacements), props.todayRange, {}, Boolean(props.eventDrag), Boolean(props.eventResize), false);
+ return (createElement(TableCell, { key: cell.key, elRef: _this.cellElRefs.createRef(cell.key), innerElRef: _this.frameElRefs.createRef(cell.key) /* FF problem, but okay to use for left/right. TODO: rename prop */, dateProfile: props.dateProfile, date: cell.date, showDayNumber: props.showDayNumbers, showWeekNumber: props.showWeekNumbers && col === 0, forceDayTop: props.showWeekNumbers /* even displaying weeknum for row, not necessarily day */, todayRange: props.todayRange, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, extraHookProps: cell.extraHookProps, extraDataAttrs: cell.extraDataAttrs, extraClassNames: cell.extraClassNames, extraDateSpan: cell.extraDateSpan, moreCnt: moreCnts[col], moreMarginTop: moreMarginTops[col], singlePlacements: singleColPlacements[col], fgContentElRef: _this.fgElRefs.createRef(cell.key), fgContent: ( // Fragment scopes the keys
+ createElement(Fragment, null,
+ createElement(Fragment, null, normalFgNodes),
+ createElement(Fragment, null, mirrorFgNodes))), bgContent: ( // Fragment scopes the keys
+ createElement(Fragment, null,
+ _this.renderFillSegs(highlightSegsByCol[col], 'highlight'),
+ _this.renderFillSegs(businessHoursByCol[col], 'non-business'),
+ _this.renderFillSegs(bgEventSegsByCol[col], 'bg-event'))) }));
+ })));
+ };
+ TableRow.prototype.componentDidMount = function () {
+ this.updateSizing(true);
+ };
+ TableRow.prototype.componentDidUpdate = function (prevProps, prevState) {
+ var currentProps = this.props;
+ this.updateSizing(!isPropsEqual(prevProps, currentProps));
+ };
+ TableRow.prototype.getHighlightSegs = function () {
+ var props = this.props;
+ if (props.eventDrag && props.eventDrag.segs.length) { // messy check
+ return props.eventDrag.segs;
+ }
+ if (props.eventResize && props.eventResize.segs.length) { // messy check
+ return props.eventResize.segs;
+ }
+ return props.dateSelectionSegs;
+ };
+ TableRow.prototype.getMirrorSegs = function () {
+ var props = this.props;
+ if (props.eventResize && props.eventResize.segs.length) { // messy check
+ return props.eventResize.segs;
+ }
+ return [];
+ };
+ TableRow.prototype.renderFgSegs = function (col, segPlacements, todayRange, isForcedInvisible, isDragging, isResizing, isDateSelecting) {
+ var context = this.context;
+ var eventSelection = this.props.eventSelection;
+ var framePositions = this.state.framePositions;
+ var defaultDisplayEventEnd = this.props.cells.length === 1; // colCnt === 1
+ var isMirror = isDragging || isResizing || isDateSelecting;
+ var nodes = [];
+ if (framePositions) {
+ for (var _i = 0, segPlacements_1 = segPlacements; _i < segPlacements_1.length; _i++) {
+ var placement = segPlacements_1[_i];
+ var seg = placement.seg;
+ var instanceId = seg.eventRange.instance.instanceId;
+ var key = instanceId + ':' + col;
+ var isVisible = placement.isVisible && !isForcedInvisible[instanceId];
+ var isAbsolute = placement.isAbsolute;
+ var left = '';
+ var right = '';
+ if (isAbsolute) {
+ if (context.isRtl) {
+ right = 0;
+ left = framePositions.lefts[seg.lastCol] - framePositions.lefts[seg.firstCol];
+ }
+ else {
+ left = 0;
+ right = framePositions.rights[seg.firstCol] - framePositions.rights[seg.lastCol];
+ }
+ }
+ /*
+ known bug: events that are force to be list-item but span multiple days still take up space in later columns
+ todo: in print view, for multi-day events, don't display title within non-start/end segs
+ */
+ nodes.push(createElement("div", { className: 'fc-daygrid-event-harness' + (isAbsolute ? ' fc-daygrid-event-harness-abs' : ''), key: key, ref: isMirror ? null : this.segHarnessRefs.createRef(key), style: {
+ visibility: isVisible ? '' : 'hidden',
+ marginTop: isAbsolute ? '' : placement.marginTop,
+ top: isAbsolute ? placement.absoluteTop : '',
+ left: left,
+ right: right,
+ } }, hasListItemDisplay(seg) ? (createElement(TableListItemEvent, __assign({ seg: seg, isDragging: isDragging, isSelected: instanceId === eventSelection, defaultDisplayEventEnd: defaultDisplayEventEnd }, getSegMeta(seg, todayRange)))) : (createElement(TableBlockEvent, __assign({ seg: seg, isDragging: isDragging, isResizing: isResizing, isDateSelecting: isDateSelecting, isSelected: instanceId === eventSelection, defaultDisplayEventEnd: defaultDisplayEventEnd }, getSegMeta(seg, todayRange))))));
+ }
+ }
+ return nodes;
+ };
+ TableRow.prototype.renderFillSegs = function (segs, fillType) {
+ var isRtl = this.context.isRtl;
+ var todayRange = this.props.todayRange;
+ var framePositions = this.state.framePositions;
+ var nodes = [];
+ if (framePositions) {
+ for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {
+ var seg = segs_1[_i];
+ var leftRightCss = isRtl ? {
+ right: 0,
+ left: framePositions.lefts[seg.lastCol] - framePositions.lefts[seg.firstCol],
+ } : {
+ left: 0,
+ right: framePositions.rights[seg.firstCol] - framePositions.rights[seg.lastCol],
+ };
+ nodes.push(createElement("div", { key: buildEventRangeKey(seg.eventRange), className: "fc-daygrid-bg-harness", style: leftRightCss }, fillType === 'bg-event' ?
+ createElement(BgEvent, __assign({ seg: seg }, getSegMeta(seg, todayRange))) :
+ renderFill(fillType)));
+ }
+ }
+ return createElement.apply(void 0, __spreadArray([Fragment, {}], nodes));
+ };
+ TableRow.prototype.updateSizing = function (isExternalSizingChange) {
+ var _a = this, props = _a.props, frameElRefs = _a.frameElRefs;
+ if (!props.forPrint &&
+ props.clientWidth !== null // positioning ready?
+ ) {
+ if (isExternalSizingChange) {
+ var frameEls = props.cells.map(function (cell) { return frameElRefs.currentMap[cell.key]; });
+ if (frameEls.length) {
+ var originEl = this.rootElRef.current;
+ this.setState({
+ framePositions: new PositionCache(originEl, frameEls, true, // isHorizontal
+ false),
+ });
+ }
+ }
+ var oldInstanceHeights = this.state.eventInstanceHeights;
+ var newInstanceHeights = this.queryEventInstanceHeights();
+ var limitByContentHeight = props.dayMaxEvents === true || props.dayMaxEventRows === true;
+ this.setState({
+ // HACK to prevent oscillations of events being shown/hidden from max-event-rows
+ // Essentially, once you compute an element's height, never null-out.
+ // TODO: always display all events, as visibility:hidden?
+ eventInstanceHeights: __assign(__assign({}, oldInstanceHeights), newInstanceHeights),
+ maxContentHeight: limitByContentHeight ? this.computeMaxContentHeight() : null,
+ });
+ }
+ };
+ TableRow.prototype.queryEventInstanceHeights = function () {
+ var segElMap = this.segHarnessRefs.currentMap;
+ var eventInstanceHeights = {};
+ // get the max height amongst instance segs
+ for (var key in segElMap) {
+ var height = Math.round(segElMap[key].getBoundingClientRect().height);
+ var instanceId = key.split(':')[0]; // deconstruct how renderFgSegs makes the key
+ eventInstanceHeights[instanceId] = Math.max(eventInstanceHeights[instanceId] || 0, height);
+ }
+ return eventInstanceHeights;
+ };
+ TableRow.prototype.computeMaxContentHeight = function () {
+ var firstKey = this.props.cells[0].key;
+ var cellEl = this.cellElRefs.currentMap[firstKey];
+ var fcContainerEl = this.fgElRefs.currentMap[firstKey];
+ return cellEl.getBoundingClientRect().bottom - fcContainerEl.getBoundingClientRect().top;
+ };
+ TableRow.prototype.getCellEls = function () {
+ var elMap = this.cellElRefs.currentMap;
+ return this.props.cells.map(function (cell) { return elMap[cell.key]; });
+ };
+ return TableRow;
+ }(DateComponent));
+ TableRow.addStateEquality({
+ eventInstanceHeights: isPropsEqual,
+ });
+ function buildMirrorPlacements(mirrorSegs, colPlacements) {
+ if (!mirrorSegs.length) {
+ return [];
+ }
+ var topsByInstanceId = buildAbsoluteTopHash(colPlacements); // TODO: cache this at first render?
+ return mirrorSegs.map(function (seg) { return ({
+ seg: seg,
+ isVisible: true,
+ isAbsolute: true,
+ absoluteTop: topsByInstanceId[seg.eventRange.instance.instanceId],
+ marginTop: 0,
+ }); });
+ }
+ function buildAbsoluteTopHash(colPlacements) {
+ var topsByInstanceId = {};
+ for (var _i = 0, colPlacements_1 = colPlacements; _i < colPlacements_1.length; _i++) {
+ var placements = colPlacements_1[_i];
+ for (var _a = 0, placements_1 = placements; _a < placements_1.length; _a++) {
+ var placement = placements_1[_a];
+ topsByInstanceId[placement.seg.eventRange.instance.instanceId] = placement.absoluteTop;
+ }
+ }
+ return topsByInstanceId;
+ }
+
+ var Table = /** @class */ (function (_super) {
+ __extends(Table, _super);
+ function Table() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.splitBusinessHourSegs = memoize(splitSegsByRow);
+ _this.splitBgEventSegs = memoize(splitSegsByRow);
+ _this.splitFgEventSegs = memoize(splitSegsByRow);
+ _this.splitDateSelectionSegs = memoize(splitSegsByRow);
+ _this.splitEventDrag = memoize(splitInteractionByRow);
+ _this.splitEventResize = memoize(splitInteractionByRow);
+ _this.rowRefs = new RefMap();
+ _this.handleRootEl = function (rootEl) {
+ _this.rootEl = rootEl;
+ if (rootEl) {
+ _this.context.registerInteractiveComponent(_this, {
+ el: rootEl,
+ isHitComboAllowed: _this.props.isHitComboAllowed,
+ });
+ }
+ else {
+ _this.context.unregisterInteractiveComponent(_this);
+ }
+ };
+ return _this;
+ }
+ Table.prototype.render = function () {
+ var _this = this;
+ var props = this.props;
+ var dateProfile = props.dateProfile, dayMaxEventRows = props.dayMaxEventRows, dayMaxEvents = props.dayMaxEvents, expandRows = props.expandRows;
+ var rowCnt = props.cells.length;
+ var businessHourSegsByRow = this.splitBusinessHourSegs(props.businessHourSegs, rowCnt);
+ var bgEventSegsByRow = this.splitBgEventSegs(props.bgEventSegs, rowCnt);
+ var fgEventSegsByRow = this.splitFgEventSegs(props.fgEventSegs, rowCnt);
+ var dateSelectionSegsByRow = this.splitDateSelectionSegs(props.dateSelectionSegs, rowCnt);
+ var eventDragByRow = this.splitEventDrag(props.eventDrag, rowCnt);
+ var eventResizeByRow = this.splitEventResize(props.eventResize, rowCnt);
+ var limitViaBalanced = dayMaxEvents === true || dayMaxEventRows === true;
+ // if rows can't expand to fill fixed height, can't do balanced-height event limit
+ // TODO: best place to normalize these options?
+ if (limitViaBalanced && !expandRows) {
+ limitViaBalanced = false;
+ dayMaxEventRows = null;
+ dayMaxEvents = null;
+ }
+ var classNames = [
+ 'fc-daygrid-body',
+ limitViaBalanced ? 'fc-daygrid-body-balanced' : 'fc-daygrid-body-unbalanced',
+ expandRows ? '' : 'fc-daygrid-body-natural', // will height of one row depend on the others?
+ ];
+ return (createElement("div", { className: classNames.join(' '), ref: this.handleRootEl, style: {
+ // these props are important to give this wrapper correct dimensions for interactions
+ // TODO: if we set it here, can we avoid giving to inner tables?
+ width: props.clientWidth,
+ minWidth: props.tableMinWidth,
+ } },
+ createElement(NowTimer, { unit: "day" }, function (nowDate, todayRange) { return (createElement(Fragment, null,
+ createElement("table", { role: "presentation", className: "fc-scrollgrid-sync-table", style: {
+ width: props.clientWidth,
+ minWidth: props.tableMinWidth,
+ height: expandRows ? props.clientHeight : '',
+ } },
+ props.colGroupNode,
+ createElement("tbody", { role: "presentation" }, props.cells.map(function (cells, row) { return (createElement(TableRow, { ref: _this.rowRefs.createRef(row), key: cells.length
+ ? cells[0].date.toISOString() /* best? or put key on cell? or use diff formatter? */
+ : row // in case there are no cells (like when resource view is loading)
+ , showDayNumbers: rowCnt > 1, showWeekNumbers: props.showWeekNumbers, todayRange: todayRange, dateProfile: dateProfile, cells: cells, renderIntro: props.renderRowIntro, businessHourSegs: businessHourSegsByRow[row], eventSelection: props.eventSelection, bgEventSegs: bgEventSegsByRow[row].filter(isSegAllDay) /* hack */, fgEventSegs: fgEventSegsByRow[row], dateSelectionSegs: dateSelectionSegsByRow[row], eventDrag: eventDragByRow[row], eventResize: eventResizeByRow[row], dayMaxEvents: dayMaxEvents, dayMaxEventRows: dayMaxEventRows, clientWidth: props.clientWidth, clientHeight: props.clientHeight, forPrint: props.forPrint })); }))))); })));
+ };
+ // Hit System
+ // ----------------------------------------------------------------------------------------------------
+ Table.prototype.prepareHits = function () {
+ this.rowPositions = new PositionCache(this.rootEl, this.rowRefs.collect().map(function (rowObj) { return rowObj.getCellEls()[0]; }), // first cell el in each row. TODO: not optimal
+ false, true);
+ this.colPositions = new PositionCache(this.rootEl, this.rowRefs.currentMap[0].getCellEls(), // cell els in first row
+ true, // horizontal
+ false);
+ };
+ Table.prototype.queryHit = function (positionLeft, positionTop) {
+ var _a = this, colPositions = _a.colPositions, rowPositions = _a.rowPositions;
+ var col = colPositions.leftToIndex(positionLeft);
+ var row = rowPositions.topToIndex(positionTop);
+ if (row != null && col != null) {
+ var cell = this.props.cells[row][col];
+ return {
+ dateProfile: this.props.dateProfile,
+ dateSpan: __assign({ range: this.getCellRange(row, col), allDay: true }, cell.extraDateSpan),
+ dayEl: this.getCellEl(row, col),
+ rect: {
+ left: colPositions.lefts[col],
+ right: colPositions.rights[col],
+ top: rowPositions.tops[row],
+ bottom: rowPositions.bottoms[row],
+ },
+ layer: 0,
+ };
+ }
+ return null;
+ };
+ Table.prototype.getCellEl = function (row, col) {
+ return this.rowRefs.currentMap[row].getCellEls()[col]; // TODO: not optimal
+ };
+ Table.prototype.getCellRange = function (row, col) {
+ var start = this.props.cells[row][col].date;
+ var end = addDays(start, 1);
+ return { start: start, end: end };
+ };
+ return Table;
+ }(DateComponent));
+ function isSegAllDay(seg) {
+ return seg.eventRange.def.allDay;
+ }
+
+ var DayTableSlicer = /** @class */ (function (_super) {
+ __extends(DayTableSlicer, _super);
+ function DayTableSlicer() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.forceDayIfListItem = true;
+ return _this;
+ }
+ DayTableSlicer.prototype.sliceRange = function (dateRange, dayTableModel) {
+ return dayTableModel.sliceRange(dateRange);
+ };
+ return DayTableSlicer;
+ }(Slicer));
+
+ var DayTable = /** @class */ (function (_super) {
+ __extends(DayTable, _super);
+ function DayTable() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.slicer = new DayTableSlicer();
+ _this.tableRef = createRef();
+ return _this;
+ }
+ DayTable.prototype.render = function () {
+ var _a = this, props = _a.props, context = _a.context;
+ return (createElement(Table, __assign({ ref: this.tableRef }, this.slicer.sliceProps(props, props.dateProfile, props.nextDayThreshold, context, props.dayTableModel), { dateProfile: props.dateProfile, cells: props.dayTableModel.cells, colGroupNode: props.colGroupNode, tableMinWidth: props.tableMinWidth, renderRowIntro: props.renderRowIntro, dayMaxEvents: props.dayMaxEvents, dayMaxEventRows: props.dayMaxEventRows, showWeekNumbers: props.showWeekNumbers, expandRows: props.expandRows, headerAlignElRef: props.headerAlignElRef, clientWidth: props.clientWidth, clientHeight: props.clientHeight, forPrint: props.forPrint })));
+ };
+ return DayTable;
+ }(DateComponent));
+
+ var DayTableView = /** @class */ (function (_super) {
+ __extends(DayTableView, _super);
+ function DayTableView() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.buildDayTableModel = memoize(buildDayTableModel);
+ _this.headerRef = createRef();
+ _this.tableRef = createRef();
+ return _this;
+ }
+ DayTableView.prototype.render = function () {
+ var _this = this;
+ var _a = this.context, options = _a.options, dateProfileGenerator = _a.dateProfileGenerator;
+ var props = this.props;
+ var dayTableModel = this.buildDayTableModel(props.dateProfile, dateProfileGenerator);
+ var headerContent = options.dayHeaders && (createElement(DayHeader, { ref: this.headerRef, dateProfile: props.dateProfile, dates: dayTableModel.headerDates, datesRepDistinctDays: dayTableModel.rowCnt === 1 }));
+ var bodyContent = function (contentArg) { return (createElement(DayTable, { ref: _this.tableRef, dateProfile: props.dateProfile, dayTableModel: dayTableModel, businessHours: props.businessHours, dateSelection: props.dateSelection, eventStore: props.eventStore, eventUiBases: props.eventUiBases, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, nextDayThreshold: options.nextDayThreshold, colGroupNode: contentArg.tableColGroupNode, tableMinWidth: contentArg.tableMinWidth, dayMaxEvents: options.dayMaxEvents, dayMaxEventRows: options.dayMaxEventRows, showWeekNumbers: options.weekNumbers, expandRows: !props.isHeightAuto, headerAlignElRef: _this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint })); };
+ return options.dayMinWidth
+ ? this.renderHScrollLayout(headerContent, bodyContent, dayTableModel.colCnt, options.dayMinWidth)
+ : this.renderSimpleLayout(headerContent, bodyContent);
+ };
+ return DayTableView;
+ }(TableView));
+ function buildDayTableModel(dateProfile, dateProfileGenerator) {
+ var daySeries = new DaySeriesModel(dateProfile.renderRange, dateProfileGenerator);
+ return new DayTableModel(daySeries, /year|month|week/.test(dateProfile.currentRangeUnit));
+ }
+
+ var TableDateProfileGenerator = /** @class */ (function (_super) {
+ __extends(TableDateProfileGenerator, _super);
+ function TableDateProfileGenerator() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ // Computes the date range that will be rendered.
+ TableDateProfileGenerator.prototype.buildRenderRange = function (currentRange, currentRangeUnit, isRangeAllDay) {
+ var dateEnv = this.props.dateEnv;
+ var renderRange = _super.prototype.buildRenderRange.call(this, currentRange, currentRangeUnit, isRangeAllDay);
+ var start = renderRange.start;
+ var end = renderRange.end;
+ var endOfWeek;
+ // year and month views should be aligned with weeks. this is already done for week
+ if (/^(year|month)$/.test(currentRangeUnit)) {
+ start = dateEnv.startOfWeek(start);
+ // make end-of-week if not already
+ endOfWeek = dateEnv.startOfWeek(end);
+ if (endOfWeek.valueOf() !== end.valueOf()) {
+ end = addWeeks(endOfWeek, 1);
+ }
+ }
+ // ensure 6 weeks
+ if (this.props.monthMode &&
+ this.props.fixedWeekCount) {
+ var rowCnt = Math.ceil(// could be partial weeks due to hiddenDays
+ diffWeeks(start, end));
+ end = addWeeks(end, 6 - rowCnt);
+ }
+ return { start: start, end: end };
+ };
+ return TableDateProfileGenerator;
+ }(DateProfileGenerator));
+
+ var dayGridPlugin = createPlugin({
+ initialView: 'dayGridMonth',
+ views: {
+ dayGrid: {
+ component: DayTableView,
+ dateProfileGeneratorClass: TableDateProfileGenerator,
+ },
+ dayGridDay: {
+ type: 'dayGrid',
+ duration: { days: 1 },
+ },
+ dayGridWeek: {
+ type: 'dayGrid',
+ duration: { weeks: 1 },
+ },
+ dayGridMonth: {
+ type: 'dayGrid',
+ duration: { months: 1 },
+ monthMode: true,
+ fixedWeekCount: true,
+ },
+ },
+ });
+
+ var AllDaySplitter = /** @class */ (function (_super) {
+ __extends(AllDaySplitter, _super);
+ function AllDaySplitter() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ AllDaySplitter.prototype.getKeyInfo = function () {
+ return {
+ allDay: {},
+ timed: {},
+ };
+ };
+ AllDaySplitter.prototype.getKeysForDateSpan = function (dateSpan) {
+ if (dateSpan.allDay) {
+ return ['allDay'];
+ }
+ return ['timed'];
+ };
+ AllDaySplitter.prototype.getKeysForEventDef = function (eventDef) {
+ if (!eventDef.allDay) {
+ return ['timed'];
+ }
+ if (hasBgRendering(eventDef)) {
+ return ['timed', 'allDay'];
+ }
+ return ['allDay'];
+ };
+ return AllDaySplitter;
+ }(Splitter));
+
+ var DEFAULT_SLAT_LABEL_FORMAT = createFormatter({
+ hour: 'numeric',
+ minute: '2-digit',
+ omitZeroMinute: true,
+ meridiem: 'short',
+ });
+ function TimeColsAxisCell(props) {
+ var classNames = [
+ 'fc-timegrid-slot',
+ 'fc-timegrid-slot-label',
+ props.isLabeled ? 'fc-scrollgrid-shrink' : 'fc-timegrid-slot-minor',
+ ];
+ return (createElement(ViewContextType.Consumer, null, function (context) {
+ if (!props.isLabeled) {
+ return (createElement("td", { className: classNames.join(' '), "data-time": props.isoTimeStr }));
+ }
+ var dateEnv = context.dateEnv, options = context.options, viewApi = context.viewApi;
+ var labelFormat = // TODO: fully pre-parse
+ options.slotLabelFormat == null ? DEFAULT_SLAT_LABEL_FORMAT :
+ Array.isArray(options.slotLabelFormat) ? createFormatter(options.slotLabelFormat[0]) :
+ createFormatter(options.slotLabelFormat);
+ var hookProps = {
+ level: 0,
+ time: props.time,
+ date: dateEnv.toDate(props.date),
+ view: viewApi,
+ text: dateEnv.format(props.date, labelFormat),
+ };
+ return (createElement(RenderHook, { hookProps: hookProps, classNames: options.slotLabelClassNames, content: options.slotLabelContent, defaultContent: renderInnerContent$1, didMount: options.slotLabelDidMount, willUnmount: options.slotLabelWillUnmount }, function (rootElRef, customClassNames, innerElRef, innerContent) { return (createElement("td", { ref: rootElRef, className: classNames.concat(customClassNames).join(' '), "data-time": props.isoTimeStr },
+ createElement("div", { className: "fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame" },
+ createElement("div", { className: "fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion", ref: innerElRef }, innerContent)))); }));
+ }));
+ }
+ function renderInnerContent$1(props) {
+ return props.text;
+ }
+
+ var TimeBodyAxis = /** @class */ (function (_super) {
+ __extends(TimeBodyAxis, _super);
+ function TimeBodyAxis() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ TimeBodyAxis.prototype.render = function () {
+ return this.props.slatMetas.map(function (slatMeta) { return (createElement("tr", { key: slatMeta.key },
+ createElement(TimeColsAxisCell, __assign({}, slatMeta)))); });
+ };
+ return TimeBodyAxis;
+ }(BaseComponent));
+
+ var DEFAULT_WEEK_NUM_FORMAT = createFormatter({ week: 'short' });
+ var AUTO_ALL_DAY_MAX_EVENT_ROWS = 5;
+ var TimeColsView = /** @class */ (function (_super) {
+ __extends(TimeColsView, _super);
+ function TimeColsView() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.allDaySplitter = new AllDaySplitter(); // for use by subclasses
+ _this.headerElRef = createRef();
+ _this.rootElRef = createRef();
+ _this.scrollerElRef = createRef();
+ _this.state = {
+ slatCoords: null,
+ };
+ _this.handleScrollTopRequest = function (scrollTop) {
+ var scrollerEl = _this.scrollerElRef.current;
+ if (scrollerEl) { // TODO: not sure how this could ever be null. weirdness with the reducer
+ scrollerEl.scrollTop = scrollTop;
+ }
+ };
+ /* Header Render Methods
+ ------------------------------------------------------------------------------------------------------------------*/
+ _this.renderHeadAxis = function (rowKey, frameHeight) {
+ if (frameHeight === void 0) { frameHeight = ''; }
+ var options = _this.context.options;
+ var dateProfile = _this.props.dateProfile;
+ var range = dateProfile.renderRange;
+ var dayCnt = diffDays(range.start, range.end);
+ var navLinkAttrs = (dayCnt === 1) // only do in day views (to avoid doing in week views that dont need it)
+ ? buildNavLinkAttrs(_this.context, range.start, 'week')
+ : {};
+ if (options.weekNumbers && rowKey === 'day') {
+ return (createElement(WeekNumberRoot, { date: range.start, defaultFormat: DEFAULT_WEEK_NUM_FORMAT }, function (rootElRef, classNames, innerElRef, innerContent) { return (createElement("th", { ref: rootElRef, "aria-hidden": true, className: [
+ 'fc-timegrid-axis',
+ 'fc-scrollgrid-shrink',
+ ].concat(classNames).join(' ') },
+ createElement("div", { className: "fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid", style: { height: frameHeight } },
+ createElement("a", __assign({ ref: innerElRef, className: "fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner" }, navLinkAttrs), innerContent)))); }));
+ }
+ return (createElement("th", { "aria-hidden": true, className: "fc-timegrid-axis" },
+ createElement("div", { className: "fc-timegrid-axis-frame", style: { height: frameHeight } })));
+ };
+ /* Table Component Render Methods
+ ------------------------------------------------------------------------------------------------------------------*/
+ // only a one-way height sync. we don't send the axis inner-content height to the DayGrid,
+ // but DayGrid still needs to have classNames on inner elements in order to measure.
+ _this.renderTableRowAxis = function (rowHeight) {
+ var _a = _this.context, options = _a.options, viewApi = _a.viewApi;
+ var hookProps = {
+ text: options.allDayText,
+ view: viewApi,
+ };
+ return (
+ // TODO: make reusable hook. used in list view too
+ createElement(RenderHook, { hookProps: hookProps, classNames: options.allDayClassNames, content: options.allDayContent, defaultContent: renderAllDayInner$1, didMount: options.allDayDidMount, willUnmount: options.allDayWillUnmount }, function (rootElRef, classNames, innerElRef, innerContent) { return (createElement("td", { ref: rootElRef, "aria-hidden": true, className: [
+ 'fc-timegrid-axis',
+ 'fc-scrollgrid-shrink',
+ ].concat(classNames).join(' ') },
+ createElement("div", { className: 'fc-timegrid-axis-frame fc-scrollgrid-shrink-frame' + (rowHeight == null ? ' fc-timegrid-axis-frame-liquid' : ''), style: { height: rowHeight } },
+ createElement("span", { className: "fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner", ref: innerElRef }, innerContent)))); }));
+ };
+ _this.handleSlatCoords = function (slatCoords) {
+ _this.setState({ slatCoords: slatCoords });
+ };
+ return _this;
+ }
+ // rendering
+ // ----------------------------------------------------------------------------------------------------
+ TimeColsView.prototype.renderSimpleLayout = function (headerRowContent, allDayContent, timeContent) {
+ var _a = this, context = _a.context, props = _a.props;
+ var sections = [];
+ var stickyHeaderDates = getStickyHeaderDates(context.options);
+ if (headerRowContent) {
+ sections.push({
+ type: 'header',
+ key: 'header',
+ isSticky: stickyHeaderDates,
+ chunk: {
+ elRef: this.headerElRef,
+ tableClassName: 'fc-col-header',
+ rowContent: headerRowContent,
+ },
+ });
+ }
+ if (allDayContent) {
+ sections.push({
+ type: 'body',
+ key: 'all-day',
+ chunk: { content: allDayContent },
+ });
+ sections.push({
+ type: 'body',
+ key: 'all-day-divider',
+ outerContent: ( // TODO: rename to cellContent so don't need to define ?
+ createElement("tr", { role: "presentation", className: "fc-scrollgrid-section" },
+ createElement("td", { className: 'fc-timegrid-divider ' + context.theme.getClass('tableCellShaded') }))),
+ });
+ }
+ sections.push({
+ type: 'body',
+ key: 'body',
+ liquid: true,
+ expandRows: Boolean(context.options.expandRows),
+ chunk: {
+ scrollerElRef: this.scrollerElRef,
+ content: timeContent,
+ },
+ });
+ return (createElement(ViewRoot, { viewSpec: context.viewSpec, elRef: this.rootElRef }, function (rootElRef, classNames) { return (createElement("div", { className: ['fc-timegrid'].concat(classNames).join(' '), ref: rootElRef },
+ createElement(SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, cols: [{ width: 'shrink' }], sections: sections }))); }));
+ };
+ TimeColsView.prototype.renderHScrollLayout = function (headerRowContent, allDayContent, timeContent, colCnt, dayMinWidth, slatMetas, slatCoords) {
+ var _this = this;
+ var ScrollGrid = this.context.pluginHooks.scrollGridImpl;
+ if (!ScrollGrid) {
+ throw new Error('No ScrollGrid implementation');
+ }
+ var _a = this, context = _a.context, props = _a.props;
+ var stickyHeaderDates = !props.forPrint && getStickyHeaderDates(context.options);
+ var stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(context.options);
+ var sections = [];
+ if (headerRowContent) {
+ sections.push({
+ type: 'header',
+ key: 'header',
+ isSticky: stickyHeaderDates,
+ syncRowHeights: true,
+ chunks: [
+ {
+ key: 'axis',
+ rowContent: function (arg) { return (createElement("tr", { role: "presentation" }, _this.renderHeadAxis('day', arg.rowSyncHeights[0]))); },
+ },
+ {
+ key: 'cols',
+ elRef: this.headerElRef,
+ tableClassName: 'fc-col-header',
+ rowContent: headerRowContent,
+ },
+ ],
+ });
+ }
+ if (allDayContent) {
+ sections.push({
+ type: 'body',
+ key: 'all-day',
+ syncRowHeights: true,
+ chunks: [
+ {
+ key: 'axis',
+ rowContent: function (contentArg) { return (createElement("tr", { role: "presentation" }, _this.renderTableRowAxis(contentArg.rowSyncHeights[0]))); },
+ },
+ {
+ key: 'cols',
+ content: allDayContent,
+ },
+ ],
+ });
+ sections.push({
+ key: 'all-day-divider',
+ type: 'body',
+ outerContent: ( // TODO: rename to cellContent so don't need to define ?
+ createElement("tr", { role: "presentation", className: "fc-scrollgrid-section" },
+ createElement("td", { colSpan: 2, className: 'fc-timegrid-divider ' + context.theme.getClass('tableCellShaded') }))),
+ });
+ }
+ var isNowIndicator = context.options.nowIndicator;
+ sections.push({
+ type: 'body',
+ key: 'body',
+ liquid: true,
+ expandRows: Boolean(context.options.expandRows),
+ chunks: [
+ {
+ key: 'axis',
+ content: function (arg) { return (
+ // TODO: make this now-indicator arrow more DRY with TimeColsContent
+ createElement("div", { className: "fc-timegrid-axis-chunk" },
+ createElement("table", { "aria-hidden": true, style: { height: arg.expandRows ? arg.clientHeight : '' } },
+ arg.tableColGroupNode,
+ createElement("tbody", null,
+ createElement(TimeBodyAxis, { slatMetas: slatMetas }))),
+ createElement("div", { className: "fc-timegrid-now-indicator-container" },
+ createElement(NowTimer, { unit: isNowIndicator ? 'minute' : 'day' /* hacky */ }, function (nowDate) {
+ var nowIndicatorTop = isNowIndicator &&
+ slatCoords &&
+ slatCoords.safeComputeTop(nowDate); // might return void
+ if (typeof nowIndicatorTop === 'number') {
+ return (createElement(NowIndicatorRoot, { isAxis: true, date: nowDate }, function (rootElRef, classNames, innerElRef, innerContent) { return (createElement("div", { ref: rootElRef, className: ['fc-timegrid-now-indicator-arrow'].concat(classNames).join(' '), style: { top: nowIndicatorTop } }, innerContent)); }));
+ }
+ return null;
+ })))); },
+ },
+ {
+ key: 'cols',
+ scrollerElRef: this.scrollerElRef,
+ content: timeContent,
+ },
+ ],
+ });
+ if (stickyFooterScrollbar) {
+ sections.push({
+ key: 'footer',
+ type: 'footer',
+ isSticky: true,
+ chunks: [
+ {
+ key: 'axis',
+ content: renderScrollShim,
+ },
+ {
+ key: 'cols',
+ content: renderScrollShim,
+ },
+ ],
+ });
+ }
+ return (createElement(ViewRoot, { viewSpec: context.viewSpec, elRef: this.rootElRef }, function (rootElRef, classNames) { return (createElement("div", { className: ['fc-timegrid'].concat(classNames).join(' '), ref: rootElRef },
+ createElement(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: false, colGroups: [
+ { width: 'shrink', cols: [{ width: 'shrink' }] },
+ { cols: [{ span: colCnt, minWidth: dayMinWidth }] },
+ ], sections: sections }))); }));
+ };
+ /* Dimensions
+ ------------------------------------------------------------------------------------------------------------------*/
+ TimeColsView.prototype.getAllDayMaxEventProps = function () {
+ var _a = this.context.options, dayMaxEvents = _a.dayMaxEvents, dayMaxEventRows = _a.dayMaxEventRows;
+ if (dayMaxEvents === true || dayMaxEventRows === true) { // is auto?
+ dayMaxEvents = undefined;
+ dayMaxEventRows = AUTO_ALL_DAY_MAX_EVENT_ROWS; // make sure "auto" goes to a real number
+ }
+ return { dayMaxEvents: dayMaxEvents, dayMaxEventRows: dayMaxEventRows };
+ };
+ return TimeColsView;
+ }(DateComponent));
+ function renderAllDayInner$1(hookProps) {
+ return hookProps.text;
+ }
+
+ var TimeColsSlatsCoords = /** @class */ (function () {
+ function TimeColsSlatsCoords(positions, dateProfile, slotDuration) {
+ this.positions = positions;
+ this.dateProfile = dateProfile;
+ this.slotDuration = slotDuration;
+ }
+ TimeColsSlatsCoords.prototype.safeComputeTop = function (date) {
+ var dateProfile = this.dateProfile;
+ if (rangeContainsMarker(dateProfile.currentRange, date)) {
+ var startOfDayDate = startOfDay(date);
+ var timeMs = date.valueOf() - startOfDayDate.valueOf();
+ if (timeMs >= asRoughMs(dateProfile.slotMinTime) &&
+ timeMs < asRoughMs(dateProfile.slotMaxTime)) {
+ return this.computeTimeTop(createDuration(timeMs));
+ }
+ }
+ return null;
+ };
+ // Computes the top coordinate, relative to the bounds of the grid, of the given date.
+ // A `startOfDayDate` must be given for avoiding ambiguity over how to treat midnight.
+ TimeColsSlatsCoords.prototype.computeDateTop = function (when, startOfDayDate) {
+ if (!startOfDayDate) {
+ startOfDayDate = startOfDay(when);
+ }
+ return this.computeTimeTop(createDuration(when.valueOf() - startOfDayDate.valueOf()));
+ };
+ // Computes the top coordinate, relative to the bounds of the grid, of the given time (a Duration).
+ // This is a makeshify way to compute the time-top. Assumes all slatMetas dates are uniform.
+ // Eventually allow computation with arbirary slat dates.
+ TimeColsSlatsCoords.prototype.computeTimeTop = function (duration) {
+ var _a = this, positions = _a.positions, dateProfile = _a.dateProfile;
+ var len = positions.els.length;
+ // floating-point value of # of slots covered
+ var slatCoverage = (duration.milliseconds - asRoughMs(dateProfile.slotMinTime)) / asRoughMs(this.slotDuration);
+ var slatIndex;
+ var slatRemainder;
+ // compute a floating-point number for how many slats should be progressed through.
+ // from 0 to number of slats (inclusive)
+ // constrained because slotMinTime/slotMaxTime might be customized.
+ slatCoverage = Math.max(0, slatCoverage);
+ slatCoverage = Math.min(len, slatCoverage);
+ // an integer index of the furthest whole slat
+ // from 0 to number slats (*exclusive*, so len-1)
+ slatIndex = Math.floor(slatCoverage);
+ slatIndex = Math.min(slatIndex, len - 1);
+ // how much further through the slatIndex slat (from 0.0-1.0) must be covered in addition.
+ // could be 1.0 if slatCoverage is covering *all* the slots
+ slatRemainder = slatCoverage - slatIndex;
+ return positions.tops[slatIndex] +
+ positions.getHeight(slatIndex) * slatRemainder;
+ };
+ return TimeColsSlatsCoords;
+ }());
+
+ var TimeColsSlatsBody = /** @class */ (function (_super) {
+ __extends(TimeColsSlatsBody, _super);
+ function TimeColsSlatsBody() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ TimeColsSlatsBody.prototype.render = function () {
+ var _a = this, props = _a.props, context = _a.context;
+ var options = context.options;
+ var slatElRefs = props.slatElRefs;
+ return (createElement("tbody", null, props.slatMetas.map(function (slatMeta, i) {
+ var hookProps = {
+ time: slatMeta.time,
+ date: context.dateEnv.toDate(slatMeta.date),
+ view: context.viewApi,
+ };
+ var classNames = [
+ 'fc-timegrid-slot',
+ 'fc-timegrid-slot-lane',
+ slatMeta.isLabeled ? '' : 'fc-timegrid-slot-minor',
+ ];
+ return (createElement("tr", { key: slatMeta.key, ref: slatElRefs.createRef(slatMeta.key) },
+ props.axis && (createElement(TimeColsAxisCell, __assign({}, slatMeta))),
+ createElement(RenderHook, { hookProps: hookProps, classNames: options.slotLaneClassNames, content: options.slotLaneContent, didMount: options.slotLaneDidMount, willUnmount: options.slotLaneWillUnmount }, function (rootElRef, customClassNames, innerElRef, innerContent) { return (createElement("td", { ref: rootElRef, className: classNames.concat(customClassNames).join(' '), "data-time": slatMeta.isoTimeStr }, innerContent)); })));
+ })));
+ };
+ return TimeColsSlatsBody;
+ }(BaseComponent));
+
+ /*
+ for the horizontal "slats" that run width-wise. Has a time axis on a side. Depends on RTL.
+ */
+ var TimeColsSlats = /** @class */ (function (_super) {
+ __extends(TimeColsSlats, _super);
+ function TimeColsSlats() {
+ var _this = _super !== null && _super.apply(this, arguments) || this;
+ _this.rootElRef = createRef();
+ _this.slatElRefs = new RefMap();
+ return _this;
+ }
+ TimeColsSlats.prototype.render = function () {
+ var _a = this, props = _a.props, context = _a.context;
+ return (createElement("div", { ref: this.rootElRef, className: "fc-timegrid-slots" },
+ createElement("table", { "aria-hidden": true, className: context.theme.getClass('table'), style: {
+ minWidth: props.tableMinWidth,
+ width: props.clientWidth,
+ height: props.minHeight,
+ } },
+ props.tableColGroupNode /* relies on there only being a single ").append(t("
").append(i("left")).append(i("center")).append(i("right"))):e}function o(){h.remove()}function i(e){var a=t(" "),o=r.header[e];return o&&t.each(o.split(" "),function(e){e>0&&a.append("");var o;t.each(this.split(","),function(e,i){if("title"==i)a.append("
"),o&&o.addClass(v+"-corner-right"),o=null;else{var s;if(n[i]?s=n[i]:De[i]&&(s=function(){u.removeClass(v+"-state-hover"),n.changeView(i)}),s){var c=r.theme?J(r.buttonIcons,i):null,l=J(r.buttonText,i),u=t(""+(c?""+"":l)+"").click(function(){u.hasClass(v+"-state-disabled")||s()}).mousedown(function(){u.not("."+v+"-state-active").not("."+v+"-state-disabled").addClass(v+"-state-down")}).mouseup(function(){u.removeClass(v+"-state-down")}).hover(function(){u.not("."+v+"-state-active").not("."+v+"-state-disabled").addClass(v+"-state-hover")},function(){u.removeClass(v+"-state-hover").removeClass(v+"-state-down")}).appendTo(a);U(u),o||u.addClass(v+"-corner-left"),o=u}}}),o&&o.addClass(v+"-corner-right")}),a}function s(t){h.find("h2").html(t)}function c(t){h.find("span.fc-button-"+t).addClass(v+"-state-active")}function l(t){h.find("span.fc-button-"+t).removeClass(v+"-state-active")}function u(t){h.find("span.fc-button-"+t).addClass(v+"-state-disabled")}function f(t){h.find("span.fc-button-"+t).removeClass(v+"-state-disabled")}var d=this;d.render=a,d.destroy=o,d.updateTitle=s,d.activateButton=c,d.deactivateButton=l,d.disableButton=u,d.enableButton=f;var v,h=t([])}function o(n,r){function a(t,e){return!S||S>t||e>E}function o(t,e){S=t,E=e,W=[];var n=++F,r=z.length;R=r;for(var a=0;r>a;a++)i(z[a],n)}function i(e,r){s(e,function(a){if(r==F){if(a){n.eventDataTransform&&(a=t.map(a,n.eventDataTransform)),e.eventDataTransform&&(a=t.map(a,e.eventDataTransform));for(var o=0;a.length>o;o++)a[o].source=e,b(a[o]);W=W.concat(a)}R--,R||k(W)}})}function s(r,a){var o,i,c=we.sourceFetchers;for(o=0;c.length>o;o++){if(i=c[o](r,S,E,a),i===!0)return;if("object"==typeof i)return s(i,a),e}var l=r.events;if(l)t.isFunction(l)?(p(),l(d(S),d(E),function(t){a(t),y()})):t.isArray(l)?a(l):a();else{var u=r.url;if(u){var f=r.success,v=r.error,h=r.complete,g=t.extend({},r.data||{}),m=K(r.startParam,n.startParam),b=K(r.endParam,n.endParam);m&&(g[m]=Math.round(+S/1e3)),b&&(g[b]=Math.round(+E/1e3)),p(),t.ajax(t.extend({},Me,r,{data:g,success:function(e){e=e||[];var n=G(f,this,arguments);t.isArray(n)&&(e=n),a(e)},error:function(){G(v,this,arguments),a()},complete:function(){G(h,this,arguments),y()}}))}else a()}}function c(t){t=l(t),t&&(R++,i(t,F))}function l(n){return t.isFunction(n)||t.isArray(n)?n={events:n}:"string"==typeof n&&(n={url:n}),"object"==typeof n?(w(n),z.push(n),n):e}function u(e){z=t.grep(z,function(t){return!D(t,e)}),W=t.grep(W,function(t){return!D(t.source,e)}),k(W)}function f(t){var e,n,r=W.length,a=T().defaultEventEnd,o=t.start-t._start,i=t.end?t.end-(t._end||a(t)):0;for(e=0;r>e;e++)n=W[e],n._id==t._id&&n!=t&&(n.start=new Date(+n.start+o),n.end=t.end?n.end?new Date(+n.end+i):new Date(+a(n)+i):null,n.title=t.title,n.url=t.url,n.allDay=t.allDay,n.className=t.className,n.editable=t.editable,n.color=t.color,n.backgroudColor=t.backgroudColor,n.borderColor=t.borderColor,n.textColor=t.textColor,b(n));b(t),k(W)}function v(t,e){b(t),t.source||(e&&(H.events.push(t),t.source=H),W.push(t)),k(W)}function h(e){if(e){if(!t.isFunction(e)){var n=e+"";e=function(t){return t._id==n}}W=t.grep(W,e,!0);for(var r=0;z.length>r;r++)t.isArray(z[r].events)&&(z[r].events=t.grep(z[r].events,e,!0))}else{W=[];for(var r=0;z.length>r;r++)t.isArray(z[r].events)&&(z[r].events=[])}k(W)}function g(e){return t.isFunction(e)?t.grep(W,e):e?(e+="",t.grep(W,function(t){return t._id==e})):W}function p(){N++||x("loading",null,!0)}function y(){--N||x("loading",null,!1)}function b(t){var r=t.source||{},a=K(r.ignoreTimezone,n.ignoreTimezone);t._id=t._id||(t.id===e?"_fc"+Ce++:t.id+""),t.date&&(t.start||(t.start=t.date),delete t.date),t._start=d(t.start=m(t.start,a)),t.end=m(t.end,a),t.end&&t.end<=t.start&&(t.end=null),t._end=t.end?d(t.end):null,t.allDay===e&&(t.allDay=K(r.allDayDefault,n.allDayDefault)),t.className?"string"==typeof t.className&&(t.className=t.className.split(/\s+/)):t.className=[]}function w(t){t.className?"string"==typeof t.className&&(t.className=t.className.split(/\s+/)):t.className=[];for(var e=we.sourceNormalizers,n=0;e.length>n;n++)e[n](t)}function D(t,e){return t&&e&&M(t)==M(e)}function M(t){return("object"==typeof t?t.events||t.url:"")||t}var C=this;C.isFetchNeeded=a,C.fetchEvents=o,C.addEventSource=c,C.removeEventSource=u,C.updateEvent=f,C.renderEvent=v,C.removeEvents=h,C.clientEvents=g,C.normalizeEvent=b;for(var S,E,x=C.trigger,T=C.getView,k=C.reportEvents,H={events:[]},z=[H],F=0,R=0,N=0,W=[],A=0;r.length>A;A++)l(r[A])}function i(t,e,n){return t.setFullYear(t.getFullYear()+e),n||f(t),t}function s(t,e,n){if(+t){var r=t.getMonth()+e,a=d(t);for(a.setDate(1),a.setMonth(r),t.setMonth(r),n||f(t);t.getMonth()!=a.getMonth();)t.setDate(t.getDate()+(a>t?1:-1))}return t}function c(t,e,n){if(+t){var r=t.getDate()+e,a=d(t);a.setHours(9),a.setDate(r),t.setDate(r),n||f(t),l(t,a)}return t}function l(t,e){if(+t)for(;t.getDate()!=e.getDate();)t.setTime(+t+(e>t?1:-1)*xe)}function u(t,e){return t.setMinutes(t.getMinutes()+e),t}function f(t){return t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t}function d(t,e){return e?f(new Date(+t)):new Date(+t)}function v(){var t,e=0;do t=new Date(1970,e++,1);while(t.getHours());return t}function h(t,e,n){for(e=e||1;!t.getDay()||n&&1==t.getDay()||!n&&6==t.getDay();)c(t,e);return t}function g(t,e){return Math.round((d(t,!0)-d(e,!0))/Ee)}function p(t,n,r,a){n!==e&&n!=t.getFullYear()&&(t.setDate(1),t.setMonth(0),t.setFullYear(n)),r!==e&&r!=t.getMonth()&&(t.setDate(1),t.setMonth(r)),a!==e&&t.setDate(a)}function m(t,n){return"object"==typeof t?t:"number"==typeof t?new Date(1e3*t):"string"==typeof t?t.match(/^\d+(\.\d+)?$/)?new Date(1e3*parseFloat(t)):(n===e&&(n=!0),y(t,n)||(t?new Date(t):null)):null}function y(t,e){var n=t.match(/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})([T ]([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2})(:?([0-9]{2}))?))?)?)?)?$/);if(!n)return null;var r=new Date(n[1],0,1);if(e||!n[13]){var a=new Date(n[1],0,1,9,0);n[3]&&(r.setMonth(n[3]-1),a.setMonth(n[3]-1)),n[5]&&(r.setDate(n[5]),a.setDate(n[5])),l(r,a),n[7]&&r.setHours(n[7]),n[8]&&r.setMinutes(n[8]),n[10]&&r.setSeconds(n[10]),n[12]&&r.setMilliseconds(1e3*Number("0."+n[12])),l(r,a)}else if(r.setUTCFullYear(n[1],n[3]?n[3]-1:0,n[5]||1),r.setUTCHours(n[7]||0,n[8]||0,n[10]||0,n[12]?1e3*Number("0."+n[12]):0),n[14]){var o=60*Number(n[16])+(n[18]?Number(n[18]):0);o*="-"==n[15]?1:-1,r=new Date(+r+1e3*60*o)}return r}function b(t){if("number"==typeof t)return 60*t;if("object"==typeof t)return 60*t.getHours()+t.getMinutes();var e=t.match(/(\d+)(?::(\d+))?\s*(\w+)?/);if(e){var n=parseInt(e[1],10);return e[3]&&(n%=12,"p"==e[3].toLowerCase().charAt(0)&&(n+=12)),60*n+(e[2]?parseInt(e[2],10):0)}}function w(t,e,n){return D(t,null,e,n)}function D(t,e,n,r){r=r||ye;var a,o,i,s,c=t,l=e,u=n.length,f="";for(a=0;u>a;a++)if(o=n.charAt(a),"'"==o){for(i=a+1;u>i;i++)if("'"==n.charAt(i)){c&&(f+=i==a+1?"'":n.substring(a+1,i),a=i);break}}else if("("==o){for(i=a+1;u>i;i++)if(")"==n.charAt(i)){var d=w(c,n.substring(a+1,i),r);parseInt(d.replace(/\D/,""),10)&&(f+=d),a=i;break}}else if("["==o){for(i=a+1;u>i;i++)if("]"==n.charAt(i)){var v=n.substring(a+1,i),d=w(c,v,r);d!=w(l,v,r)&&(f+=d),a=i;break}}else if("{"==o)c=e,l=t;else if("}"==o)c=t,l=e;else{for(i=u;i>a;i--)if(s=ke[n.substring(a,i)]){c&&(f+=s(c,r)),a=i-1;break}i==a&&c&&(f+=o)}return f}function M(t){var e,n=new Date(t.getTime());return n.setDate(n.getDate()+4-(n.getDay()||7)),e=n.getTime(),n.setMonth(0),n.setDate(1),Math.floor(Math.round((e-n)/864e5)/7)+1}function C(t){return t.end?S(t.end,t.allDay):c(d(t.start),1)}function S(t,e){return t=d(t),e||t.getHours()||t.getMinutes()?c(t,1):f(t)}function E(t,e){return 100*(e.msLength-t.msLength)+(t.event.start-e.event.start)}function x(t,e){return t.end>e.start&&t.start
")}function X(t){return t.id+"/"+t.className+"/"+t.style.cssText.replace(/(^|;)\s*(top|left|width|height)\s*:[^;]*/gi,"")}function U(t){t.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return!1})}function Z(t){t.children().removeClass("fc-first fc-last").filter(":first-child").addClass("fc-first").end().filter(":last-child").addClass("fc-last")}function $(t,e){t.each(function(t,n){n.className=n.className.replace(/^fc-\w*/,"fc-"+Se[e.getDay()])})}function Q(t,e){var n=t.source||{},r=t.color,a=n.color,o=e("eventColor"),i=t.backgroundColor||r||n.backgroundColor||a||e("eventBackgroundColor")||o,s=t.borderColor||r||n.borderColor||a||e("eventBorderColor")||o,c=t.textColor||n.textColor||e("eventTextColor"),l=[];return i&&l.push("background-color:"+i),s&&l.push("border-color:"+s),c&&l.push("color:"+c),l.join(";")}function G(e,n,r){if(t.isFunction(e)&&(e=[e]),e){var a,o;for(a=0;e.length>a;a++)o=e[a].apply(n,r)||o;return o}}function K(){for(var t=0;arguments.length>t;t++)if(arguments[t]!==e)return arguments[t]}function te(t,e){function n(t,e){e&&(s(t,e),t.setDate(1));var n=d(t,!0);n.setDate(1);var l=s(d(n),1),u=d(n),f=d(l),v=a("firstDay"),g=a("weekends")?0:1;g&&(h(u),h(f,-1,!0)),c(u,-((u.getDay()-Math.max(v,g)+7)%7)),c(f,(7-f.getDay()+Math.max(v,g))%7);var p=Math.round((f-u)/(7*Ee));"fixed"==a("weekMode")&&(c(f,7*(6-p)),p=6),r.title=i(n,a("titleFormat")),r.start=n,r.end=l,r.visStart=u,r.visEnd=f,o(p,g?5:7,!0)}var r=this;r.render=n,re.call(r,t,e,"month");var a=r.opt,o=r.renderBasic,i=e.formatDate}function ee(t,e){function n(t,e){e&&c(t,7*e);var n=c(d(t),-((t.getDay()-a("firstDay")+7)%7)),s=c(d(n),7),l=d(n),u=d(s),f=a("weekends");f||(h(l),h(u,-1,!0)),r.title=i(l,c(d(u),-1),a("titleFormat")),r.start=n,r.end=s,r.visStart=l,r.visEnd=u,o(1,f?7:5,!1)}var r=this;r.render=n,re.call(r,t,e,"basicWeek");var a=r.opt,o=r.renderBasic,i=e.formatDates}function ne(t,e){function n(t,e){e&&(c(t,e),a("weekends")||h(t,0>e?-1:1)),r.title=i(t,a("titleFormat")),r.start=r.visStart=d(t,!0),r.end=r.visEnd=c(d(r.start),1),o(1,1,!1)}var r=this;r.render=n,re.call(r,t,e,"basicDay");var a=r.opt,o=r.renderBasic,i=e.formatDate}function re(e,n,r){function a(t,e,n){ne=t,re=e,o();var r=!P;r?i():Te(),s(n)}function o(){ce=Ee("isRTL"),ce?(le=-1,fe=re-1):(le=1,fe=0),pe=Ee("firstDay"),ye=Ee("weekends")?0:1,be=Ee("theme")?"ui":"fc",we=Ee("columnFormat"),De=Ee("weekNumbers"),Me=Ee("weekNumberTitle"),Ce="iso"!=Ee("weekNumberCalculation")?"w":"W"}function i(){Q=t("").appendTo(e)}function s(n){var r,a,o,i,s="",c=be+"-widget-header",l=be+"-widget-content",u=B.start.getMonth(),d=f(new Date);for(s+="
",_(),I&&I.remove(),I=t(s).appendTo(e),Y=I.find("thead"),j=Y.find(".fc-day-header"),P=I.find("tbody"),J=P.find("tr"),V=P.find(".fc-day"),X=J.find("td:first-child"),$=J.eq(0).find(".fc-day-content > div"),Z(Y.add(Y.find("tr"))),Z(J),J.eq(0).addClass("fc-first"),J.filter(":last").addClass("fc-last"),De&&Y.find(".fc-week-number").text(Me),j.each(function(e,n){var r=R(e);t(n).text(Fe(r,we))}),De&&P.find(".fc-week-number > div").each(function(e,n){var r=F(e,0);t(n).text(Fe(r,Ce))}),V.each(function(e,n){var r=R(e);xe("dayRender",B,r,t(n))}),v(V)}function l(e){K=e;var n,r,a,o=K-Y.height();"variable"==Ee("weekMode")?n=r=Math.floor(o/(1==ne?2:6)):(n=Math.floor(o/ne),r=o-n*(ne-1)),X.each(function(e,o){ne>e&&(a=t(o),q(a.find("> div"),(e==ne-1?r:n)-L(a)))}),O()}function u(t){G=t,se.clear(),ee=0,De&&(ee=Y.find("th.fc-week-number").outerWidth()),te=Math.floor((G-ee)/re),z(j.slice(0,-1),te)}function v(t){t.click(h).mousedown(ze)}function h(e){if(!Ee("selectable")){var n=y(t(this).data("date"));xe("dayClick",this,n,!0,e)}}function p(t,e,n){n&&oe.build();for(var r=d(B.visStart),a=c(d(r),re),o=0;ne>o;o++){var i=new Date(Math.max(r,t)),s=new Date(Math.min(a,e));if(s>i){var l,u;ce?(l=g(s,r)*le+fe+1,u=g(i,r)*le+fe+1):(l=g(i,r),u=g(s,r)),v(m(o,l,o,u-1))}c(r,7),c(a,7)}}function m(t,n,r,a){var o=oe.rect(t,n,r,a,e);return ke(o,e)}function b(t){return d(t)}function w(t,e){p(t,c(d(e),1),!0)}function D(){He()}function M(t,e,n){var r=k(t),a=V[r.row*re+r.col];xe("dayClick",a,t,e,n)}function C(t,e){ie.start(function(t){He(),t&&m(t.row,t.col,t.row,t.col)},e)}function S(t,e,n){var r=ie.stop();if(He(),r){var a=H(r);xe("drop",t,a,!0,e,n)}}function E(t){return d(t.start)}function x(t){return se.left(t)}function T(t){return se.right(t)}function k(t){return{row:Math.floor(g(t,B.visStart)/7),col:N(t.getDay())}}function H(t){return F(t.row,t.col)}function F(t,e){return c(d(B.visStart),7*t+e*le+fe)}function R(t){return F(Math.floor(t/re),t%re)}function N(t){return(t-Math.max(pe,ye)+re)%re*le+fe}function W(t){return J.eq(t)}function A(){var t=0;return De&&(t+=ee),{left:t,right:G}}function _(){q(e,e.height())}function O(){q(e,1)}var B=this;B.renderBasic=a,B.setHeight=l,B.setWidth=u,B.renderDayOverlay=p,B.defaultSelectionEnd=b,B.renderSelection=w,B.clearSelection=D,B.reportDayClick=M,B.dragStart=C,B.dragStop=S,B.defaultEventEnd=E,B.getHoverListener=function(){return ie},B.colContentLeft=x,B.colContentRight=T,B.dayOfWeekCol=N,B.dateCell=k,B.cellDate=H,B.cellIsAllDay=function(){return!0},B.allDayRow=W,B.allDayBounds=A,B.getRowCnt=function(){return ne},B.getColCnt=function(){return re},B.getColWidth=function(){return te},B.getDaySegmentContainer=function(){return Q},ue.call(B,e,n,r),ve.call(B),de.call(B),ae.call(B);var I,Y,j,P,J,V,X,$,Q,G,K,te,ee,ne,re,oe,ie,se,ce,le,fe,pe,ye,be,we,De,Me,Ce,Ee=B.opt,xe=B.trigger,Te=B.clearEvents,ke=B.renderOverlay,He=B.clearOverlays,ze=B.daySelectionMousedown,Fe=n.formatDate;U(e.addClass("fc-grid")),oe=new he(function(e,n){var r,a,o;j.each(function(e,i){r=t(i),a=r.offset().left,e&&(o[1]=a),o=[a],n[e]=o}),o[1]=a+r.outerWidth(),J.each(function(n,i){ne>n&&(r=t(i),a=r.offset().top,n&&(o[1]=a),o=[a],e[n]=o)}),o[1]=a+r.outerHeight()}),ie=new ge(oe),se=new me(function(t){return $.eq(t)})}function ae(){function e(t,e){v(t),x(r(t),e),l("eventAfterAllRender")}function n(){h(),b().empty()}function r(e){var n,r,a,o,s,l,u=S(),f=E(),v=d(i.visStart),h=c(d(v),f),g=t.map(e,C),p=[];for(n=0;u>n;n++){for(r=k(T(e,g,v,h)),a=0;r.length>a;a++)for(o=r[a],s=0;o.length>s;s++)l=o[s],l.row=n,l.level=a,p.push(l);c(v,7),c(h,7)}return p}function a(t,e,n){u(t)&&o(t,e),n.isEnd&&f(t)&&H(t,e,n),g(t,e)}function o(t,e){var n,r=w();e.draggable({zIndex:9,delay:50,opacity:s("dragOpacity"),revertDuration:s("dragRevertDuration"),start:function(a,o){l("eventDragStart",e,t,a,o),m(t,e),r.start(function(r,a,o,i){e.draggable("option","revert",!r||!o&&!i),M(),r?(n=7*o+i*(s("isRTL")?-1:1),D(c(d(t.start),n),c(C(t),n))):n=0},a,"drag")},stop:function(a,o){r.stop(),M(),l("eventDragStop",e,t,a,o),n?y(this,t,n,0,t.allDay,a,o):(e.css("filter",""),p(t,e))}})}var i=this;i.renderEvents=e,i.compileDaySegs=r,i.clearEvents=n,i.bindDaySeg=a,fe.call(i);var s=i.opt,l=i.trigger,u=i.isEventDraggable,f=i.isEventResizable,v=i.reportEvents,h=i.reportEventClear,g=i.eventElementHandlers,p=i.showEvents,m=i.hideEvents,y=i.eventDrop,b=i.getDaySegmentContainer,w=i.getHoverListener,D=i.renderDayOverlay,M=i.clearOverlays,S=i.getRowCnt,E=i.getColCnt,x=i.renderDaySegs,H=i.resizableDayEvent}function oe(t,e){function n(t,e){e&&c(t,7*e);var n=c(d(t),-((t.getDay()-a("firstDay")+7)%7)),s=c(d(n),7),l=d(n),u=d(s),f=a("weekends");f||(h(l),h(u,-1,!0)),r.title=i(l,c(d(u),-1),a("titleFormat")),r.start=n,r.end=s,r.visStart=l,r.visEnd=u,o(f?7:5)}var r=this;r.render=n,se.call(r,t,e,"agendaWeek");var a=r.opt,o=r.renderAgenda,i=e.formatDates}function ie(t,e){function n(t,e){e&&(c(t,e),a("weekends")||h(t,0>e?-1:1));var n=d(t,!0),s=c(d(n),1);r.title=i(t,a("titleFormat")),r.start=r.visStart=n,r.end=r.visEnd=s,o(1)}var r=this;r.render=n,se.call(r,t,e,"agendaDay");var a=r.opt,o=r.renderAgenda,i=e.formatDate}function se(n,r,a){function o(t){Le=t,i(),te?nn():s(),l()}function i(){Ye=tn("theme")?"ui":"fc",Pe=tn("weekends")?0:1,je=tn("firstDay"),(Je=tn("isRTL"))?(Ve=-1,Xe=Le-1):(Ve=1,Xe=0),Ue=b(tn("minTime")),Ze=b(tn("maxTime")),$e=tn("columnFormat"),Qe=tn("weekNumbers"),Ge=tn("weekNumberTitle"),Ke="iso"!=tn("weekNumberCalculation")?"w":"W",Ne=tn("snapMinutes")||tn("slotMinutes")}function s(){var e,r,a,o,i,s=Ye+"-widget-header",c=Ye+"-widget-content",l=0==tn("slotMinutes")%15;for(e="",De&&(s+=" ",r=0;ne>r;r++){for(s+=""),r=0;re>r;r++)o=F(0,r),s+=" ";for(s+=" ",De&&(s+=" "}s+=""+""+" "),a=0;re>a;a++)o=F(r,a),i=["fc-day","fc-"+Se[o.getDay()],l],o.getMonth()!=u&&i.push("fc-other-month"),+o==+d&&(i.push("fc-today"),i.push(be+"-state-highlight")),s+=""+" ";s+="
",te=t(e).appendTo(n),ee=te.find("thead"),ne=ee.find("th").slice(1,-1),re=te.find("tbody"),ae=re.find("td").slice(0,-1),oe=ae.find("div.fc-day-content div"),ie=ae.eq(0),se=ie.find("> div"),Z(ee.add(ee.find("tr"))),Z(re.add(re.find("tr"))),Se=ee.find("th:first"),Ee=te.find(".fc-agenda-gutter"),le=t("").appendTo(n),tn("allDaySlot")?(fe=t("").appendTo(le),e="",e+=Qe?" "+""+""+"":" ",r=0;Le>r;r++)e+="";for(e+=" "+""+" "+""+" ",r=0;Le>r;r++)e+=""+" ";for(e+=" "+"
",pe=t(e).appendTo(le),ye=pe.find("tr"),D(ye.find("td")),Se=Se.add(pe.find("th:first")),Ee=Ee.add(pe.find("th.fc-agenda-gutter")),le.append(" "+""+tn("allDayText")+" "+""+" "+" "+"",a=v(),o=u(d(a),Ze),u(a,Ue),_e=0,r=0;o>a;r++)i=a.getMinutes(),e+="
",Me=t(e).appendTo(we),Ce=Me.find("div:first"),M(Me.find("td")),Se=Se.add(Me.find("th:first"))}function l(){var t,e,n,r,a=f(new Date);if(Qe){var o=un(N(0),Ke);Je?o+=Ge:o=Ge+o,ee.find(".fc-week-number").text(o)}for(t=0;Le>t;t++)r=N(t),e=ne.eq(t),e.html(un(r,$e)),n=ae.eq(t),+r==+a?n.addClass(Ye+"-state-highlight fc-today"):n.removeClass(Ye+"-state-highlight fc-today"),$(e.add(n),r)}function h(t,n){t===e&&(t=ke),ke=t,fn={};var r=re.position().top,a=be.position().top,o=Math.min(t-r,Me.height()+a+1);se.height(o-L(ie)),le.css("top",r),be.height(o-a-1),Re=Ce.height()+1,We=tn("slotMinutes")/Ne,Ae=Re/We,n&&m()}function p(e){Te=e,qe.clear(),He=0,z(Se.width("").each(function(e,n){He=Math.max(He,t(n).outerWidth())}),He);var n=be[0].clientWidth;Fe=be.width()-n,Fe?(z(Ee,Fe),Ee.show().prev().removeClass("fc-last")):Ee.hide().prev().addClass("fc-last"),ze=Math.floor((n-He)/Le),z(ne.slice(0,-1),ze)}function m(){function t(){be.scrollTop(r)}var e=v(),n=d(e);n.setHours(tn("firstHour"));var r=_(e,n)+1;t(),setTimeout(t,0)}function y(){Ie=be.scrollTop()}function w(){be.scrollTop(Ie)}function D(t){t.click(C).mousedown(cn)}function M(t){t.click(C).mousedown(V)}function C(t){if(!tn("selectable")){var e=Math.min(Le-1,Math.floor((t.pageX-te.offset().left-He)/ze)),n=N(e),r=this.parentNode.className.match(/fc-slot(\d+)/);if(r){var a=parseInt(r[1])*tn("slotMinutes"),o=Math.floor(a/60);n.setHours(o),n.setMinutes(a%60+Ue),en("dayClick",ae[e],n,!1,t)}else en("dayClick",ae[e],n,!0,t)}}function S(t,e,n){n&&Oe.build();var r,a,o=d(K.visStart);Je?(r=g(e,o)*Ve+Xe+1,a=g(t,o)*Ve+Xe+1):(r=g(t,o),a=g(e,o)),r=Math.max(0,r),a=Math.min(Le,a),a>r&&D(E(0,r,0,a-1))}function E(t,e,n,r){var a=Oe.rect(t,e,n,r,le);return rn(a,le)}function x(t,e){for(var n=d(K.visStart),r=c(d(n),1),a=0;Le>a;a++){var o=new Date(Math.max(n,t)),i=new Date(Math.min(r,e));if(i>o){var s=a*Ve+Xe,l=Oe.rect(0,s,0,s,we),u=_(n,o),f=_(n,i);l.top=u,l.height=f-u,M(rn(l,we))}c(n,1),c(r,1)}}function T(t){return qe.left(t)}function k(t){return qe.right(t)}function H(t){return{row:Math.floor(g(t,K.visStart)/7),col:A(t.getDay())}}function R(t){var e=N(t.col),n=t.row;return tn("allDaySlot")&&n--,n>=0&&u(e,Ue+n*Ne),e}function N(t){return c(d(K.visStart),t*Ve+Xe)}function W(t){return tn("allDaySlot")&&!t.row}function A(t){return(t-Math.max(je,Pe)+Le)%Le*Ve+Xe}function _(t,n){if(t=d(t,!0),u(d(t),Ue)>n)return 0;if(n>=u(d(t),Ze))return Me.height();var r=tn("slotMinutes"),a=60*n.getHours()+n.getMinutes()-Ue,o=Math.floor(a/r),i=fn[o];return i===e&&(i=fn[o]=Me.find("tr:eq("+o+") td div")[0].offsetTop),Math.max(0,Math.round(i-1+Re*(a%r/r)))}function O(){return{left:He,right:Te-Fe}}function B(){return ye}function q(t){var e=d(t.start);return t.allDay?e:u(e,tn("defaultEventMinutes"))}function I(t,e){return e?d(t):u(d(t),tn("slotMinutes"))}function j(t,e,n){n?tn("allDaySlot")&&S(t,c(d(e),1),!0):P(t,e)}function P(e,n){var r=tn("selectHelper");if(Oe.build(),r){var a=g(e,K.visStart)*Ve+Xe;if(a>=0&&Le>a){var o=Oe.rect(0,a,0,a,we),i=_(e,e),s=_(e,n);if(s>i){if(o.top=i,o.height=s-i,o.left+=2,o.width-=5,t.isFunction(r)){var c=r(e,n);c&&(o.position="absolute",o.zIndex=8,xe=t(c).css(o).appendTo(we))}else o.isStart=!0,o.isEnd=!0,xe=t(ln({title:"",start:e,end:n,className:["fc-select-helper"],editable:!1},o)),xe.css("opacity",tn("dragOpacity"));xe&&(M(xe),we.append(xe),z(xe,o.width,!0),F(xe,o.height,!0))}}}else x(e,n)}function J(){an(),xe&&(xe.remove(),xe=null)}function V(e){if(1==e.which&&tn("selectable")){sn(e);var n;Be.start(function(t,e){if(J(),t&&t.col==e.col&&!W(t)){var r=R(e),a=R(t);n=[r,u(d(r),Ne),a,u(d(a),Ne)].sort(Y),P(n[0],n[3])}else n=null},e),t(document).one("mouseup",function(t){Be.stop(),n&&(+n[0]==+n[1]&&X(n[0],!1,t),on(n[0],n[3],!1,t))})}}function X(t,e,n){en("dayClick",ae[A(t.getDay())],t,e,n)}function Q(t,e){Be.start(function(t){if(an(),t)if(W(t))E(t.row,t.col,t.row,t.col);else{var e=R(t),n=u(d(e),tn("defaultEventMinutes"));x(e,n)}},e)}function G(t,e,n){var r=Be.stop();an(),r&&en("drop",t,R(r),W(r),e,n)}var K=this;K.renderAgenda=o,K.setWidth=p,K.setHeight=h,K.beforeHide=y,K.afterShow=w,K.defaultEventEnd=q,K.timePosition=_,K.dayOfWeekCol=A,K.dateCell=H,K.cellDate=R,K.cellIsAllDay=W,K.allDayRow=B,K.allDayBounds=O,K.getHoverListener=function(){return Be},K.colContentLeft=T,K.colContentRight=k,K.getDaySegmentContainer=function(){return fe},K.getSlotSegmentContainer=function(){return De},K.getMinMinute=function(){return Ue},K.getMaxMinute=function(){return Ze},K.getBodyContent=function(){return we},K.getRowCnt=function(){return 1},K.getColCnt=function(){return Le},K.getColWidth=function(){return ze},K.getSnapHeight=function(){return Ae},K.getSnapMinutes=function(){return Ne},K.defaultSelectionEnd=I,K.renderDayOverlay=S,K.renderSelection=j,K.clearSelection=J,K.reportDayClick=X,K.dragStart=Q,K.dragStop=G,ue.call(K,n,r,a),ve.call(K),de.call(K),ce.call(K);var te,ee,ne,re,ae,oe,ie,se,le,fe,pe,ye,be,we,De,Me,Ce,Se,Ee,xe,Te,ke,He,ze,Fe,Re,Ne,We,Ae,Le,_e,Oe,Be,qe,Ie,Ye,je,Pe,Je,Ve,Xe,Ue,Ze,$e,Qe,Ge,Ke,tn=K.opt,en=K.trigger,nn=K.clearEvents,rn=K.renderOverlay,an=K.clearOverlays,on=K.reportSelection,sn=K.unselect,cn=K.daySelectionMousedown,ln=K.slotSegHtml,un=r.formatDate,fn={};U(n.addClass("fc-agenda")),Oe=new he(function(e,n){function r(t){return Math.max(c,Math.min(l,t))}var a,o,i;ne.each(function(e,r){a=t(r),o=a.offset().left,e&&(i[1]=o),i=[o],n[e]=i}),i[1]=o+a.outerWidth(),tn("allDaySlot")&&(a=ye,o=a.offset().top,e[0]=[o,o+a.outerHeight()]);for(var s=we.offset().top,c=be.offset().top,l=c+be.outerHeight(),u=0;_e*We>u;u++)e.push([r(s+Ae*u),r(s+Ae*(u+1))])}),Be=new ge(Oe),qe=new me(function(t){return oe.eq(t)})}function ce(){function n(t,e){S(t);var n,r=t.length,i=[],c=[];for(n=0;r>n;n++)t[n].allDay?i.push(t[n]):c.push(t[n]);y("allDaySlot")&&(Y(a(i),e),z()),s(o(c),e),b("eventAfterAllRender")}function r(){E(),N().empty(),W().empty()}function a(e){var n,r,a,o,i=k(T(e,t.map(e,C),m.visStart,m.visEnd)),s=i.length,c=[];for(n=0;s>n;n++)for(r=i[n],a=0;r.length>a;a++)o=r[a],o.row=0,o.level=n,c.push(o);return c}function o(e){var n,r,a,o,s,l,f=P(),v=O(),h=_(),g=u(d(m.visStart),v),p=t.map(e,i),y=[];for(n=0;f>n;n++){for(r=k(T(e,p,g,u(d(g),h-v))),le(r),a=0;r.length>a;a++)for(o=r[a],s=0;o.length>s;s++)l=o[s],l.col=n,l.level=a,y.push(l);c(g,1,!0)}return y}function i(t){return t.end?d(t.end):u(d(t.start),y("defaultEventMinutes"))}function s(n,r){var a,o,i,s,c,u,f,d,h,g,p,m,w,D,M,C,S,E,x,T,k,z,F=n.length,N="",A={},_={},O=W(),Y=P();for((T=y("isRTL"))?(k=-1,z=Y-1):(k=1,z=0),a=0;F>a;a++)o=n[a],i=o.event,s=B(o.start,o.start),c=B(o.start,o.end),u=o.col,f=o.level,d=o.forward||0,h=q(u*k+z),g=I(u*k+z)-h,g=Math.min(g-6,.95*g),p=f?g/(f+d+1):d?2*(g/(d+1)-6):g,m=h+g/(f+d+1)*f*k+(T?g-p:0),o.top=s,o.left=m,o.outerWidth=p,o.outerHeight=c-s,N+=l(i,o);
-for(O[0].innerHTML=N,w=O.children(),a=0;F>a;a++)o=n[a],i=o.event,D=t(w[a]),M=b("eventRender",i,i,D),M===!1?D.remove():(M&&M!==!0&&(D.remove(),D=t(M).css({position:"absolute",top:o.top,left:o.left}).appendTo(O)),o.element=D,i._id===r?v(i,D,o):D[0]._fci=a,G(i,D));for(H(O,n,v),a=0;F>a;a++)o=n[a],(D=o.element)&&(S=A[C=o.key=X(D[0])],o.vsides=S===e?A[C]=L(D,!0):S,S=_[C],o.hsides=S===e?_[C]=R(D,!0):S,E=D.find(".fc-event-title"),E.length&&(o.contentTop=E[0].offsetTop));for(a=0;F>a;a++)o=n[a],(D=o.element)&&(D[0].style.width=Math.max(0,o.outerWidth-o.hsides)+"px",x=Math.max(0,o.outerHeight-o.vsides),D[0].style.height=x+"px",i=o.event,o.contentTop!==e&&10>x-o.contentTop&&(D.find("div.fc-event-time").text(ie(i.start,y("timeFormat"))+" - "+i.title),D.find("div.fc-event-title").remove()),b("eventAfterRender",i,i,D))}function l(t,e){var n="<",r=t.url,a=Q(t,y),o=["fc-event","fc-event-vert"];return w(t)&&o.push("fc-event-draggable"),e.isStart&&o.push("fc-event-start"),e.isEnd&&o.push("fc-event-end"),o=o.concat(t.className),t.source&&(o=o.concat(t.source.className||[])),n+=r?"a href='"+V(t.url)+"'":"div",n+=" class='"+o.join(" ")+"'"+" style='position:absolute;z-index:8;top:"+e.top+"px;left:"+e.left+"px;"+a+"'"+">"+""+" ",u(a,tn("slotMinutes")),_e++;e+=""+(l&&i?" ":un(a,tn("axisFormat")))+" "+""+" "+", usually */
-.fc-widget-content { /* , usually */
- border: 1px solid #ddd;
- }
-
-.fc-state-highlight { /* today cell */ /* TODO: add .fc-today to */
- background: #fcf8e3;
- }
-
-.fc-cell-overlay { /* semi-transparent rectangle while dragging */
- background: #bce8f1;
- opacity: .3;
- filter: alpha(opacity=30); /* for IE */
- }
-
+.fc-icon-minus-square:before {
+ content: "\e904";
+}
+.fc-icon-plus-square:before {
+ content: "\e905";
+}
-/* Buttons
-------------------------------------------------------------------------*/
-
-.fc-button {
- position: relative;
- display: inline-block;
- padding: 0 .6em;
- overflow: hidden;
- height: 1.9em;
- line-height: 1.9em;
- white-space: nowrap;
- cursor: pointer;
- }
-
-.fc-state-default { /* non-theme */
- border: 1px solid;
- }
-
-.fc-state-default.fc-corner-left { /* non-theme */
- border-top-left-radius: 4px;
- border-bottom-left-radius: 4px;
- }
-
-.fc-state-default.fc-corner-right { /* non-theme */
- border-top-right-radius: 4px;
- border-bottom-right-radius: 4px;
- }
-
+.fc-icon-x:before {
+ content: "\e906";
+}
/*
- Our default prev/next buttons use HTML entities like ‹ › « »
- and we'll try to make them look good cross-browser.
+Lots taken from Flatly (MIT): https://bootswatch.com/4/flatly/bootstrap.css
+
+These styles only apply when the standard-theme is activated.
+When it's NOT activated, the fc-button classes won't even be in the DOM.
*/
+.fc {
-.fc-text-arrow {
- margin: 0 .1em;
- font-size: 2em;
- font-family: "Courier New", Courier, monospace;
- vertical-align: baseline; /* for IE7 */
- }
+ /* reset */
-.fc-button-prev .fc-text-arrow,
-.fc-button-next .fc-text-arrow { /* for ‹ › */
- font-weight: bold;
- }
-
-/* icon (for jquery ui) */
-
-.fc-button .fc-icon-wrap {
- position: relative;
- float: left;
- top: 50%;
- }
-
-.fc-button .ui-icon {
- position: relative;
- float: left;
- margin-top: -50%;
- *margin-top: 0;
- *top: -50%;
- }
-
-/*
- button states
- borrowed from twitter bootstrap (http://twitter.github.com/bootstrap/)
-*/
+}
+.fc .fc-button {
+ border-radius: 0;
+ overflow: visible;
+ text-transform: none;
+ margin: 0;
+ font-family: inherit;
+ font-size: inherit;
+ line-height: inherit;
+ }
+.fc .fc-button:focus {
+ outline: 1px dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ }
+.fc .fc-button {
+ -webkit-appearance: button;
+ }
+.fc .fc-button:not(:disabled) {
+ cursor: pointer;
+ }
+.fc .fc-button::-moz-focus-inner {
+ padding: 0;
+ border-style: none;
+ }
+.fc {
-.fc-state-default {
- background-color: #f5f5f5;
- background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
- background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
- background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
- background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
- background-repeat: repeat-x;
- border-color: #e6e6e6 #e6e6e6 #bfbfbf;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
- color: #333;
- text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- }
+ /* theme */
-.fc-state-hover,
-.fc-state-down,
-.fc-state-active,
-.fc-state-disabled {
- color: #333333;
- background-color: #e6e6e6;
- }
+}
+.fc .fc-button {
+ display: inline-block;
+ font-weight: 400;
+ text-align: center;
+ vertical-align: middle;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ background-color: transparent;
+ border: 1px solid transparent;
+ padding: 0.4em 0.65em;
+ font-size: 1em;
+ line-height: 1.5;
+ border-radius: 0.25em;
+ }
+.fc .fc-button:hover {
+ text-decoration: none;
+ }
+.fc .fc-button:focus {
+ outline: 0;
+ box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
+ }
+.fc .fc-button:disabled {
+ opacity: 0.65;
+ }
+.fc {
-.fc-state-hover {
- color: #333333;
- text-decoration: none;
- background-position: 0 -15px;
- -webkit-transition: background-position 0.1s linear;
- -moz-transition: background-position 0.1s linear;
- -o-transition: background-position 0.1s linear;
- transition: background-position 0.1s linear;
- }
+ /* "primary" coloring */
-.fc-state-down,
-.fc-state-active {
- background-color: #cccccc;
- background-image: none;
- outline: 0;
- box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
- }
+}
+.fc .fc-button-primary {
+ color: #fff;
+ color: var(--fc-button-text-color, #fff);
+ background-color: #2C3E50;
+ background-color: var(--fc-button-bg-color, #2C3E50);
+ border-color: #2C3E50;
+ border-color: var(--fc-button-border-color, #2C3E50);
+ }
+.fc .fc-button-primary:hover {
+ color: #fff;
+ color: var(--fc-button-text-color, #fff);
+ background-color: #1e2b37;
+ background-color: var(--fc-button-hover-bg-color, #1e2b37);
+ border-color: #1a252f;
+ border-color: var(--fc-button-hover-border-color, #1a252f);
+ }
+.fc .fc-button-primary:disabled { /* not DRY */
+ color: #fff;
+ color: var(--fc-button-text-color, #fff);
+ background-color: #2C3E50;
+ background-color: var(--fc-button-bg-color, #2C3E50);
+ border-color: #2C3E50;
+ border-color: var(--fc-button-border-color, #2C3E50); /* overrides :hover */
+ }
+.fc .fc-button-primary:focus {
+ box-shadow: 0 0 0 0.2rem rgba(76, 91, 106, 0.5);
+ }
+.fc .fc-button-primary:not(:disabled):active,
+ .fc .fc-button-primary:not(:disabled).fc-button-active {
+ color: #fff;
+ color: var(--fc-button-text-color, #fff);
+ background-color: #1a252f;
+ background-color: var(--fc-button-active-bg-color, #1a252f);
+ border-color: #151e27;
+ border-color: var(--fc-button-active-border-color, #151e27);
+ }
+.fc .fc-button-primary:not(:disabled):active:focus,
+ .fc .fc-button-primary:not(:disabled).fc-button-active:focus {
+ box-shadow: 0 0 0 0.2rem rgba(76, 91, 106, 0.5);
+ }
+.fc {
-.fc-state-disabled {
- cursor: default;
- background-image: none;
- opacity: 0.65;
- filter: alpha(opacity=65);
- box-shadow: none;
- }
+ /* icons within buttons */
-
+}
+.fc .fc-button .fc-icon {
+ vertical-align: middle;
+ font-size: 1.5em; /* bump up the size (but don't make it bigger than line-height of button, which is 1.5em also) */
+ }
+.fc .fc-button-group {
+ position: relative;
+ display: inline-flex;
+ vertical-align: middle;
+ }
+.fc .fc-button-group > .fc-button {
+ position: relative;
+ flex: 1 1 auto;
+ }
+.fc .fc-button-group > .fc-button:hover {
+ z-index: 1;
+ }
+.fc .fc-button-group > .fc-button:focus,
+ .fc .fc-button-group > .fc-button:active,
+ .fc .fc-button-group > .fc-button.fc-button-active {
+ z-index: 1;
+ }
+.fc-direction-ltr .fc-button-group > .fc-button:not(:first-child) {
+ margin-left: -1px;
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+ }
+.fc-direction-ltr .fc-button-group > .fc-button:not(:last-child) {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+ }
+.fc-direction-rtl .fc-button-group > .fc-button:not(:first-child) {
+ margin-right: -1px;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+ }
+.fc-direction-rtl .fc-button-group > .fc-button:not(:last-child) {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+ }
+.fc .fc-toolbar {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+.fc .fc-toolbar.fc-header-toolbar {
+ margin-bottom: 1.5em;
+ }
+.fc .fc-toolbar.fc-footer-toolbar {
+ margin-top: 1.5em;
+ }
+.fc .fc-toolbar-title {
+ font-size: 1.75em;
+ margin: 0;
+ }
+.fc-direction-ltr .fc-toolbar > * > :not(:first-child) {
+ margin-left: .75em; /* space between */
+ }
+.fc-direction-rtl .fc-toolbar > * > :not(:first-child) {
+ margin-right: .75em; /* space between */
+ }
+.fc-direction-rtl .fc-toolbar-ltr { /* when the toolbar-chunk positioning system is explicitly left-to-right */
+ flex-direction: row-reverse;
+ }
+.fc .fc-scroller {
+ -webkit-overflow-scrolling: touch;
+ position: relative; /* for abs-positioned elements within */
+ }
+.fc .fc-scroller-liquid {
+ height: 100%;
+ }
+.fc .fc-scroller-liquid-absolute {
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ bottom: 0;
+ }
+.fc .fc-scroller-harness {
+ position: relative;
+ overflow: hidden;
+ direction: ltr;
+ /* hack for chrome computing the scroller's right/left wrong for rtl. undone below... */
+ /* TODO: demonstrate in codepen */
+ }
+.fc .fc-scroller-harness-liquid {
+ height: 100%;
+ }
+.fc-direction-rtl .fc-scroller-harness > .fc-scroller { /* undo above hack */
+ direction: rtl;
+ }
+.fc-theme-standard .fc-scrollgrid {
+ border: 1px solid #ddd;
+ border: 1px solid var(--fc-border-color, #ddd); /* bootstrap does this. match */
+ }
+.fc .fc-scrollgrid,
+ .fc .fc-scrollgrid table { /* all tables (self included) */
+ width: 100%; /* because tables don't normally do this */
+ table-layout: fixed;
+ }
+.fc .fc-scrollgrid table { /* inner tables */
+ border-top-style: hidden;
+ border-left-style: hidden;
+ border-right-style: hidden;
+ }
+.fc .fc-scrollgrid {
-/* Global Event Styles
-------------------------------------------------------------------------*/
-
-.fc-event {
- border: 1px solid #3a87ad; /* default BORDER color */
- background-color: #3a87ad; /* default BACKGROUND color */
- color: #fff; /* default TEXT color */
- font-size: .85em;
- cursor: default;
- }
+ border-collapse: separate;
+ border-right-width: 0;
+ border-bottom-width: 0;
-a.fc-event {
- text-decoration: none;
- }
-
+ }
+.fc .fc-scrollgrid-liquid {
+ height: 100%;
+ }
+.fc .fc-scrollgrid-section { /* a */
+ height: 1px /* better than 0, for firefox */
+
+ }
+.fc .fc-scrollgrid-section > td {
+ height: 1px; /* needs a height so inner div within grow. better than 0, for firefox */
+ }
+.fc .fc-scrollgrid-section table {
+ height: 1px;
+ /* for most browsers, if a height isn't set on the table, can't do liquid-height within cells */
+ /* serves as a min-height. harmless */
+ }
+.fc .fc-scrollgrid-section-liquid > td {
+ height: 100%; /* better than `auto`, for firefox */
+ }
+.fc .fc-scrollgrid-section > * {
+ border-top-width: 0;
+ border-left-width: 0;
+ }
+.fc .fc-scrollgrid-section-header > *,
+ .fc .fc-scrollgrid-section-footer > * {
+ border-bottom-width: 0;
+ }
+.fc .fc-scrollgrid-section-body table,
+ .fc .fc-scrollgrid-section-footer table {
+ border-bottom-style: hidden; /* head keeps its bottom border tho */
+ }
+.fc {
+
+ /* stickiness */
+
+}
+.fc .fc-scrollgrid-section-sticky > * {
+ background: #fff;
+ background: var(--fc-page-bg-color, #fff);
+ position: sticky;
+ z-index: 3; /* TODO: var */
+ /* TODO: box-shadow when sticking */
+ }
+.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky > * {
+ top: 0; /* because border-sharing causes a gap at the top */
+ /* TODO: give safari -1. has bug */
+ }
+.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky > * {
+ bottom: 0; /* known bug: bottom-stickiness doesn't work in safari */
+ }
+.fc .fc-scrollgrid-sticky-shim { /* for horizontal scrollbar */
+ height: 1px; /* needs height to create scrollbars */
+ margin-bottom: -1px;
+ }
+.fc-sticky { /* no .fc wrap because used as child of body */
+ position: sticky;
+}
+.fc .fc-view-harness {
+ flex-grow: 1; /* because this harness is WITHIN the .fc's flexbox */
+ position: relative;
+ }
+.fc {
+
+ /* when the harness controls the height, make the view liquid */
+
+}
+.fc .fc-view-harness-active > .fc-view {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+.fc .fc-col-header-cell-cushion {
+ display: inline-block; /* x-browser for when sticky (when multi-tier header) */
+ padding: 2px 4px;
+ }
+.fc .fc-bg-event,
+ .fc .fc-non-business,
+ .fc .fc-highlight {
+ /* will always have a harness with position:relative/absolute, so absolutely expand */
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ }
+.fc .fc-non-business {
+ background: rgba(215, 215, 215, 0.3);
+ background: var(--fc-non-business-color, rgba(215, 215, 215, 0.3));
+ }
+.fc .fc-bg-event {
+ background: rgb(143, 223, 130);
+ background: var(--fc-bg-event-color, rgb(143, 223, 130));
+ opacity: 0.3;
+ opacity: var(--fc-bg-event-opacity, 0.3)
+ }
+.fc .fc-bg-event .fc-event-title {
+ margin: .5em;
+ font-size: .85em;
+ font-size: var(--fc-small-font-size, .85em);
+ font-style: italic;
+ }
+.fc .fc-highlight {
+ background: rgba(188, 232, 241, 0.3);
+ background: var(--fc-highlight-color, rgba(188, 232, 241, 0.3));
+ }
+.fc .fc-cell-shaded,
+ .fc .fc-day-disabled {
+ background: rgba(208, 208, 208, 0.3);
+ background: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));
+ }
+/* link resets */
+/* ---------------------------------------------------------------------------------------------------- */
a.fc-event,
-.fc-event-draggable {
- cursor: pointer;
- }
-
-.fc-rtl .fc-event {
- text-align: right;
- }
+a.fc-event:hover {
+ text-decoration: none;
+}
+/* cursor */
+.fc-event[href],
+.fc-event.fc-event-draggable {
+ cursor: pointer;
+}
+/* event text content */
+/* ---------------------------------------------------------------------------------------------------- */
+.fc-event .fc-event-main {
+ position: relative;
+ z-index: 2;
+ }
+/* dragging */
+/* ---------------------------------------------------------------------------------------------------- */
+.fc-event-dragging:not(.fc-event-selected) { /* MOUSE */
+ opacity: 0.75;
+ }
+.fc-event-dragging.fc-event-selected { /* TOUCH */
+ box-shadow: 0 2px 7px rgba(0, 0, 0, 0.3);
+ }
+/* resizing */
+/* ---------------------------------------------------------------------------------------------------- */
+/* (subclasses should hone positioning for touch and non-touch) */
+.fc-event .fc-event-resizer {
+ display: none;
+ position: absolute;
+ z-index: 4;
+ }
+.fc-event:hover, /* MOUSE */
+.fc-event-selected { /* TOUCH */
-.fc-event-inner {
- width: 100%;
- height: 100%;
- overflow: hidden;
- }
-
-.fc-event-time,
-.fc-event-title {
- padding: 0 1px;
- }
-
-.fc .ui-resizable-handle {
- display: block;
- position: absolute;
- z-index: 99999;
- overflow: hidden; /* hacky spaces (IE6/7) */
- font-size: 300%; /* */
- line-height: 50%; /* */
- }
-
-
-
-/* Horizontal Events
-------------------------------------------------------------------------*/
+}
+.fc-event:hover .fc-event-resizer, .fc-event-selected .fc-event-resizer {
+ display: block;
+ }
+.fc-event-selected .fc-event-resizer {
+ border-radius: 4px;
+ border-radius: calc(var(--fc-event-resizer-dot-total-width, 8px) / 2);
+ border-width: 1px;
+ border-width: var(--fc-event-resizer-dot-border-width, 1px);
+ width: 8px;
+ width: var(--fc-event-resizer-dot-total-width, 8px);
+ height: 8px;
+ height: var(--fc-event-resizer-dot-total-width, 8px);
+ border-style: solid;
+ border-color: inherit;
+ background: #fff;
+ background: var(--fc-page-bg-color, #fff)
-.fc-event-hori {
- border-width: 1px 0;
- margin-bottom: 1px;
- }
+ /* expand hit area */
-.fc-ltr .fc-event-hori.fc-event-start,
-.fc-rtl .fc-event-hori.fc-event-end {
- border-left-width: 1px;
- border-top-left-radius: 3px;
- border-bottom-left-radius: 3px;
- }
+ }
+.fc-event-selected .fc-event-resizer:before {
+ content: '';
+ position: absolute;
+ top: -20px;
+ left: -20px;
+ right: -20px;
+ bottom: -20px;
+ }
+/* selecting (always TOUCH) */
+/* OR, focused by tab-index */
+/* (TODO: maybe not the best focus-styling for .fc-daygrid-dot-event) */
+/* ---------------------------------------------------------------------------------------------------- */
+.fc-event-selected,
+.fc-event:focus {
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2)
-.fc-ltr .fc-event-hori.fc-event-end,
-.fc-rtl .fc-event-hori.fc-event-start {
- border-right-width: 1px;
- border-top-right-radius: 3px;
- border-bottom-right-radius: 3px;
- }
-
-/* resizable */
-
-.fc-event-hori .ui-resizable-e {
- top: 0 !important; /* importants override pre jquery ui 1.7 styles */
- right: -3px !important;
- width: 7px !important;
- height: 100% !important;
- cursor: e-resize;
- }
-
-.fc-event-hori .ui-resizable-w {
- top: 0 !important;
- left: -3px !important;
- width: 7px !important;
- height: 100% !important;
- cursor: w-resize;
- }
-
-.fc-event-hori .ui-resizable-handle {
- _padding-bottom: 14px; /* IE6 had 0 height */
- }
-
-
-
-/* Reusable Separate-border Table
-------------------------------------------------------------*/
+ /* expand hit area (subclasses should expand) */
-table.fc-border-separate {
- border-collapse: separate;
- }
-
-.fc-border-separate th,
-.fc-border-separate td {
- border-width: 1px 0 0 1px;
- }
-
-.fc-border-separate th.fc-last,
-.fc-border-separate td.fc-last {
- border-right-width: 1px;
- }
-
-.fc-border-separate tr.fc-last th,
-.fc-border-separate tr.fc-last td {
- border-bottom-width: 1px;
- }
-
-.fc-border-separate tbody tr.fc-first td,
-.fc-border-separate tbody tr.fc-first th {
- border-top-width: 0;
- }
-
-
+}
+.fc-event-selected:before, .fc-event:focus:before {
+ content: "";
+ position: absolute;
+ z-index: 3;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ }
+.fc-event-selected,
+.fc-event:focus {
-/* Month View, Basic Week View, Basic Day View
-------------------------------------------------------------------------*/
+ /* dimmer effect */
-.fc-grid th {
- text-align: center;
- }
+}
+.fc-event-selected:after, .fc-event:focus:after {
+ content: "";
+ background: rgba(0, 0, 0, 0.25);
+ background: var(--fc-event-selected-overlay-color, rgba(0, 0, 0, 0.25));
+ position: absolute;
+ z-index: 1;
-.fc .fc-week-number {
- width: 22px;
- text-align: center;
- }
+ /* assume there's a border on all sides. overcome it. */
+ /* sometimes there's NOT a border, in which case the dimmer will go over */
+ /* an adjacent border, which looks fine. */
+ top: -1px;
+ left: -1px;
+ right: -1px;
+ bottom: -1px;
+ }
+/*
+A HORIZONTAL event
+*/
+.fc-h-event { /* allowed to be top-level */
+ display: block;
+ border: 1px solid #3788d8;
+ border: 1px solid var(--fc-event-border-color, #3788d8);
+ background-color: #3788d8;
+ background-color: var(--fc-event-bg-color, #3788d8)
-.fc .fc-week-number div {
- padding: 0 2px;
- }
-
-.fc-grid .fc-day-number {
- float: right;
- padding: 0 2px;
- }
-
-.fc-grid .fc-other-month .fc-day-number {
- opacity: 0.3;
- filter: alpha(opacity=30); /* for IE */
- /* opacity with small font can sometimes look too faded
- might want to set the 'color' property instead
- making day-numbers bold also fixes the problem */
- }
-
-.fc-grid .fc-day-content {
- clear: both;
- padding: 2px 2px 1px; /* distance between events and day edges */
- }
-
-/* event styles */
-
-.fc-grid .fc-event-time {
- font-weight: bold;
- }
-
-/* right-to-left */
-
-.fc-rtl .fc-grid .fc-day-number {
- float: left;
- }
-
-.fc-rtl .fc-grid .fc-event-time {
- float: right;
- }
-
-
-
-/* Agenda Week View, Agenda Day View
-------------------------------------------------------------------------*/
-
-.fc-agenda table {
- border-collapse: separate;
- }
-
-.fc-agenda-days th {
- text-align: center;
- }
-
-.fc-agenda .fc-agenda-axis {
- width: 50px;
- padding: 0 4px;
- vertical-align: middle;
- text-align: right;
- white-space: nowrap;
- font-weight: normal;
- }
-
-.fc-agenda .fc-week-number {
- font-weight: bold;
- }
-
-.fc-agenda .fc-day-content {
- padding: 2px 2px 1px;
- }
-
-/* make axis border take precedence */
-
-.fc-agenda-days .fc-agenda-axis {
- border-right-width: 1px;
- }
-
-.fc-agenda-days .fc-col0 {
- border-left-width: 0;
- }
-
-/* all-day area */
-
-.fc-agenda-allday th {
- border-width: 0 1px;
- }
-
-.fc-agenda-allday .fc-day-content {
- /*min-height: 34px; *//* TODO: doesnt work well in quirksmode */
- _height: 34px;
- }
-
-/* divider (between all-day and slots) */
-
-.fc-agenda-divider-inner {
- height: 2px;
- overflow: hidden;
- }
-
-.fc-widget-header .fc-agenda-divider-inner {
- background: #eee;
- }
-
-/* slot rows */
-
-.fc-agenda-slots th {
- border-width: 1px 1px 0;
- }
-
-.fc-agenda-slots td {
- border-width: 1px 0 0;
- background: none;
- }
-
-.fc-agenda-slots td div {
- height: 20px;
- }
-
-.fc-agenda-slots tr.fc-slot0 th,
-.fc-agenda-slots tr.fc-slot0 td {
- border-top-width: 0;
- }
-
-.fc-agenda-slots tr.fc-minor th,
-.fc-agenda-slots tr.fc-minor td {
- border-top-style: dotted;
- }
-
-.fc-agenda-slots tr.fc-minor th.ui-widget-header {
- *border-top-style: solid; /* doesn't work with background in IE6/7 */
- }
-
+}
+.fc-h-event .fc-event-main {
+ color: #fff;
+ color: var(--fc-event-text-color, #fff);
+ }
+.fc-h-event .fc-event-main-frame {
+ display: flex; /* for make fc-event-title-container expand */
+ }
+.fc-h-event .fc-event-time {
+ max-width: 100%; /* clip overflow on this element */
+ overflow: hidden;
+ }
+.fc-h-event .fc-event-title-container { /* serves as a container for the sticky cushion */
+ flex-grow: 1;
+ flex-shrink: 1;
+ min-width: 0; /* important for allowing to shrink all the way */
+ }
+.fc-h-event .fc-event-title {
+ display: inline-block; /* need this to be sticky cross-browser */
+ vertical-align: top; /* for not messing up line-height */
+ left: 0; /* for sticky */
+ right: 0; /* for sticky */
+ max-width: 100%; /* clip overflow on this element */
+ overflow: hidden;
+ }
+.fc-h-event.fc-event-selected:before {
+ /* expand hit area */
+ top: -10px;
+ bottom: -10px;
+ }
+/* adjust border and border-radius (if there is any) for non-start/end */
+.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),
+.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end) {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+ border-left-width: 0;
+}
+.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),
+.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start) {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+ border-right-width: 0;
+}
+/* resizers */
+.fc-h-event:not(.fc-event-selected) .fc-event-resizer {
+ top: 0;
+ bottom: 0;
+ width: 8px;
+ width: var(--fc-event-resizer-thickness, 8px);
+}
+.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,
+.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end {
+ cursor: w-resize;
+ left: -4px;
+ left: calc(-0.5 * var(--fc-event-resizer-thickness, 8px));
+}
+.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,
+.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start {
+ cursor: e-resize;
+ right: -4px;
+ right: calc(-0.5 * var(--fc-event-resizer-thickness, 8px));
+}
+/* resizers for TOUCH */
+.fc-h-event.fc-event-selected .fc-event-resizer {
+ top: 50%;
+ margin-top: -4px;
+ margin-top: calc(-0.5 * var(--fc-event-resizer-dot-total-width, 8px));
+}
+.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,
+.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end {
+ left: -4px;
+ left: calc(-0.5 * var(--fc-event-resizer-dot-total-width, 8px));
+}
+.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,
+.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start {
+ right: -4px;
+ right: calc(-0.5 * var(--fc-event-resizer-dot-total-width, 8px));
+}
+.fc .fc-popover {
+ position: absolute;
+ z-index: 9999;
+ box-shadow: 0 2px 6px rgba(0,0,0,.15);
+ }
+.fc .fc-popover-header {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ align-items: center;
+ padding: 3px 4px;
+ }
+.fc .fc-popover-title {
+ margin: 0 2px;
+ }
+.fc .fc-popover-close {
+ cursor: pointer;
+ opacity: 0.65;
+ font-size: 1.1em;
+ }
+.fc-theme-standard .fc-popover {
+ border: 1px solid #ddd;
+ border: 1px solid var(--fc-border-color, #ddd);
+ background: #fff;
+ background: var(--fc-page-bg-color, #fff);
+ }
+.fc-theme-standard .fc-popover-header {
+ background: rgba(208, 208, 208, 0.3);
+ background: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));
+ }
-/* Vertical Events
-------------------------------------------------------------------------*/
+:root {
+ --fc-daygrid-event-dot-width: 8px;
+}
+/* help things clear margins of inner content */
+.fc-daygrid-day-frame,
+.fc-daygrid-day-events,
+.fc-daygrid-event-harness { /* for event top/bottom margins */
+}
+.fc-daygrid-day-frame:before, .fc-daygrid-day-events:before, .fc-daygrid-event-harness:before {
+ content: "";
+ clear: both;
+ display: table; }
+.fc-daygrid-day-frame:after, .fc-daygrid-day-events:after, .fc-daygrid-event-harness:after {
+ content: "";
+ clear: both;
+ display: table; }
+.fc .fc-daygrid-body { /* a s can't do it */
+ }
+.fc .fc-daygrid-day.fc-day-today {
+ background-color: rgba(255, 220, 40, 0.15);
+ background-color: var(--fc-today-bg-color, rgba(255, 220, 40, 0.15));
+ }
+.fc .fc-daygrid-day-frame {
+ position: relative;
+ min-height: 100%; /* seems to work better than `height` because sets height after rows/cells naturally do it */
+ }
+.fc {
-.fc-event-vert {
- border-width: 0 1px;
- }
+ /* cell top */
-.fc-event-vert.fc-event-start {
- border-top-width: 1px;
- border-top-left-radius: 3px;
- border-top-right-radius: 3px;
- }
+}
+.fc .fc-daygrid-day-top {
+ display: flex;
+ flex-direction: row-reverse;
+ }
+.fc .fc-day-other .fc-daygrid-day-top {
+ opacity: 0.3;
+ }
+.fc {
-.fc-event-vert.fc-event-end {
- border-bottom-width: 1px;
- border-bottom-left-radius: 3px;
- border-bottom-right-radius: 3px;
- }
-
-.fc-event-vert .fc-event-time {
- white-space: nowrap;
- font-size: 10px;
- }
+ /* day number (within cell top) */
-.fc-event-vert .fc-event-inner {
- position: relative;
- z-index: 2;
- }
-
-.fc-event-vert .fc-event-bg { /* makes the event lighter w/ a semi-transparent overlay */
- position: absolute;
- z-index: 1;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: #fff;
- opacity: .25;
- filter: alpha(opacity=25);
- }
-
-.fc .ui-draggable-dragging .fc-event-bg, /* TODO: something nicer like .fc-opacity */
-.fc-select-helper .fc-event-bg {
- display: none\9; /* for IE6/7/8. nested opacity filters while dragging don't work */
- }
-
-/* resizable */
-
-.fc-event-vert .ui-resizable-s {
- bottom: 0 !important; /* importants override pre jquery ui 1.7 styles */
- width: 100% !important;
- height: 8px !important;
- overflow: hidden !important;
- line-height: 8px !important;
- font-size: 11px !important;
- font-family: monospace;
- text-align: center;
- cursor: s-resize;
- }
-
-.fc-agenda .ui-resizable-resizing { /* TODO: better selector */
- _overflow: hidden;
- }
-
-
+}
+.fc .fc-daygrid-day-number {
+ position: relative;
+ z-index: 4;
+ padding: 4px;
+ }
+.fc {
+
+ /* event container */
+
+}
+.fc .fc-daygrid-day-events {
+ margin-top: 1px; /* needs to be margin, not padding, so that available cell height can be computed */
+ }
+.fc {
+
+ /* positioning for balanced vs natural */
+
+}
+.fc .fc-daygrid-body-balanced .fc-daygrid-day-events {
+ position: absolute;
+ left: 0;
+ right: 0;
+ }
+.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events {
+ position: relative; /* for containing abs positioned event harnesses */
+ min-height: 2em; /* in addition to being a min-height during natural height, equalizes the heights a little bit */
+ }
+.fc .fc-daygrid-body-natural { /* can coexist with -unbalanced */
+ }
+.fc .fc-daygrid-body-natural .fc-daygrid-day-events {
+ margin-bottom: 1em;
+ }
+.fc {
+
+ /* event harness */
+
+}
+.fc .fc-daygrid-event-harness {
+ position: relative;
+ }
+.fc .fc-daygrid-event-harness-abs {
+ position: absolute;
+ top: 0; /* fallback coords for when cannot yet be computed */
+ left: 0; /* */
+ right: 0; /* */
+ }
+.fc .fc-daygrid-bg-harness {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ }
+.fc {
+
+ /* bg content */
+
+}
+.fc .fc-daygrid-day-bg .fc-non-business { z-index: 1 }
+.fc .fc-daygrid-day-bg .fc-bg-event { z-index: 2 }
+.fc .fc-daygrid-day-bg .fc-highlight { z-index: 3 }
+.fc {
+
+ /* events */
+
+}
+.fc .fc-daygrid-event {
+ z-index: 6;
+ margin-top: 1px;
+ }
+.fc .fc-daygrid-event.fc-event-mirror {
+ z-index: 7;
+ }
+.fc {
+
+ /* cell bottom (within day-events) */
+
+}
+.fc .fc-daygrid-day-bottom {
+ font-size: .85em;
+ padding: 2px 3px 0
+ }
+.fc .fc-daygrid-day-bottom:before {
+ content: "";
+ clear: both;
+ display: table; }
+.fc .fc-daygrid-more-link {
+ position: relative;
+ z-index: 4;
+ cursor: pointer;
+ }
+.fc {
+
+ /* week number (within frame) */
+
+}
+.fc .fc-daygrid-week-number {
+ position: absolute;
+ z-index: 5;
+ top: 0;
+ padding: 2px;
+ min-width: 1.5em;
+ text-align: center;
+ background-color: rgba(208, 208, 208, 0.3);
+ background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));
+ color: #808080;
+ color: var(--fc-neutral-text-color, #808080);
+ }
+.fc {
+
+ /* popover */
+
+}
+.fc .fc-more-popover .fc-popover-body {
+ min-width: 220px;
+ padding: 10px;
+ }
+.fc-direction-ltr .fc-daygrid-event.fc-event-start,
+.fc-direction-rtl .fc-daygrid-event.fc-event-end {
+ margin-left: 2px;
+}
+.fc-direction-ltr .fc-daygrid-event.fc-event-end,
+.fc-direction-rtl .fc-daygrid-event.fc-event-start {
+ margin-right: 2px;
+}
+.fc-direction-ltr .fc-daygrid-week-number {
+ left: 0;
+ border-radius: 0 0 3px 0;
+ }
+.fc-direction-rtl .fc-daygrid-week-number {
+ right: 0;
+ border-radius: 0 0 0 3px;
+ }
+.fc-liquid-hack .fc-daygrid-day-frame {
+ position: static; /* will cause inner absolute stuff to expand to */
+ }
+.fc-daygrid-event { /* make root-level, because will be dragged-and-dropped outside of a component root */
+ position: relative; /* for z-indexes assigned later */
+ white-space: normal;
+ border-radius: 3px; /* dot event needs this to when selected */
+ font-size: .85em;
+ font-size: var(--fc-small-font-size, .85em);
+}
+/* --- the rectangle ("block") style of event --- */
+.fc-daygrid-block-event .fc-event-time {
+ font-weight: bold;
+ }
+.fc-daygrid-block-event .fc-event-time,
+ .fc-daygrid-block-event .fc-event-title {
+ padding: 1px;
+ }
+/* --- the dot style of event --- */
+.fc-daygrid-dot-event {
+ display: flex;
+ align-items: center;
+ padding: 2px 0
+
+}
+.fc-daygrid-dot-event .fc-event-title {
+ flex-grow: 1;
+ flex-shrink: 1;
+ min-width: 0; /* important for allowing to shrink all the way */
+ overflow: hidden;
+ font-weight: bold;
+ }
+.fc-daygrid-dot-event:hover,
+ .fc-daygrid-dot-event.fc-event-mirror {
+ background: rgba(0, 0, 0, 0.1);
+ }
+.fc-daygrid-dot-event.fc-event-selected:before {
+ /* expand hit area */
+ top: -10px;
+ bottom: -10px;
+ }
+.fc-daygrid-event-dot { /* the actual dot */
+ margin: 0 4px;
+ box-sizing: content-box;
+ width: 0;
+ height: 0;
+ border: 4px solid #3788d8;
+ border: calc(var(--fc-daygrid-event-dot-width, 8px) / 2) solid var(--fc-event-border-color, #3788d8);
+ border-radius: 4px;
+ border-radius: calc(var(--fc-daygrid-event-dot-width, 8px) / 2);
+}
+/* --- spacing between time and title --- */
+.fc-direction-ltr .fc-daygrid-event .fc-event-time {
+ margin-right: 3px;
+ }
+.fc-direction-rtl .fc-daygrid-event .fc-event-time {
+ margin-left: 3px;
+ }
+
+
+/*
+A VERTICAL event
+*/
+
+.fc-v-event { /* allowed to be top-level */
+ display: block;
+ border: 1px solid #3788d8;
+ border: 1px solid var(--fc-event-border-color, #3788d8);
+ background-color: #3788d8;
+ background-color: var(--fc-event-bg-color, #3788d8)
+
+}
+
+.fc-v-event .fc-event-main {
+ color: #fff;
+ color: var(--fc-event-text-color, #fff);
+ height: 100%;
+ }
+
+.fc-v-event .fc-event-main-frame {
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ }
+
+.fc-v-event .fc-event-time {
+ flex-grow: 0;
+ flex-shrink: 0;
+ max-height: 100%;
+ overflow: hidden;
+ }
+
+.fc-v-event .fc-event-title-container { /* a container for the sticky cushion */
+ flex-grow: 1;
+ flex-shrink: 1;
+ min-height: 0; /* important for allowing to shrink all the way */
+ }
+
+.fc-v-event .fc-event-title { /* will have fc-sticky on it */
+ top: 0;
+ bottom: 0;
+ max-height: 100%; /* clip overflow */
+ overflow: hidden;
+ }
+
+.fc-v-event:not(.fc-event-start) {
+ border-top-width: 0;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+ }
+
+.fc-v-event:not(.fc-event-end) {
+ border-bottom-width: 0;
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0;
+ }
+
+.fc-v-event.fc-event-selected:before {
+ /* expand hit area */
+ left: -10px;
+ right: -10px;
+ }
+
+.fc-v-event {
+
+ /* resizer (mouse AND touch) */
+
+}
+
+.fc-v-event .fc-event-resizer-start {
+ cursor: n-resize;
+ }
+
+.fc-v-event .fc-event-resizer-end {
+ cursor: s-resize;
+ }
+
+.fc-v-event {
+
+ /* resizer for MOUSE */
+
+}
+
+.fc-v-event:not(.fc-event-selected) .fc-event-resizer {
+ height: 8px;
+ height: var(--fc-event-resizer-thickness, 8px);
+ left: 0;
+ right: 0;
+ }
+
+.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start {
+ top: -4px;
+ top: calc(var(--fc-event-resizer-thickness, 8px) / -2);
+ }
+
+.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end {
+ bottom: -4px;
+ bottom: calc(var(--fc-event-resizer-thickness, 8px) / -2);
+ }
+
+.fc-v-event {
+
+ /* resizer for TOUCH (when event is "selected") */
+
+}
+
+.fc-v-event.fc-event-selected .fc-event-resizer {
+ left: 50%;
+ margin-left: -4px;
+ margin-left: calc(var(--fc-event-resizer-dot-total-width, 8px) / -2);
+ }
+
+.fc-v-event.fc-event-selected .fc-event-resizer-start {
+ top: -4px;
+ top: calc(var(--fc-event-resizer-dot-total-width, 8px) / -2);
+ }
+
+.fc-v-event.fc-event-selected .fc-event-resizer-end {
+ bottom: -4px;
+ bottom: calc(var(--fc-event-resizer-dot-total-width, 8px) / -2);
+ }
+.fc .fc-timegrid .fc-daygrid-body { /* the all-day daygrid within the timegrid view */
+ z-index: 2; /* put above the timegrid-body so that more-popover is above everything. TODO: better solution */
+ }
+.fc .fc-timegrid-divider {
+ padding: 0 0 2px; /* browsers get confused when you set height. use padding instead */
+ }
+.fc .fc-timegrid-body {
+ position: relative;
+ z-index: 1; /* scope the z-indexes of slots and cols */
+ min-height: 100%; /* fill height always, even when slat table doesn't grow */
+ }
+.fc .fc-timegrid-axis-chunk { /* for advanced ScrollGrid */
+ position: relative /* offset parent for now-indicator-container */
+
+ }
+.fc .fc-timegrid-axis-chunk > table {
+ position: relative;
+ z-index: 1; /* above the now-indicator-container */
+ }
+.fc .fc-timegrid-slots {
+ position: relative;
+ z-index: 1;
+ }
+.fc .fc-timegrid-slot { /* a */
+ height: 1.5em;
+ border-bottom: 0 /* each cell owns its top border */
+ }
+.fc .fc-timegrid-slot:empty:before {
+ content: '\00a0'; /* make sure there's at least an empty space to create height for height syncing */
+ }
+.fc .fc-timegrid-slot-minor {
+ border-top-style: dotted;
+ }
+.fc .fc-timegrid-slot-label-cushion {
+ display: inline-block;
+ white-space: normal;
+ }
+.fc .fc-timegrid-slot-label {
+ vertical-align: middle; /* vertical align the slots */
+ }
+.fc {
+
+
+ /* slots AND axis cells (top-left corner of view including the "all-day" text) */
+
+}
+.fc .fc-timegrid-axis-cushion,
+ .fc .fc-timegrid-slot-label-cushion {
+ padding: 0 4px;
+ }
+.fc {
+
+
+ /* axis cells (top-left corner of view including the "all-day" text) */
+ /* vertical align is more complicated, uses flexbox */
+
+}
+.fc .fc-timegrid-axis-frame-liquid {
+ height: 100%; /* will need liquid-hack in FF */
+ }
+.fc .fc-timegrid-axis-frame {
+ overflow: hidden;
+ display: flex;
+ align-items: center; /* vertical align */
+ justify-content: flex-end; /* horizontal align. matches text-align below */
+ }
+.fc .fc-timegrid-axis-cushion {
+ max-width: 60px; /* limits the width of the "all-day" text */
+ flex-shrink: 0; /* allows text to expand how it normally would, regardless of constrained width */
+ }
+.fc-direction-ltr .fc-timegrid-slot-label-frame {
+ text-align: right;
+ }
+.fc-direction-rtl .fc-timegrid-slot-label-frame {
+ text-align: left;
+ }
+.fc-liquid-hack .fc-timegrid-axis-frame-liquid {
+ height: auto;
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+.fc .fc-timegrid-col.fc-day-today {
+ background-color: rgba(255, 220, 40, 0.15);
+ background-color: var(--fc-today-bg-color, rgba(255, 220, 40, 0.15));
+ }
+.fc .fc-timegrid-col-frame {
+ min-height: 100%; /* liquid-hack is below */
+ position: relative;
+ }
+.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame {
+ height: auto;
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+.fc-media-screen .fc-timegrid-cols {
+ position: absolute; /* no z-index. children will decide and go above slots */
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0
+ }
+.fc-media-screen .fc-timegrid-cols > table {
+ height: 100%;
+ }
+.fc-media-screen .fc-timegrid-col-bg,
+ .fc-media-screen .fc-timegrid-col-events,
+ .fc-media-screen .fc-timegrid-now-indicator-container {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ }
+.fc {
+
+ /* bg */
+
+}
+.fc .fc-timegrid-col-bg {
+ z-index: 2; /* TODO: kill */
+ }
+.fc .fc-timegrid-col-bg .fc-non-business { z-index: 1 }
+.fc .fc-timegrid-col-bg .fc-bg-event { z-index: 2 }
+.fc .fc-timegrid-col-bg .fc-highlight { z-index: 3 }
+.fc .fc-timegrid-bg-harness {
+ position: absolute; /* top/bottom will be set by JS */
+ left: 0;
+ right: 0;
+ }
+.fc {
+
+ /* fg events */
+ /* (the mirror segs are put into a separate container with same classname, */
+ /* and they must be after the normal seg container to appear at a higher z-index) */
+
+}
+.fc .fc-timegrid-col-events {
+ z-index: 3;
+ /* child event segs have z-indexes that are scoped within this div */
+ }
+.fc {
+
+ /* now indicator */
+
+}
+.fc .fc-timegrid-now-indicator-container {
+ bottom: 0;
+ overflow: hidden; /* don't let overflow of lines/arrows cause unnecessary scrolling */
+ /* z-index is set on the individual elements */
+ }
+.fc-direction-ltr .fc-timegrid-col-events {
+ margin: 0 2.5% 0 2px;
+ }
+.fc-direction-rtl .fc-timegrid-col-events {
+ margin: 0 2px 0 2.5%;
+ }
+.fc-timegrid-event-harness {
+ position: absolute /* top/left/right/bottom will all be set by JS */
+}
+.fc-timegrid-event-harness > .fc-timegrid-event {
+ position: absolute; /* absolute WITHIN the harness */
+ top: 0; /* for when not yet positioned */
+ bottom: 0; /* " */
+ left: 0;
+ right: 0;
+ }
+.fc-timegrid-event-harness-inset .fc-timegrid-event,
+.fc-timegrid-event.fc-event-mirror,
+.fc-timegrid-more-link {
+ box-shadow: 0px 0px 0px 1px #fff;
+ box-shadow: 0px 0px 0px 1px var(--fc-page-bg-color, #fff);
+}
+.fc-timegrid-event,
+.fc-timegrid-more-link { /* events need to be root */
+ font-size: .85em;
+ font-size: var(--fc-small-font-size, .85em);
+ border-radius: 3px;
+}
+.fc-timegrid-event { /* events need to be root */
+ margin-bottom: 1px /* give some space from bottom */
+}
+.fc-timegrid-event .fc-event-main {
+ padding: 1px 1px 0;
+ }
+.fc-timegrid-event .fc-event-time {
+ white-space: normal;
+ font-size: .85em;
+ font-size: var(--fc-small-font-size, .85em);
+ margin-bottom: 1px;
+ }
+.fc-timegrid-event-short .fc-event-main-frame {
+ flex-direction: row;
+ overflow: hidden;
+ }
+.fc-timegrid-event-short .fc-event-time:after {
+ content: '\00a0-\00a0'; /* dash surrounded by non-breaking spaces */
+ }
+.fc-timegrid-event-short .fc-event-title {
+ font-size: .85em;
+ font-size: var(--fc-small-font-size, .85em)
+ }
+.fc-timegrid-more-link { /* does NOT inherit from fc-timegrid-event */
+ position: absolute;
+ z-index: 9999; /* hack */
+ color: inherit;
+ color: var(--fc-more-link-text-color, inherit);
+ background: #d0d0d0;
+ background: var(--fc-more-link-bg-color, #d0d0d0);
+ cursor: pointer;
+ margin-bottom: 1px; /* match space below fc-timegrid-event */
+}
+.fc-timegrid-more-link-inner { /* has fc-sticky */
+ padding: 3px 2px;
+ top: 0;
+}
+.fc-direction-ltr .fc-timegrid-more-link {
+ right: 0;
+ }
+.fc-direction-rtl .fc-timegrid-more-link {
+ left: 0;
+ }
+.fc {
+
+ /* line */
+
+}
+.fc .fc-timegrid-now-indicator-line {
+ position: absolute;
+ z-index: 4;
+ left: 0;
+ right: 0;
+ border-style: solid;
+ border-color: red;
+ border-color: var(--fc-now-indicator-color, red);
+ border-width: 1px 0 0;
+ }
+.fc {
+
+ /* arrow */
+
+}
+.fc .fc-timegrid-now-indicator-arrow {
+ position: absolute;
+ z-index: 4;
+ margin-top: -5px; /* vertically center on top coordinate */
+ border-style: solid;
+ border-color: red;
+ border-color: var(--fc-now-indicator-color, red);
+ }
+.fc-direction-ltr .fc-timegrid-now-indicator-arrow {
+ left: 0;
+
+ /* triangle pointing right. TODO: mixin */
+ border-width: 5px 0 5px 6px;
+ border-top-color: transparent;
+ border-bottom-color: transparent;
+ }
+.fc-direction-rtl .fc-timegrid-now-indicator-arrow {
+ right: 0;
+
+ /* triangle pointing left. TODO: mixin */
+ border-width: 5px 6px 5px 0;
+ border-top-color: transparent;
+ border-bottom-color: transparent;
+ }
+
+
+:root {
+ --fc-list-event-dot-width: 10px;
+ --fc-list-event-hover-bg-color: #f5f5f5;
+}
+.fc-theme-standard .fc-list {
+ border: 1px solid #ddd;
+ border: 1px solid var(--fc-border-color, #ddd);
+ }
+.fc {
+
+ /* message when no events */
+
+}
+.fc .fc-list-empty {
+ background-color: rgba(208, 208, 208, 0.3);
+ background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));
+ height: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center; /* vertically aligns fc-list-empty-inner */
+ }
+.fc .fc-list-empty-cushion {
+ margin: 5em 0;
+ }
+.fc {
+
+ /* table within the scroller */
+ /* ---------------------------------------------------------------------------------------------------- */
+
+}
+.fc .fc-list-table {
+ width: 100%;
+ border-style: hidden; /* kill outer border on theme */
+ }
+.fc .fc-list-table tr > * {
+ border-left: 0;
+ border-right: 0;
+ }
+.fc .fc-list-sticky .fc-list-day > * { /* the cells */
+ position: sticky;
+ top: 0;
+ background: #fff;
+ background: var(--fc-page-bg-color, #fff); /* for when headers are styled to be transparent and sticky */
+ }
+.fc {
+
+ /* only exists for aria reasons, hide for non-screen-readers */
+
+}
+.fc .fc-list-table thead {
+ position: absolute;
+ left: -10000px;
+ }
+.fc {
+
+ /* the table's border-style:hidden gets confused by hidden thead. force-hide top border of first cell */
+
+}
+.fc .fc-list-table tbody > tr:first-child th {
+ border-top: 0;
+ }
+.fc .fc-list-table th {
+ padding: 0; /* uses an inner-wrapper instead... */
+ }
+.fc .fc-list-table td,
+ .fc .fc-list-day-cushion {
+ padding: 8px 14px;
+ }
+.fc {
+
+
+ /* date heading rows */
+ /* ---------------------------------------------------------------------------------------------------- */
+
+}
+.fc .fc-list-day-cushion:after {
+ content: "";
+ clear: both;
+ display: table; /* clear floating */
+ }
+.fc-theme-standard .fc-list-day-cushion {
+ background-color: rgba(208, 208, 208, 0.3);
+ background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));
+ }
+.fc-direction-ltr .fc-list-day-text,
+.fc-direction-rtl .fc-list-day-side-text {
+ float: left;
+}
+.fc-direction-ltr .fc-list-day-side-text,
+.fc-direction-rtl .fc-list-day-text {
+ float: right;
+}
+/* make the dot closer to the event title */
+.fc-direction-ltr .fc-list-table .fc-list-event-graphic { padding-right: 0 }
+.fc-direction-rtl .fc-list-table .fc-list-event-graphic { padding-left: 0 }
+.fc .fc-list-event.fc-event-forced-url {
+ cursor: pointer; /* whole row will seem clickable */
+ }
+.fc .fc-list-event:hover td {
+ background-color: #f5f5f5;
+ background-color: var(--fc-list-event-hover-bg-color, #f5f5f5);
+ }
+.fc {
+
+ /* shrink certain cols */
+
+}
+.fc .fc-list-event-graphic,
+ .fc .fc-list-event-time {
+ white-space: normal;
+ width: 1px;
+ }
+.fc .fc-list-event-dot {
+ display: inline-block;
+ box-sizing: content-box;
+ width: 0;
+ height: 0;
+ border: 5px solid #3788d8;
+ border: calc(var(--fc-list-event-dot-width, 10px) / 2) solid var(--fc-event-border-color, #3788d8);
+ border-radius: 5px;
+ border-radius: calc(var(--fc-list-event-dot-width, 10px) / 2);
+ }
+.fc {
+
+ /* reset styling */
+
+}
+.fc .fc-list-event-title a {
+ color: inherit;
+ text-decoration: none;
+ }
+.fc {
+
+ /* underline link when hovering over any part of row */
+
+}
+.fc .fc-list-event.fc-event-forced-url:hover a {
+ text-decoration: underline;
+ }
+
+
+
+ .fc-theme-bootstrap a:not([href]) {
+ color: inherit; /* natural color for navlinks */
+ }
+
+
+
+ .fc-theme-bootstrap5 a:not([href]) {
+ color: inherit;
+ text-decoration: inherit;
+ }
+
+.fc-theme-bootstrap5 .fc-list,
+ .fc-theme-bootstrap5 .fc-scrollgrid,
+ .fc-theme-bootstrap5 td,
+ .fc-theme-bootstrap5 th {
+ border: 1px solid var(--bs-gray-400);
+ }
+
+.fc-theme-bootstrap5 {
+
+ /* HACK: reapply core styles after highe-precedence border statement above */
+}
+
+.fc-theme-bootstrap5 .fc-scrollgrid {
+ border-right-width: 0;
+ border-bottom-width: 0;
+ }
+
+.fc-theme-bootstrap5-shaded {
+ background-color: var(--bs-gray-200);
+}
\ No newline at end of file
diff --git a/app/assets/stylesheets/fullcalendar_old.css b/app/assets/stylesheets/fullcalendar_old.css
new file mode 100644
index 0000000..c9add0b
--- /dev/null
+++ b/app/assets/stylesheets/fullcalendar_old.css
@@ -0,0 +1,579 @@
+/*!
+ * FullCalendar v1.6.1 Stylesheet
+ * Docs & License: http://arshaw.com/fullcalendar/
+ * (c) 2013 Adam Shaw
+ */
+
+
+.fc {
+ direction: ltr;
+ text-align: left;
+ }
+
+.fc table {
+ border-collapse: collapse;
+ border-spacing: 0;
+ }
+
+html .fc,
+.fc table {
+ font-size: 1em;
+ }
+
+.fc td,
+.fc th {
+ padding: 0;
+ vertical-align: top;
+ }
+
+
+
+/* Header
+------------------------------------------------------------------------*/
+
+.fc-header td {
+ white-space: nowrap;
+ }
+
+.fc-header-left {
+ width: 25%;
+ text-align: left;
+ }
+
+.fc-header-center {
+ text-align: center;
+ }
+
+.fc-header-right {
+ width: 25%;
+ text-align: right;
+ }
+
+.fc-header-title {
+ display: inline-block;
+ vertical-align: top;
+ }
+
+.fc-header-title h2 {
+ margin-top: 0;
+ white-space: nowrap;
+ }
+
+.fc .fc-header-space {
+ padding-left: 10px;
+ }
+
+.fc-header .fc-button {
+ margin-bottom: 1em;
+ vertical-align: top;
+ }
+
+/* buttons edges butting together */
+
+.fc-header .fc-button {
+ margin-right: -1px;
+ }
+
+.fc-header .fc-corner-right, /* non-theme */
+.fc-header .ui-corner-right { /* theme */
+ margin-right: 0; /* back to normal */
+ }
+
+/* button layering (for border precedence) */
+
+.fc-header .fc-state-hover,
+.fc-header .ui-state-hover {
+ z-index: 2;
+ }
+
+.fc-header .fc-state-down {
+ z-index: 3;
+ }
+
+.fc-header .fc-state-active,
+.fc-header .ui-state-active {
+ z-index: 4;
+ }
+
+
+
+/* Content
+------------------------------------------------------------------------*/
+
+.fc-content {
+ clear: both;
+ }
+
+.fc-view {
+ width: 100%; /* needed for view switching (when view is absolute) */
+ overflow: hidden;
+ }
+
+
+
+/* Cell Styles
+------------------------------------------------------------------------*/
+
+.fc-widget-header, /* , usually */
+.fc-widget-content { /* , usually */
+ border: 1px solid #ddd;
+ }
+
+.fc-state-highlight { /* today cell */ /* TODO: add .fc-today to */
+ background: #fcf8e3;
+ }
+
+.fc-cell-overlay { /* semi-transparent rectangle while dragging */
+ background: #bce8f1;
+ opacity: .3;
+ filter: alpha(opacity=30); /* for IE */
+ }
+
+
+
+/* Buttons
+------------------------------------------------------------------------*/
+
+.fc-button {
+ position: relative;
+ display: inline-block;
+ padding: 0 .6em;
+ overflow: hidden;
+ height: 1.9em;
+ line-height: 1.9em;
+ white-space: nowrap;
+ cursor: pointer;
+ }
+
+.fc-state-default { /* non-theme */
+ border: 1px solid;
+ }
+
+.fc-state-default.fc-corner-left { /* non-theme */
+ border-top-left-radius: 4px;
+ border-bottom-left-radius: 4px;
+ }
+
+.fc-state-default.fc-corner-right { /* non-theme */
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 4px;
+ }
+
+/*
+ Our default prev/next buttons use HTML entities like ‹ › « »
+ and we'll try to make them look good cross-browser.
+*/
+
+.fc-text-arrow {
+ margin: 0 .1em;
+ font-size: 2em;
+ font-family: "Courier New", Courier, monospace;
+ vertical-align: baseline; /* for IE7 */
+ }
+
+.fc-button-prev .fc-text-arrow,
+.fc-button-next .fc-text-arrow { /* for ‹ › */
+ font-weight: bold;
+ }
+
+/* icon (for jquery ui) */
+
+.fc-button .fc-icon-wrap {
+ position: relative;
+ float: left;
+ top: 50%;
+ }
+
+.fc-button .ui-icon {
+ position: relative;
+ float: left;
+ margin-top: -50%;
+ *margin-top: 0;
+ *top: -50%;
+ }
+
+/*
+ button states
+ borrowed from twitter bootstrap (http://twitter.github.com/bootstrap/)
+*/
+
+.fc-state-default {
+ background-color: #f5f5f5;
+ background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
+ background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
+ background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+ background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
+ background-repeat: repeat-x;
+ border-color: #e6e6e6 #e6e6e6 #bfbfbf;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ color: #333;
+ text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ }
+
+.fc-state-hover,
+.fc-state-down,
+.fc-state-active,
+.fc-state-disabled {
+ color: #333333;
+ background-color: #e6e6e6;
+ }
+
+.fc-state-hover {
+ color: #333333;
+ text-decoration: none;
+ background-position: 0 -15px;
+ -webkit-transition: background-position 0.1s linear;
+ -moz-transition: background-position 0.1s linear;
+ -o-transition: background-position 0.1s linear;
+ transition: background-position 0.1s linear;
+ }
+
+.fc-state-down,
+.fc-state-active {
+ background-color: #cccccc;
+ background-image: none;
+ outline: 0;
+ box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ }
+
+.fc-state-disabled {
+ cursor: default;
+ background-image: none;
+ opacity: 0.65;
+ filter: alpha(opacity=65);
+ box-shadow: none;
+ }
+
+
+
+/* Global Event Styles
+------------------------------------------------------------------------*/
+
+.fc-event {
+ border: 1px solid #3a87ad; /* default BORDER color */
+ background-color: #3a87ad; /* default BACKGROUND color */
+ color: #fff; /* default TEXT color */
+ font-size: .85em;
+ cursor: default;
+ }
+
+a.fc-event {
+ text-decoration: none;
+ }
+
+a.fc-event,
+.fc-event-draggable {
+ cursor: pointer;
+ }
+
+.fc-rtl .fc-event {
+ text-align: right;
+ }
+
+.fc-event-inner {
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ }
+
+.fc-event-time,
+.fc-event-title {
+ padding: 0 1px;
+ }
+
+.fc .ui-resizable-handle {
+ display: block;
+ position: absolute;
+ z-index: 99999;
+ overflow: hidden; /* hacky spaces (IE6/7) */
+ font-size: 300%; /* */
+ line-height: 50%; /* */
+ }
+
+
+
+/* Horizontal Events
+------------------------------------------------------------------------*/
+
+.fc-event-hori {
+ border-width: 1px 0;
+ margin-bottom: 1px;
+ }
+
+.fc-ltr .fc-event-hori.fc-event-start,
+.fc-rtl .fc-event-hori.fc-event-end {
+ border-left-width: 1px;
+ border-top-left-radius: 3px;
+ border-bottom-left-radius: 3px;
+ }
+
+.fc-ltr .fc-event-hori.fc-event-end,
+.fc-rtl .fc-event-hori.fc-event-start {
+ border-right-width: 1px;
+ border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+ }
+
+/* resizable */
+
+.fc-event-hori .ui-resizable-e {
+ top: 0 !important; /* importants override pre jquery ui 1.7 styles */
+ right: -3px !important;
+ width: 7px !important;
+ height: 100% !important;
+ cursor: e-resize;
+ }
+
+.fc-event-hori .ui-resizable-w {
+ top: 0 !important;
+ left: -3px !important;
+ width: 7px !important;
+ height: 100% !important;
+ cursor: w-resize;
+ }
+
+.fc-event-hori .ui-resizable-handle {
+ _padding-bottom: 14px; /* IE6 had 0 height */
+ }
+
+
+
+/* Reusable Separate-border Table
+------------------------------------------------------------*/
+
+table.fc-border-separate {
+ border-collapse: separate;
+ }
+
+.fc-border-separate th,
+.fc-border-separate td {
+ border-width: 1px 0 0 1px;
+ }
+
+.fc-border-separate th.fc-last,
+.fc-border-separate td.fc-last {
+ border-right-width: 1px;
+ }
+
+.fc-border-separate tr.fc-last th,
+.fc-border-separate tr.fc-last td {
+ border-bottom-width: 1px;
+ }
+
+.fc-border-separate tbody tr.fc-first td,
+.fc-border-separate tbody tr.fc-first th {
+ border-top-width: 0;
+ }
+
+
+
+/* Month View, Basic Week View, Basic Day View
+------------------------------------------------------------------------*/
+
+.fc-grid th {
+ text-align: center;
+ }
+
+.fc .fc-week-number {
+ width: 22px;
+ text-align: center;
+ }
+
+.fc .fc-week-number div {
+ padding: 0 2px;
+ }
+
+.fc-grid .fc-day-number {
+ float: right;
+ padding: 0 2px;
+ }
+
+.fc-grid .fc-other-month .fc-day-number {
+ opacity: 0.3;
+ filter: alpha(opacity=30); /* for IE */
+ /* opacity with small font can sometimes look too faded
+ might want to set the 'color' property instead
+ making day-numbers bold also fixes the problem */
+ }
+
+.fc-grid .fc-day-content {
+ clear: both;
+ padding: 2px 2px 1px; /* distance between events and day edges */
+ }
+
+/* event styles */
+
+.fc-grid .fc-event-time {
+ font-weight: bold;
+ }
+
+/* right-to-left */
+
+.fc-rtl .fc-grid .fc-day-number {
+ float: left;
+ }
+
+.fc-rtl .fc-grid .fc-event-time {
+ float: right;
+ }
+
+
+
+/* Agenda Week View, Agenda Day View
+------------------------------------------------------------------------*/
+
+.fc-agenda table {
+ border-collapse: separate;
+ }
+
+.fc-agenda-days th {
+ text-align: center;
+ }
+
+.fc-agenda .fc-agenda-axis {
+ width: 50px;
+ padding: 0 4px;
+ vertical-align: middle;
+ text-align: right;
+ white-space: nowrap;
+ font-weight: normal;
+ }
+
+.fc-agenda .fc-week-number {
+ font-weight: bold;
+ }
+
+.fc-agenda .fc-day-content {
+ padding: 2px 2px 1px;
+ }
+
+/* make axis border take precedence */
+
+.fc-agenda-days .fc-agenda-axis {
+ border-right-width: 1px;
+ }
+
+.fc-agenda-days .fc-col0 {
+ border-left-width: 0;
+ }
+
+/* all-day area */
+
+.fc-agenda-allday th {
+ border-width: 0 1px;
+ }
+
+.fc-agenda-allday .fc-day-content {
+ /*min-height: 34px; *//* TODO: doesnt work well in quirksmode */
+ _height: 34px;
+ }
+
+/* divider (between all-day and slots) */
+
+.fc-agenda-divider-inner {
+ height: 2px;
+ overflow: hidden;
+ }
+
+.fc-widget-header .fc-agenda-divider-inner {
+ background: #eee;
+ }
+
+/* slot rows */
+
+.fc-agenda-slots th {
+ border-width: 1px 1px 0;
+ }
+
+.fc-agenda-slots td {
+ border-width: 1px 0 0;
+ background: none;
+ }
+
+.fc-agenda-slots td div {
+ height: 20px;
+ }
+
+.fc-agenda-slots tr.fc-slot0 th,
+.fc-agenda-slots tr.fc-slot0 td {
+ border-top-width: 0;
+ }
+
+.fc-agenda-slots tr.fc-minor th,
+.fc-agenda-slots tr.fc-minor td {
+ border-top-style: dotted;
+ }
+
+.fc-agenda-slots tr.fc-minor th.ui-widget-header {
+ *border-top-style: solid; /* doesn't work with background in IE6/7 */
+ }
+
+
+
+/* Vertical Events
+------------------------------------------------------------------------*/
+
+.fc-event-vert {
+ border-width: 0 1px;
+ }
+
+.fc-event-vert.fc-event-start {
+ border-top-width: 1px;
+ border-top-left-radius: 3px;
+ border-top-right-radius: 3px;
+ }
+
+.fc-event-vert.fc-event-end {
+ border-bottom-width: 1px;
+ border-bottom-left-radius: 3px;
+ border-bottom-right-radius: 3px;
+ }
+
+.fc-event-vert .fc-event-time {
+ white-space: nowrap;
+ font-size: 10px;
+ }
+
+.fc-event-vert .fc-event-inner {
+ position: relative;
+ z-index: 2;
+ }
+
+.fc-event-vert .fc-event-bg { /* makes the event lighter w/ a semi-transparent overlay */
+ position: absolute;
+ z-index: 1;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background: #fff;
+ opacity: .25;
+ filter: alpha(opacity=25);
+ }
+
+.fc .ui-draggable-dragging .fc-event-bg, /* TODO: something nicer like .fc-opacity */
+.fc-select-helper .fc-event-bg {
+ display: none\9; /* for IE6/7/8. nested opacity filters while dragging don't work */
+ }
+
+/* resizable */
+
+.fc-event-vert .ui-resizable-s {
+ bottom: 0 !important; /* importants override pre jquery ui 1.7 styles */
+ width: 100% !important;
+ height: 8px !important;
+ overflow: hidden !important;
+ line-height: 8px !important;
+ font-size: 11px !important;
+ font-family: monospace;
+ text-align: center;
+ cursor: s-resize;
+ }
+
+.fc-agenda .ui-resizable-resizing { /* TODO: better selector */
+ _overflow: hidden;
+ }
+
+
diff --git a/app/controllers/admin/calendars_controller.rb b/app/controllers/admin/calendars_controller.rb
index 5ca2bbb..9f28783 100644
--- a/app/controllers/admin/calendars_controller.rb
+++ b/app/controllers/admin/calendars_controller.rb
@@ -114,10 +114,9 @@ class Admin::CalendarsController < OrbitAdminController
@event = Event.new(p)
if @event.present? && @event.save
- e = @event.to_json
- e = JSON.parse(e)
- e["can_edit"] = true
- render json: e.to_json
+ event_json = @event.as_json
+ event_json["can_edit"] = true
+ render json: event_json.to_json
else
respond_to do |format|
format.html { render action: "new" }
diff --git a/app/models/event.rb b/app/models/event.rb
index 13a600e..a604430 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -83,8 +83,7 @@ class Event
if cat_ids.blank?
self.all
else
- type_ids = CalendarType.where(:category_id.in=>cat_ids).pluck(:id)
- self.where(:calendar_type_id.in => type_ids)
+ self.where(:calendar_type_id.in => cat_ids)
end
end
def bulletin
@@ -107,24 +106,26 @@ class Event
:id => self.id.to_s,
:title => self.title,
:note => self.note || "",
- :start => self.start.rfc822,
- :end => self.end.rfc822,
+ :start => self.start.to_json.gsub('"',''),
+ :end => self.end.to_json.gsub('"',''),
:allDay => self.all_day,
:recurring => self.recurring,
:calendar => self.calendar_type_id.to_s,
- :color => (self.calendar_type.color rescue nil)
+ :color => (self.calendar_type.color rescue nil),
+ :diff_day => self.all_day
}
else
{
:id => self.id.to_s,
:title => self.title,
:note => self.note || "",
- :start => self.start.rfc822,
- :end => self.end.rfc822,
+ :start => self.start.to_json.gsub('"',''),
+ :end => self.end.to_json.gsub('"',''),
:allDay => self.all_day,
:recurring => self.recurring,
:calendar => self.calendar_type_id.to_s,
:color => (self.calendar_type.color rescue nil),
+ :diff_day => self.all_day,
:edit_url => Rails.application.routes.url_helpers.edit_admin_calendar_path(:locale=>I18n.locale, :id=>self.id),
:delete_url => Rails.application.routes.url_helpers.admin_calendar_path(:locale=>I18n.locale, :id=>self.id)
}