PageSourceSearch

https://idolbom.go.kr/front/res/js/common/calendar-manager.js

js idolbom.go.kr collected 2026-10-01 12:08:26 UTC 2,497 bytes, 97 lines download raw bytes

1/**
2 * 캘린더 관리자
3 * @param options
4 * @constructor
5 */
6var CalendarManager = function(options) {
7    this.options = _.defaults(options, {
8        headerToolbar: {
9        },
10        dayHeaderDidMount: function () {
11        },
12        titleFormat: function () {
13        },
14        eventContent: function () {
15        },
16        eventClick: function () {
17        },
18        validRange: {
19            start: moment().startOf('month'),
20            end: moment().endOf('month'),
21        },
22        dateClick: function (info) {
23        },
24        datesSet: function(info){
25		},
26    });
27
28    this.calendarEl = options.calendarEl;
29    this.desc = this.options.desc;
30    this.headerToolbar = this.options.headerToolbar;
31    this.initialDate = this.options.initialDate;
32
33    /* functions */
34    this.dayHeaderDidMount = this.options.dayHeaderDidMount;
35    this.titleFormat = this.options.titleFormat;
36    this.eventContent = this.options.eventContent;
37    this.eventChange = this.options.eventChange;
38    this.events = this.options.events;
39    this.eventClick = this.options.eventClick;
40    this.dateClick = this.options.dateClick;
41    this.datesSet = this.options.datesSet;
42    this.validRange = this.options.validRange;
43    // DEFAULT selectable : true
44    this.selectable = options.selectable !== undefined && options.selectable === false ? false : true;
45
46    this.initEvent();
47}
48
49/**
50 * 캘린더 그리기
51 */
52CalendarManager.prototype.render = function() {
53    var self = this;
54
55    self.calendar = new FullCalendar.Calendar(self.calendarEl, {
56        initialView: 'dayGridMonth',
57        initialDate: self.initialDate,
58        height: 'auto',
59        locale: 'ko',
60        selectable: self.selectable,
61        headerToolbar: self.headerToolbar,
62        dayHeaderDidMount: self.dayHeaderDidMount,
63        titleFormat: self.titleFormat,
64        eventContent: self.eventContent,
65        eventChange: self.eventChange,
66        events: self.events,
67        validRange: self.validRange,
68        eventClick: self.eventClick,
69        dateClick: self.dateClick,
70		datesSet: self.datesSet,
71    });
72
73    self.calendar.render();
74}
75
76/**
77 * 캘린더 데이터 fetch
78 * @param events event data
79 * @param date date
80 */
81CalendarManager.prototype.fetchEvents = function (events, date) {
82    var self = this;
83
84    self.events = events;
85    self.initialDate = date;
86
87    self.render();
88}
89
90/**
91 * Initial Event
92 */
93CalendarManager.prototype.initEvent = function () {
94    var self = this;
95
96    this.render();
97}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.