Glyph stuff: Put them on the left of the user menu, fix padding on link arrows in gutter.

This commit is contained in:
Robin Ward 2013-07-10 16:56:39 -04:00
parent f1a5f4ce66
commit 6de1fed87a
3 changed files with 18 additions and 5 deletions

View File

@ -8,11 +8,13 @@
**/
Discourse.ActivityFilterView = Discourse.View.extend({
tagName: 'li',
classNameBindings: ['active'],
classNameBindings: ['active', 'noGlyph'],
stream: Em.computed.alias('controller.content'),
shouldRerender: Discourse.View.renderIfChanged('count'),
noGlyph: Em.computed.empty('icon'),
active: function() {
var content = this.get('content');
if (content) {
@ -34,14 +36,15 @@ Discourse.ActivityFilterView = Discourse.View.extend({
description = I18n.t("user.filters.all");
}
buffer.push("<a href='#'>" + description +
" <span class='count'>(" + count + ")</span>");
var icon = this.get('icon');
if(icon) {
buffer.push("<i class='glyph icon icon-" + icon + "'></i>");
}
buffer.push("<a href='#'>" + description +
" <span class='count'>(" + count + ")</span>");
buffer.push("<span class='icon-chevron-right'></span></a>");
},

View File

@ -136,6 +136,7 @@
line-height: 19px;
text-align: center;
background-color: #fafafa;
padding: 1px 2px;
@include border-radius-all(20px);
&:after {
display: block;

View File

@ -94,8 +94,17 @@
line-height: 20px;
}
.no-glyph {
a {
padding-left: 30px;
}
}
.glyph {
font-size: 12px;
margin-left: 8px;
margin: 15px 0 0 0;
width: 30px;
text-align: center;
float: left;
}
}