subcategories should not show in the menu
This commit is contained in:
@@ -39,12 +39,12 @@ var SectionsListComponent = React.createClass({
|
||||
onSectionClick: function(section) {
|
||||
SectionActions.unsetSectionHover();
|
||||
NavigationActions.goToSection(section);
|
||||
return false;
|
||||
event.preventDefault();
|
||||
},
|
||||
onCategoryClick: function(category, section) {
|
||||
SectionActions.unsetSectionHover();
|
||||
NavigationActions.goToCategory(new Category(category), section);
|
||||
return false;
|
||||
event.preventDefault();
|
||||
},
|
||||
onSubcategoryClick: function(subcategory) {
|
||||
// implement in navigation actions
|
||||
@@ -77,19 +77,7 @@ var SectionsListComponent = React.createClass({
|
||||
{section.get('categories').map(function(category) {
|
||||
return (
|
||||
<li key={category.id}>
|
||||
<span onClick={self.onCategoryClick.bind(self, category, section)}>{category.name}</span>
|
||||
<ul>
|
||||
{category.sub_categories.map(function(subCategory) {
|
||||
|
||||
return (
|
||||
<li key={subCategory.id}>
|
||||
|
||||
{subCategory.name}</li>
|
||||
|
||||
)
|
||||
})}
|
||||
|
||||
</ul>
|
||||
<a onClick={self.onCategoryClick.bind(self, category, section)}>{category.name}</a>
|
||||
</li>
|
||||
)
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user