client/tags: fix exiting mass tag

Exiting mass tag didn't remove [+] [-] buttons on post thumbnails.
This commit is contained in:
rr- 2016-09-16 21:31:09 +02:00
parent cf1e1670c4
commit 91decaf9fe
1 changed files with 5 additions and 2 deletions

View File

@ -88,6 +88,7 @@ class PostsHeaderView extends events.EventTarget {
this.dispatchEvent(new CustomEvent('navigate', {detail: {parameters: { this.dispatchEvent(new CustomEvent('navigate', {detail: {parameters: {
query: this._ctx.parameters.query, query: this._ctx.parameters.query,
page: this._ctx.parameters.page, page: this._ctx.parameters.page,
tag: null,
}}})); }}}));
} }
@ -103,8 +104,8 @@ class PostsHeaderView extends events.EventTarget {
new CustomEvent( new CustomEvent(
'navigate', { 'navigate', {
detail: { detail: {
parameters: parameters: Object.assign(
Object.assign({}, this._ctx.parameters, {page: 1}), {}, this._ctx.parameters, {tag: null, page: 1}),
}, },
})); }));
} }
@ -121,6 +122,8 @@ class PostsHeaderView extends events.EventTarget {
if (this._massTagInputNode) { if (this._massTagInputNode) {
parameters.tag = this._massTagInputNode.value; parameters.tag = this._massTagInputNode.value;
this._massTagInputNode.blur(); this._massTagInputNode.blur();
} else {
parameters.tag = null;
} }
this.dispatchEvent( this.dispatchEvent(
new CustomEvent('navigate', {detail: {parameters: parameters}})); new CustomEvent('navigate', {detail: {parameters: parameters}}));