Minor Discourse Fixes
This commit is contained in:
parent
4f8c6b2d83
commit
142d35a0a5
|
@ -27,8 +27,6 @@ export default Ember.Component.extend(bufferedRender({
|
|||
}.property('disableActions'),
|
||||
|
||||
buildBuffer(buffer) {
|
||||
const self = this;
|
||||
|
||||
const renderIcon = function(name, key, actionable) {
|
||||
const title = escapeExpression(I18n.t(`topic_statuses.${key}.help`)),
|
||||
startTag = actionable ? "a href" : "span",
|
||||
|
@ -39,8 +37,8 @@ export default Ember.Component.extend(bufferedRender({
|
|||
buffer.push(`<${startTag} title='${title}' class='topic-status'>${icon}</${endTag}>`);
|
||||
};
|
||||
|
||||
const renderIconIf = function(conditionProp, name, key, actionable) {
|
||||
if (!self.get(conditionProp)) { return; }
|
||||
const renderIconIf = (conditionProp, name, key, actionable) => {
|
||||
if (!this.get(conditionProp)) { return; }
|
||||
renderIcon(name, key, actionable);
|
||||
};
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ export default DiscoveryController.extend({
|
|||
return Discourse.User.currentProp('staff');
|
||||
},
|
||||
|
||||
@computed("model.categories.@each.featuredTopics.length")
|
||||
@computed("model.categories.[].featuredTopics.length")
|
||||
latestTopicOnly() {
|
||||
return this.get("model.categories").find(c => c.get("featuredTopics.length") > 1) === undefined;
|
||||
},
|
||||
|
|
|
@ -157,9 +157,7 @@ export default Ember.Controller.extend(CanCheckEmails, {
|
|||
|
||||
// Cook the bio for preview
|
||||
model.set('name', this.get('newNameInput'));
|
||||
var options = {};
|
||||
|
||||
return model.save(options).then(() => {
|
||||
return model.save().then(() => {
|
||||
if (Discourse.User.currentProp('id') === model.get('id')) {
|
||||
Discourse.User.currentProp('name', model.get('name'));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue