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>
<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>
</button>

View File

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