mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 20:54:31 +08:00
Fix rendering of muted topic button
This commit is contained in:
parent
f244650832
commit
c3fd79d61c
|
@ -21,11 +21,11 @@ Discourse.NotificationsButton = Discourse.DropdownButtonView.extend({
|
||||||
|
|
||||||
text: function() {
|
text: function() {
|
||||||
var key = (function() {
|
var key = (function() {
|
||||||
switch (this.get('topic.details.notification_level') || 1) {
|
switch (this.get('topic.details.notification_level')) {
|
||||||
case Discourse.Topic.NotificationLevel.WATCHING: return 'watching';
|
case Discourse.Topic.NotificationLevel.WATCHING: return 'watching';
|
||||||
case Discourse.Topic.NotificationLevel.TRACKING: return 'tracking';
|
case Discourse.Topic.NotificationLevel.TRACKING: return 'tracking';
|
||||||
case Discourse.Topic.NotificationLevel.REGULAR: return 'regular';
|
|
||||||
case Discourse.Topic.NotificationLevel.MUTE: return 'muted';
|
case Discourse.Topic.NotificationLevel.MUTE: return 'muted';
|
||||||
|
default: return 'regular';
|
||||||
}
|
}
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|
||||||
|
@ -33,8 +33,8 @@ Discourse.NotificationsButton = Discourse.DropdownButtonView.extend({
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'watching': return '<i class="icon-circle heatmap-high"></i> ';
|
case 'watching': return '<i class="icon-circle heatmap-high"></i> ';
|
||||||
case 'tracking': return '<i class="icon-circle heatmap-low"></i> ';
|
case 'tracking': return '<i class="icon-circle heatmap-low"></i> ';
|
||||||
case 'regular': return '';
|
|
||||||
case 'muted': return '<i class="icon-remove-sign"></i> ';
|
case 'muted': return '<i class="icon-remove-sign"></i> ';
|
||||||
|
default: return '';
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
return icon + (I18n.t("topic.notifications." + key + ".title")) + "<span class='caret'></span>";
|
return icon + (I18n.t("topic.notifications." + key + ".title")) + "<span class='caret'></span>";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user