now displaying traits on item details page
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
var React = require('react'),
|
||||
Carousel = require('../shared/carousel'),
|
||||
Traits = require('../items/traits'),
|
||||
ItemDetailsActions = require('../../actions/itemDetailsActions'),
|
||||
NavigationStore = require('../../stores/navigationStore'),
|
||||
ItemDetailsStore = require('../../stores/itemDetailsStore');
|
||||
@@ -12,32 +13,26 @@ var ItemWithDetailsPage = React.createClass({
|
||||
render: function() {
|
||||
|
||||
return (
|
||||
|
||||
|
||||
<div className="item-with-details row-fluid center">
|
||||
<div className="col-md-5">
|
||||
|
||||
|
||||
<Carousel images={this.state.images}
|
||||
selected={this.state.currentImage}
|
||||
onClickLeft={this.onClickLeft}
|
||||
onClickRight={this.onClickRight}
|
||||
onSelectImage={this.onSelectImage} />
|
||||
<div className="col-md-5">
|
||||
<Carousel images={this.state.images}
|
||||
selected={this.state.currentImage}
|
||||
onClickLeft={this.onClickLeft}
|
||||
onClickRight={this.onClickRight}
|
||||
onSelectImage={this.onSelectImage} />
|
||||
|
||||
</div>
|
||||
<div className="col-md-7">
|
||||
<h3> {this.state.item.get('name')} </h3>
|
||||
<div>
|
||||
<div className='h4'> {this.state.item.get('list_price')} KM</div>
|
||||
<div className='h5'>{this.state.item.get('pricePerUnit')}</div>
|
||||
</div>
|
||||
|
||||
<div className="col-md-7">
|
||||
<h3> {this.state.item.get('name')}</h3>
|
||||
<div>
|
||||
<div className='h4'> {this.state.item.get('list_price')} KM</div>
|
||||
<div className='h5'>{this.state.item.get('pricePerUnit')}</div>
|
||||
<div> {this.state.item.get('description')}</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div> {this.state.item.get('description')}</div>
|
||||
</div>
|
||||
|
||||
quantitative descriptions
|
||||
</div>
|
||||
<Traits traits={this.state.item.get('traits')} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -50,6 +45,11 @@ var ItemWithDetailsPage = React.createClass({
|
||||
ItemDetailsActions.loadItemWithDetails();
|
||||
},
|
||||
|
||||
componentWillUnmount: function () {
|
||||
ItemDetailsStore.removeChangeListener(this._onChange);
|
||||
NavigationStore.removeChangeListener(this._onChange);
|
||||
},
|
||||
|
||||
|
||||
onClickLeft: function() {
|
||||
ItemDetailsActions.previousCarouselImage();
|
||||
|
||||
Reference in New Issue
Block a user