Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (this.options.title !== '') {
title = templateEngine.render(this.options.templates.title.call(this), {
classes: this.classes
})
}
if (this.options.content !== '') {
content = templateEngine.render(
this.options.templates.content.call(this),
{ classes: this.classes }
)
}
if (this.options.buttons) {
buttons = templateEngine.render(
this.options.templates.buttons.call(this),
{ classes: this.classes }
)
}
if (this.options.icon) {
icon = templateEngine.render(this.options.templates.icon.call(this), {
classes: this.classes,
iconClass: this.getIconClass()
})
this.$icon = parseHTML(icon)
}
const html = templateEngine.render(this.options.template.call(this), {
classes: this.classes,
overlay,
if (this.options.overlay) {
overlay = templateEngine.render(
this.options.templates.overlay.call(this),
{ classes: this.classes }
)
}
if (this.options.title !== '') {
title = templateEngine.render(this.options.templates.title.call(this), {
classes: this.classes
})
}
if (this.options.content !== '') {
content = templateEngine.render(
this.options.templates.content.call(this),
{ classes: this.classes }
)
}
if (this.options.buttons) {
buttons = templateEngine.render(
this.options.templates.buttons.call(this),
{ classes: this.classes }
)
}
if (this.options.icon) {
icon = templateEngine.render(this.options.templates.icon.call(this), {
classes: this.classes,
iconClass: this.getIconClass()
generatePrev() {
return templateEngine.render(this.options.templates.prev.call(this), {
classes: this.instance.classes,
label: this.instance.translate('listPrev', { count: this.visibleSize })
})
}
initWrap() {
this.$wrap = closest(this.options.wrapSelector, this.element)
if (!this.$wrap || this.$wrap !== parent(this.element)) {
this.$wrap = wrap(
template.render(this.options.templates.wrap.call(this), {
classes: this.classes
}),
this.element
)
}
}
getElement(type) {
const template = this.options.templates[type]
let html = ''
if (template) {
html = templateEngine.render(template.call(this), { class: this.classes })
}
return parseHTML(html)
}
if (this.options.content !== '') {
content = templateEngine.render(
this.options.templates.content.call(this),
{ classes: this.classes }
)
}
if (this.options.buttons) {
buttons = templateEngine.render(
this.options.templates.buttons.call(this),
{ classes: this.classes }
)
}
if (this.options.icon) {
icon = templateEngine.render(this.options.templates.icon.call(this), {
classes: this.classes,
iconClass: this.getIconClass()
})
this.$icon = parseHTML(icon)
}
const html = templateEngine.render(this.options.template.call(this), {
classes: this.classes,
overlay,
close,
title,
content,
buttons
})
return html
}
this.options.templates.content.call(this),
{ classes: this.classes }
)
}
if (this.options.buttons) {
buttons = templateEngine.render(
this.options.templates.buttons.call(this),
{
classes: this.classes,
buttons: this.createBtns()
}
)
}
const html = templateEngine.render(this.options.template.call(this), {
classes: this.classes,
close,
content,
buttons
})
return html
}
classes: this.classes
}
)
}
if (this.opts.sort) {
this.sort = templateEngine.render(
this.api.options.templates.sort.call(this),
{
classes: this.classes
}
)
}
if (this.opts.reverse) {
this.reverse = templateEngine.render(
this.api.options.templates.reverse.call(this),
{
classes: this.classes
}
)
}
this.toolbar = templateEngine.render(
this.api.options.templates.toolbar.call(this),
{
classes: this.classes,
filters: this.filters,
sort: this.sort,
reverse: this.reverse
}
)
createDropdown() {
this.$dropdown = addClass(
this.classes.HIDDEN,
parseHTML(
templateEngine.render(this.options.templates.dropdown.call(this), {
classes: this.classes,
text: this.options.responsiveText
})
)
)
if (this.options.overflow === 'right') {
addClass(this.classes.DROPDOWNRIGHT, this.$dropdown)
append(this.$dropdown, this.element)
} else {
prepend(this.$dropdown, this.element)
}
}
if (this.options.buttons) {
buttons = templateEngine.render(
this.options.templates.buttons.call(this),
{ classes: this.classes }
)
}
if (this.options.icon) {
icon = templateEngine.render(this.options.templates.icon.call(this), {
classes: this.classes,
iconClass: this.getIconClass()
})
this.$icon = parseHTML(icon)
}
const html = templateEngine.render(this.options.template.call(this), {
classes: this.classes,
overlay,
close,
title,
content,
buttons
})
return html
}