mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 22:47:03 +03:00
Replace babel command decorators with proper knockout command decorators
This commit is contained in:
parent
b6d8fa5b3f
commit
540b12ed26
27 changed files with 181 additions and 132 deletions
|
|
@ -4,7 +4,7 @@ import { HtmlEditor } from 'Common/Html';
|
|||
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { command } from 'Knoin/Knoin';
|
||||
import { decorateKoCommands } from 'Knoin/Knoin';
|
||||
import { AbstractViewPopup } from 'Knoin/AbstractViews';
|
||||
import { TemplateModel } from 'Model/Template';
|
||||
|
||||
|
|
@ -34,9 +34,12 @@ class TemplatePopupView extends AbstractViewPopup {
|
|||
this.name.subscribe(() => this.nameError(false));
|
||||
|
||||
this.body.subscribe(() => this.bodyError(false));
|
||||
|
||||
decorateKoCommands(this, {
|
||||
addTemplateCommand: self => !self.submitRequest()
|
||||
});
|
||||
}
|
||||
|
||||
@command((self) => !self.submitRequest())
|
||||
addTemplateCommand() {
|
||||
this.populateBodyFromEditor();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue