fixed wierd behavior of the main menu
This commit is contained in:
@@ -33,11 +33,16 @@ var SectionsListComponent = React.createClass({
|
|||||||
onMouseOut: function() {
|
onMouseOut: function() {
|
||||||
SectionActions.unsetSectionHover();
|
SectionActions.unsetSectionHover();
|
||||||
},
|
},
|
||||||
|
onMouseLeave: function() {
|
||||||
|
SectionActions.unsetSectionHover();
|
||||||
|
},
|
||||||
onSectionClick: function(section) {
|
onSectionClick: function(section) {
|
||||||
|
SectionActions.unsetSectionHover();
|
||||||
NavigationActions.goToSection(section);
|
NavigationActions.goToSection(section);
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
onCategoryClick: function(category, section) {
|
onCategoryClick: function(category, section) {
|
||||||
|
SectionActions.unsetSectionHover();
|
||||||
NavigationActions.goToCategory(new Category(category), section);
|
NavigationActions.goToCategory(new Category(category), section);
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
@@ -61,13 +66,14 @@ var SectionsListComponent = React.createClass({
|
|||||||
{this.state.sections.map(function(section) {
|
{this.state.sections.map(function(section) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<li key={section.get('id')} role='presentation' style={style}>
|
<li key={section.get('id')} onMouseLeave={self.onMouseOut} onMouseOver={self.onMouseOver.bind(self, section)} role='presentation' style={style}>
|
||||||
<a href="#" onClick={self.onSectionClick.bind(self, section)} onMouseOver={self.onMouseOver.bind(self, section)}>
|
<a href="#" onClick={self.onSectionClick.bind(self, section)} >
|
||||||
{ section.get('name') }
|
{ section.get('name') }
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
<div style={abStyle} className={section.get('id') !== self.state.hoveredSection ? "hide section-cat-list": "section-cat-list"} >
|
<div style={abStyle} className={section.get('id') !== self.state.hoveredSection ? "hide section-cat-list": "section-cat-list"} >
|
||||||
|
|
||||||
<ul onMouseLeave={self.onMouseOut} >
|
<ul >
|
||||||
{section.get('categories').map(function(category) {
|
{section.get('categories').map(function(category) {
|
||||||
return (
|
return (
|
||||||
<li key={category.id}>
|
<li key={category.id}>
|
||||||
|
|||||||
Reference in New Issue
Block a user