本文整理汇总了TypeScript中fullcalendar.htmlEscape函数的典型用法代码示例。如果您正苦于以下问题:TypeScript htmlEscape函数的具体用法?TypeScript htmlEscape怎么用?TypeScript htmlEscape使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了htmlEscape函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: buildCellObject
buildCellObject(date, text, rowUnit) {
date = date.clone() // ensure our own reference
const spanHtml = this.buildGotoAnchorHtml(
{
date,
type: rowUnit,
forceOff: !rowUnit
},
{
'class': 'fc-cell-text'
},
htmlEscape(text)
)
return { text, spanHtml, date, colspan: 1 }
}
开发者ID:diomed,项目名称:fullcalendar-scheduler,代码行数:15,代码来源:TimelineView.ts
示例2: renderHeadResourceCellHtml
// given a resource and an optional date
renderHeadResourceCellHtml(resource, date?, colspan = 1) {
return '<th class="fc-resource-cell"' +
' data-resource-id="' + resource.id + '"' +
(date ?
' data-date="' + date.format('YYYY-MM-DD') + '"' :
'') +
(colspan > 1 ?
' colspan="' + colspan + '"' :
'') +
'>' +
htmlEscape(
this.view.getResourceText(resource)
) +
'</th>'
}
开发者ID:diomed,项目名称:fullcalendar-scheduler,代码行数:16,代码来源:ResourceDayTableMixin.ts
示例3: fgSegHtml
fgSegHtml(seg, disableResizing) {
const { eventDef } = seg.footprint
const isDraggable = this.view.isEventDefDraggable(eventDef)
const isResizableFromStart = seg.isStart && this.view.isEventDefResizableFromStart(eventDef)
const isResizableFromEnd = seg.isEnd && this.view.isEventDefResizableFromEnd(eventDef)
const classes = this.getSegClasses(seg, isDraggable, isResizableFromStart || isResizableFromEnd)
classes.unshift('fc-timeline-event', 'fc-h-event')
const timeText = this.getTimeText(seg.footprint)
return '<a class="' + classes.join(' ') + '" style="' + cssToStr(this.getSkinCss(seg.footprint.eventDef)) + '"' +
(eventDef.url ?
' href="' + htmlEscape(eventDef.url) + '"' :
'') +
'>' +
'<div class="fc-content">' +
(timeText ?
'<span class="fc-time">' +
htmlEscape(timeText) +
'</span>'
:
'') +
'<span class="fc-title">' +
(eventDef.title ? htmlEscape(eventDef.title) : ' ') +
'</span>' +
'</div>' +
'<div class="fc-bg" />' +
(isResizableFromStart ?
'<div class="fc-resizer fc-start-resizer"></div>' :
'') +
(isResizableFromEnd ?
'<div class="fc-resizer fc-end-resizer"></div>' :
'') +
'</a>'
}
开发者ID:diomed,项目名称:fullcalendar-scheduler,代码行数:36,代码来源:TimelineEventRenderer.ts
示例4: renderSpreadsheetSkeleton
/*
Populates the TR with cells containing data about the resource
*/
renderSpreadsheetSkeleton(tr) {
const { theme } = this.view.calendar
const { resource } = this
for (let colSpec of this.view.colSpecs) {
if (colSpec.group) { // not responsible for group-based rows. VRowGroup is
continue
}
const input = // the source text, and the main argument for the filter functions
colSpec.field ?
resource[colSpec.field] || null :
resource
const text =
typeof colSpec.text === 'function' ?
colSpec.text(resource, input) : // the colspec provided a text filter function
input
let contentEl = $(
'<div class="fc-cell-content">' +
(colSpec.isMain ? this.renderGutterHtml() : '') +
'<span class="fc-cell-text">' +
(text ? htmlEscape(text) : ' ') +
'</span>' +
'</div>'
)
if (typeof colSpec.render === 'function') { // a filter function for the element
contentEl = colSpec.render(resource, contentEl, input) || contentEl
}
const td = $('<td class="' + theme.getClass('widgetContent') + '"/>')
.append(contentEl)
// the first cell of the row needs to have an inner div for setTrInnerHeight
if (colSpec.isMain) {
td.wrapInner('<div/>')
}
tr.append(td)
}
tr.attr('data-resource-id', resource.id)
}
开发者ID:diomed,项目名称:fullcalendar-scheduler,代码行数:49,代码来源:ResourceRow.ts
示例5: renderHeadHtml
renderHeadHtml() {
const { theme } = this.view.calendar
const { colSpecs } = this.view
let html = '<table class="' + theme.getClass('tableGrid') + '">'
let colGroupHtml = '<colgroup>'
for (let o of colSpecs) {
if (o.isMain) {
colGroupHtml += '<col class="fc-main-col"/>'
} else {
colGroupHtml += '<col/>'
}
}
colGroupHtml += '</colgroup>'
this.colGroupHtml = colGroupHtml
html += colGroupHtml
html += '<tbody>'
if (this.view.superHeaderText) {
html +=
'<tr class="fc-super">' +
'<th class="' + theme.getClass('widgetHeader') + '" colspan="' + colSpecs.length + '">' +
'<div class="fc-cell-content">' +
'<span class="fc-cell-text">' +
htmlEscape(this.view.superHeaderText) +
'</span>' +
'</div>' +
'</th>' +
'</tr>'
}
html += '<tr>'
for (let i = 0; i < colSpecs.length; i++) {
let o = colSpecs[i]
const isLast = i === (colSpecs.length - 1)
html +=
`<th class="` + theme.getClass('widgetHeader') + `">` +
'<div>' +
'<div class="fc-cell-content">' +
(o.isMain ?
'<span class="fc-expander-space">' +
'<span class="fc-icon"></span>' +
'</span>' :
'') +
'<span class="fc-cell-text">' +
htmlEscape(o.labelText || '') + // what about normalizing this value ahead of time?
'</span>' +
'</div>' +
(!isLast ? '<div class="fc-col-resizer"></div>' : '') +
'</div>' +
'</th>'
}
html += '</tr>'
html += '</tbody></table>'
return html
}
开发者ID:diomed,项目名称:fullcalendar-scheduler,代码行数:63,代码来源:Spreadsheet.ts
注:本文中的fullcalendar.htmlEscape函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论