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