From c430c6dd307434f6e0a0a54dccaf4f04aaf94aa8 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 10 Mar 2014 13:30:53 -0400 Subject: [PATCH] FIX: Only add `home` class when there is no badge --- .../discourse/components/categorydrop_component.js | 8 ++++++++ .../templates/components/category-drop.js.handlebars | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/components/categorydrop_component.js b/app/assets/javascripts/discourse/components/categorydrop_component.js index f3e17b55711..fdbd4262028 100644 --- a/app/assets/javascripts/discourse/components/categorydrop_component.js +++ b/app/assets/javascripts/discourse/components/categorydrop_component.js @@ -34,6 +34,14 @@ Discourse.CategoryDropComponent = Ember.Component.extend({ return I18n.t('categories.all'); }.property('category'), + dropdownButtonClass: function() { + var result = 'badge-category category-dropdown-button'; + if (Em.isNone(this.get('category'))) { + result += ' home'; + } + return result; + }.property('category'), + badgeStyle: function() { var category = this.get('category'); if (category) { diff --git a/app/assets/javascripts/discourse/templates/components/category-drop.js.handlebars b/app/assets/javascripts/discourse/templates/components/category-drop.js.handlebars index 965e5b0fb45..b9efc849563 100644 --- a/app/assets/javascripts/discourse/templates/components/category-drop.js.handlebars +++ b/app/assets/javascripts/discourse/templates/components/category-drop.js.handlebars @@ -14,7 +14,7 @@ {{/if}} {{#if categories}} - +
{{#if subCategory}}