Merge pull request #4749 from cpradio/add-subcategory-class-hamburger-menu

UX: Add subcategory class to hamburger menu items that are subcategories
This commit is contained in:
Sam
2017-03-14 17:08:35 -04:00
committed by GitHub

View File

@@ -6,6 +6,12 @@ createWidget('hamburger-category', {
tagName: 'li.category-link',
html(c) {
if (c.parent_category_id) {
this.tagName += '.subcategory';
}
this.tagName += '.category-' + Discourse.Category.slugFor(c, '-');
const results = [ this.attach('category-link', { category: c, allowUncategorized: true }) ];
const unreadTotal = parseInt(c.get('unreadTopics'), 10) + parseInt(c.get('newTopics'), 10);