More jQuery to native (including bootstrap.js)

This commit is contained in:
djmaze 2020-08-30 10:30:50 +02:00
parent bdb36ec128
commit 69fcc240e9
39 changed files with 496 additions and 344 deletions

View file

@ -58,14 +58,9 @@ class TemplatesUserSettings {
}
onBuild(oDom) {
const self = this;
oDom.on('click', '.templates-list .template-item .e-action', function() {
// eslint-disable-line prefer-arrow-callback
const template = ko.dataFor(this); // eslint-disable-line no-invalid-this
if (template) {
self.editTemplate(template);
}
oDom.addEventListener('click', event => {
const el = event.target.closestWithin('.templates-list .template-item .e-action', oDom);
el && ko.dataFor(el) && this.editTemplate(ko.dataFor(el));
});
this.reloadTemplates();