client/posts: clear messages before submit

Saving the post twice resulted in two 'Post saved!' messages.
This commit is contained in:
rr- 2016-07-31 23:55:22 +02:00
parent 9ee973ce1c
commit 3176709288
2 changed files with 5 additions and 0 deletions

View File

@ -102,6 +102,7 @@ class PostController {
_evtPostEdit(e) {
this._view.sidebarControl.disableForm();
this._view.sidebarControl.clearMessages();
const post = e.detail.post;
if (e.detail.tags !== undefined) {
post.tags = e.detail.tags;

View File

@ -182,6 +182,10 @@ class PostEditSidebarControl extends events.EventTarget {
views.disableForm(this._formNode);
}
clearMessages() {
views.clearMessages(this._hostNode);
}
showSuccess(message) {
views.showSuccess(this._hostNode, message);
}