Fix layout of category badges on categories page and in combobox

This commit is contained in:
Neil Lalonde 2013-07-23 15:04:52 -04:00
parent 96af490d7c
commit 44bebf255d
3 changed files with 8 additions and 4 deletions

View file

@ -27,10 +27,10 @@ Discourse.CategoryChooserView = Discourse.ComboboxView.extend({
template: function(text, templateData) { template: function(text, templateData) {
if (!templateData.color) return text; if (!templateData.color) return text;
var result = "<span class='badge-category' style='background-color: #" + templateData.color + '; color: #' + var result = "<div class='badge-category' style='background-color: #" + templateData.color + '; color: #' +
templateData.text_color + ";'>" + templateData.name + "</span>"; templateData.text_color + ";'>" + templateData.name + "</div>";
result += " <span class='topic-count'>&times; " + templateData.topic_count + "</span>"; result += " <div class='topic-count'>&times; " + templateData.topic_count + "</div>";
var description = templateData.description_text; var description = templateData.description_text;
// TODO wtf how can this be null? // TODO wtf how can this be null?

View file

@ -1,7 +1,11 @@
.category-combobox { .category-combobox {
.badge-category {
display: inline-block;
}
.topic-count { .topic-count {
font-size: 11px; font-size: 11px;
color: #666; color: #666;
display: inline-block;
} }
.highlighted .topic-count { .highlighted .topic-count {
color: white; color: white;

View file

@ -221,7 +221,7 @@
} }
.badge-category { .badge-category {
float: left; float: left;
margin: 3px 4px 0 0; margin: 1px 4px 0 0;
} }
.posters { .posters {
float: left; float: left;