added icon binding

This commit is contained in:
Catrin 2014-05-03 10:51:25 +02:00 committed by Neil Lalonde
parent 66dccfe8d0
commit 919999b114
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
<div> <div>
<button class='btn standard dropdown-toggle' data-toggle='dropdown'> <button class='btn standard dropdown-toggle' data-toggle='dropdown'>
<i class="fa fa-circle {{view.icon}}"></i>&nbsp;{{view.text}} <i {{bind-attr class=view.icon}}"></i>&nbsp;{{view.text}}
<span class='caret'></span> <span class='caret'></span>
</button> </button>

View File

@ -54,9 +54,9 @@ Discourse.CategoryNotificationsButton = Discourse.View.extend({
var icon = (function() { var icon = (function() {
switch (key) { switch (key) {
case 'watching': return 'heatmap-high'; case 'watching': return 'fa fa-circle heatmap-high';
case 'tracking': return 'fa-circle heatmap-low'; case 'tracking': return 'fa fa-circle heatmap-low';
case 'muted': return 'fa-times-circle'; case 'muted': return 'fa fa-times-circle';
default: return ''; default: return '';
} }
})(); })();