Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
DayTile.prototype._renderFrame = function (date) {
var _a = this, theme = _a.theme, dateEnv = _a.dateEnv;
var title = dateEnv.format(date, createFormatter(this.opt('dayPopoverFormat')) // TODO: cache
);
this.el.innerHTML =
'<div class="fc-header ' + theme.getClass('popoverHeader') + '">' +
'<span class="fc-title">' +
htmlEscape(title) +
'</span>' +
'<span class="fc-close ' + theme.getIconClass('close') + '"></span>' +
'</div>' +
'<div class="fc-body ' + theme.getClass('popoverContent') + '">' +
'<div class="fc-event-container"></div>' +
'</div>';
this.segContainerEl = this.el.querySelector('.fc-event-container');
};
DayTile.prototype.queryHit = function (positionLeft, positionTop, elWidth, elHeight) {
''
) +
'>' +
'<div class="fc-content">' +
(timeText ?
'<div data-full="' + htmlEscape(fullTimeText) + '" data-start="' + htmlEscape(startTimeText) + '" class="fc-time">' +
'<span>' + htmlEscape(timeText) + '</span>' +
'</div>' :
''
) +
(eventDef.title ?
'<div class="fc-title">' +
htmlEscape(eventDef.title) +
'</div>' :
''
) +
'</div>' +
/* TODO: write CSS for this
(isResizableFromStart ?
'<div class="fc-resizer fc-start-resizer"></div>' :
''
) +
*/
(isResizableFromEnd ?
'<div class="fc-resizer fc-end-resizer"></div>' :
''
) +
''
}
}
return '' +
(this.displayEventTime ?
'' +
(timeHtml || '') +
'' :
'') +
'' +
'<span style="background-color:' + bgColor + '" class="fc-event-dot"></span>' +
'' +
'' +
'' +
htmlEscape(eventDef.title || '') +
'' +
'' +
'';
};
// like "4:00am"
_renderFrame(date: DateMarker) {
let { theme, dateEnv, options } = this.context
let title = dateEnv.format(
date,
createFormatter(options.dayPopoverFormat) // TODO: cache
)
this.el.innerHTML =
'<div class="fc-header ' + theme.getClass('popoverHeader') + '">' +
'<span class="fc-title">' +
htmlEscape(title) +
'</span>' +
'<span class="fc-close ' + theme.getIconClass('close') + '"></span>' +
'</div>' +
'<div class="fc-body ' + theme.getClass('popoverContent') + '">' +
'<div class="fc-event-container"></div>' +
'</div>'
this.segContainerEl = this.el.querySelector('.fc-event-container')
}
renderHeadIntroHtml = () => {
let { theme, dateEnv, options } = this.context
let range = this.props.dateProfile.renderRange
let dayCnt = diffDays(range.start, range.end)
let weekText
if (options.weekNumbers) {
weekText = dateEnv.format(range.start, WEEK_HEADER_FORMAT)
return '' +
'' +
buildGotoAnchorHtml( // aside from link, important for matchCellWidths
options,
dateEnv,
{ date: range.start, type: 'week', forceOff: dayCnt > 1 },
htmlEscape(weekText) // inner HTML
) +
''
} else {
return ''
}
}
renderHeadIntroHtml = () => {
let { theme, options } = this.context
if (this.colWeekNumbersVisible) {
return '' +
'' +
'<span>' + // needed for matchCellWidths
htmlEscape(options.weekLabel) +
'</span>' +
''
}
return ''
}
return '<a style="' + skinCss + '" href="' + htmlEscape(eventDef.url) + '" class="' + classes.join(' ') + '">' +
'<div class="fc-content">' +
(timeText ?
'<div data-full="' + htmlEscape(fullTimeText) + '" data-start="' + htmlEscape(startTimeText) + '" class="fc-time">' +
'<span>' + htmlEscape(timeText) + '</span>' +
'</div>' :
''
) +
(eventDef.title ?
'<div class="fc-title">' +
htmlEscape(eventDef.title) +
'</div>' :
''
) +
'</div>' +
/* TODO: write CSS for this
(isResizableFromStart ?
'<div class="fc-resizer fc-start-resizer"></div>' :
''</a>
eventInstance.range.start,
seg.end,
false // allDay
))
} else if (seg.isEnd) {
timeHtml = htmlEscape(this._getTimeText(
seg.start,
eventInstance.range.end,
false // allDay
))
} else { // inner segment that lasts the whole day
timeHtml = getAllDayHtml(options)
}
} else {
// Display the normal time text for the *event's* times
timeHtml = htmlEscape(this.getTimeText(eventRange))
}
if (url) {
classes.push('fc-has-url')
}
return '' +
(this.displayEventTime ?
'' +
(timeHtml || '') +
'' :
'') +
'' +
'
return '' +
(this.displayEventTime ?
'' +
(timeHtml || '') +
'' :
'') +
'' +
'<span style="background-color:' + bgColor + '" class="fc-event-dot"></span>' +
'' +
'' +
'' +
htmlEscape(eventDef.title || '') +
'' +
'' +
'';
};
// like "4:00am"
return '' +
(this.displayEventTime ?
'' +
(timeHtml || '') +
'' :
'') +
'' +
'<span style="background-color:' + bgColor + '" class="fc-event-dot"></span>' +
'' +
'' +
'' +
htmlEscape(eventDef.title || '') +
'' +
'' +
''
}