removed redundant ribica name from subfolders

This commit is contained in:
Edin Dazdarevic
2015-01-22 22:20:34 +01:00
parent 13296062f4
commit 335e954bce
150 changed files with 18 additions and 18 deletions

View File

@@ -0,0 +1,61 @@
var React = require('react'),
SectionCollection = require('../models/sectionCollection'),
Section = require('../models/section');
var SectionItem = React.createClass({
subCatClicked: function() {
alert('you clicked on subcategory');
},
render: function() {
var catStyle = {
paddingLeft: '20px'
};
var subStyle = {
paddingLeft: '20px'
};
var style = {
paddingLeft: '30px'
};
var self = this;
return (
<li className="active" role='presentation'>
<a href="#">{this.props.data.get('name')}</a>
<div>
{
this.props.data.get('categories').map(function(cat) {
return (<div style={style}> {cat.name}
{ cat.sub_categories.map(function(sc) {
return <div style={subStyle} onClick={self.subCatClicked}> {sc.name} </div>
}) }
</div>)
})
}
</div>
</li>
);
}
});
var SectionsListComponent = React.createClass({
render: function() {
return (
<div className= "sections-list-component">
<ul className="nav nav-pills">
{this.props.sections.models.map(function(s){
return <SectionItem data={s}></SectionItem>
})}
</ul>
</div>
);
}
});
module.exports = SectionsListComponent;