3 lines
3.1 KiB
JavaScript
3 lines
3.1 KiB
JavaScript
"use strict";function _classCallCheck(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,a){for(var t=0;t<a.length;t++){var n=a[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,a,t){return a&&_defineProperties(e.prototype,a),t&&_defineProperties(e,t),e}var fcTheme=FullCalendar.Theme,LooperCalendarTheme=function(e){function a(){e.apply(this,arguments)}return e&&(a.__proto__=e),(a.prototype=Object.create(e&&e.prototype)).constructor=a}(fcTheme);LooperCalendarTheme.prototype.classes={widget:"fc-bootstrap4",tableGrid:"table-bordered",tableList:"table",tableListHeading:"bg-light",buttonGroup:"btn-group",button:"btn btn-secondary",stateActive:"active",stateDisabled:"disabled",today:"highlight",popover:"popover",popoverHeader:"popover-header",popoverContent:"popover-body",headerRow:"table-bordered",dayRow:"table-bordered",listView:"card card-reflow"},LooperCalendarTheme.prototype.iconClasses={close:"fa-times",prev:"fa-chevron-left",next:"fa-chevron-right",prevYear:"fa-angle-double-left",nextYear:"fa-angle-double-right"},LooperCalendarTheme.prototype.baseIconClass="fa",LooperCalendarTheme.prototype.iconOverrideOption="fontAwesome",LooperCalendarTheme.prototype.iconOverrideCustomButtonOption="fontAwesome",LooperCalendarTheme.prototype.iconOverridePrefix="fa-",FullCalendar.defineThemeSystem("looper",LooperCalendarTheme);var FullcalendarDemo=function(){function e(){_classCallCheck(this,e),this.init()}return _createClass(e,[{key:"init",value:function(){this.handleCalendarList(),this.handleCalendar()}},{key:"handleCalendar",value:function(){$("#calendar").fullCalendar({themeSystem:"looper",header:{left:"title",center:"",right:"month,agendaWeek,agendaDay"},defaultView:"month",height:"auto",navLinks:!0,editable:!0,eventLimit:!0,events:"assets/data/events.json",viewRender:function(e){$("#calendar").fullCalendar("getDate").format("YYYY-MM-DD")===moment().format("YYYY-MM-DD")?$("#calendar-today").attr("disabled","disabled"):$("#calendar-today").removeAttr("disabled");var a,t="list".concat((a=e.viewSpec.durationUnit).charAt(0).toUpperCase()+a.slice(1)),n="listDay"===t?moment(e.start._i).format("YYYY-MM-DD"):{start:moment(e.start._i).format("YYYY-MM-DD"),end:moment(e.end._i).format("YYYY-MM-DD")};$("#calendar-list").fullCalendar("changeView",t,n)}}),$("#calendar-prev").on("click",function(){$("#calendar, #calendar-list").fullCalendar("prev")}),$("#calendar-today").on("click",function(){$("#calendar, #calendar-list").fullCalendar("today")}),$("#calendar-next").on("click",function(){$("#calendar, #calendar-list").fullCalendar("next")})}},{key:"handleCalendarList",value:function(){$("#calendar-list").fullCalendar({themeSystem:"looper",header:!1,defaultView:"listMonth",height:"auto",navLinks:!1,editable:!1,eventLimit:!1,events:"assets/data/events.json",eventRender:function(e,a){a.find(".fc-event-dot").css("background-color",e.borderColor)}})}}]),e}();$(document).on("theme:init",function(){new FullcalendarDemo});
|
|
//# sourceMappingURL=../../sourcemaps/pages/fullcalendar-demo.min.js.map
|