mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 03:34:17 +08:00
FIX: Only add home
class when there is no badge
This commit is contained in:
parent
455ff61626
commit
c430c6dd30
|
@ -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) {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
{{/if}}
|
||||
|
||||
{{#if categories}}
|
||||
<a href='#' {{action expand}} class='badge-category category-dropdown-button home' {{bind-attr style="badgeStyle"}}><i {{bind-attr class="iconClass"}}></i></a>
|
||||
<a href='#' {{action expand}} {{bind-attr class="dropdownButtonClass" style="badgeStyle"}}><i {{bind-attr class="iconClass"}}></i></a>
|
||||
<section {{bind-attr class="expanded::hidden :category-dropdown-menu"}} class='chooser'>
|
||||
<div class='cat'><a {{bind-attr href=allCategoriesUrl}} data-drop-close="true" class='badge-category home'>{{allCategoriesLabel}}</a></div>
|
||||
{{#if subCategory}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user