mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 13:39:22 +03:00
More jQuery to native (including bootstrap.js)
This commit is contained in:
parent
bdb36ec128
commit
69fcc240e9
39 changed files with 496 additions and 344 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue