FIX: don't search for tags when editing topic title

This commit is contained in:
Régis Hanol 2019-08-28 21:25:49 +02:00
parent e3eb49729c
commit 56be4bb8f0
2 changed files with 11 additions and 1 deletions

View File

@ -238,6 +238,10 @@ export default Ember.Controller.extend(bufferedProperty("model"), {
this.set("buffered.category_id", selection.value);
},
topicTagsChanged({ target }) {
this.set("buffered.tags", target.value);
},
deletePending(pending) {
return ajax(`/review/${pending.id}`, { type: "DELETE" })
.then(() => {

View File

@ -24,6 +24,7 @@
<span class="private-message-glyph">{{d-icon "envelope"}}</span>
{{/if}}
{{text-field id="edit-title" value=buffered.title maxlength=siteSettings.max_topic_title_length autofocus="true"}}
{{#if showCategoryChooser}}
{{category-chooser
class="small"
@ -32,10 +33,15 @@
{{/if}}
{{#if canEditTags}}
{{mini-tag-chooser filterable=true tags=buffered.tags categoryId=buffered.category_id}}
{{mini-tag-chooser
filterable=true
tags=(unbound buffered.tags)
categoryId=(unbound buffered.category_id)
onChangeTags=(action "topicTagsChanged")}}
{{/if}}
{{plugin-outlet name="edit-topic" args=(hash model=model buffered=buffered)}}
<div class="edit-controls">
{{d-button action=(action "finishedEditingTopic") class="btn-primary submit-edit" icon="check"}}
{{d-button action=(action "cancelEditingTopic") class="btn-default cancel-edit" icon="times"}}