mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 13:09:21 +03:00
Also reduce admin remote fetch
This commit is contained in:
parent
c1228d09f0
commit
35bce8cf62
11 changed files with 148 additions and 260 deletions
|
|
@ -26,19 +26,29 @@ export class DomainsAdminSettings /*extends AbstractViewSettings*/ {
|
|||
deleteDomain(domain) {
|
||||
DomainAdminStore.remove(domain);
|
||||
Remote.domainDelete(DomainAdminStore.fetch, domain.name);
|
||||
Remote.request('AdminDomainDelete', DomainAdminStore.fetch, {
|
||||
Name: domain.name
|
||||
});
|
||||
}
|
||||
|
||||
disableDomain(domain) {
|
||||
domain.disabled(!domain.disabled());
|
||||
Remote.domainDisable(DomainAdminStore.fetch, domain.name, domain.disabled());
|
||||
Remote.request('AdminDomainDisable', DomainAdminStore.fetch, {
|
||||
Name: domain.name,
|
||||
Disabled: domain.disabled() ? 1 : 0
|
||||
});
|
||||
}
|
||||
|
||||
onBuild(oDom) {
|
||||
oDom.addEventListener('click', event => {
|
||||
let el = event.target.closestWithin('.b-admin-domains-list-table .e-action', oDom);
|
||||
el && ko.dataFor(el) && Remote.domain(
|
||||
(iError, oData) => iError || showScreenPopup(DomainPopupView, [oData.Result]), ko.dataFor(el).name
|
||||
el && ko.dataFor(el) && Remote.request('AdminDomainLoad',
|
||||
(iError, oData) => iError || showScreenPopup(DomainPopupView, [oData.Result]),
|
||||
{
|
||||
Name: ko.dataFor(el).name
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
DomainAdminStore.fetch();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue