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

@ -99,23 +99,13 @@ class AccountsUserSettings {
}
onBuild(oDom) {
const self = this;
oDom.addEventListener('click', event => {
let el = event.target.closestWithin('.accounts-list .account-item .e-action', oDom);
el && ko.dataFor(el) && this.editAccount(ko.dataFor(el));
oDom
.on('click', '.accounts-list .account-item .e-action', function() {
// eslint-disable-line prefer-arrow-callback
const account = ko.dataFor(this); // eslint-disable-line no-invalid-this
if (account) {
self.editAccount(account);
}
})
.on('click', '.identities-list .identity-item .e-action', function() {
// eslint-disable-line prefer-arrow-callback
const identity = ko.dataFor(this); // eslint-disable-line no-invalid-this
if (identity) {
self.editIdentity(identity);
}
});
el = event.target.closestWithin('.identities-list .identity-item .e-action', oDom);
el && ko.dataFor(el) && this.editIdentity(ko.dataFor(el));
});
}
}