mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 04:29:21 +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
|
|
@ -39,13 +39,9 @@ class DomainsAdminSettings {
|
|||
}
|
||||
|
||||
onBuild(oDom) {
|
||||
const self = this;
|
||||
oDom.on('click', '.b-admin-domains-list-table .e-item .e-action', function() {
|
||||
// eslint-disable-line prefer-arrow-callback
|
||||
const domainItem = ko.dataFor(this); // eslint-disable-line no-invalid-this
|
||||
if (domainItem) {
|
||||
Remote.domain(self.onDomainLoadRequest, domainItem.name);
|
||||
}
|
||||
oDom.addEventListener('click', event => {
|
||||
let el = event.target.closestWithin('.b-admin-domains-list-table .e-item .e-action', oDom);
|
||||
el && ko.dataFor(el) && Remote.domain(this.onDomainLoadRequest, ko.dataFor(el).name);
|
||||
});
|
||||
|
||||
getApp().reloadDomainList();
|
||||
|
|
|
|||
|
|
@ -35,23 +35,13 @@ class PluginsAdminSettings {
|
|||
}
|
||||
|
||||
onBuild(oDom) {
|
||||
const self = this;
|
||||
oDom.addEventListener('click', event => {
|
||||
let el = event.target.closestWithin('.e-item .configure-plugin-action', oDom);
|
||||
el && ko.dataFor(el) && this.configurePlugin(ko.dataFor(el));
|
||||
|
||||
oDom
|
||||
.on('click', '.e-item .configure-plugin-action', function() {
|
||||
// eslint-disable-line prefer-arrow-callback
|
||||
const plugin = ko.dataFor(this); // eslint-disable-line no-invalid-this
|
||||
if (plugin) {
|
||||
self.configurePlugin(plugin);
|
||||
}
|
||||
})
|
||||
.on('click', '.e-item .disabled-plugin', function() {
|
||||
// eslint-disable-line prefer-arrow-callback
|
||||
const plugin = ko.dataFor(this); // eslint-disable-line no-invalid-this
|
||||
if (plugin) {
|
||||
self.disablePlugin(plugin);
|
||||
}
|
||||
});
|
||||
el = event.target.closestWithin('.e-item .disabled-plugin', oDom);
|
||||
el && ko.dataFor(el) && this.disablePlugin(ko.dataFor(el));
|
||||
});
|
||||
|
||||
this.enabledPlugins.subscribe((value) => {
|
||||
Remote.saveAdminConfig(null, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue