small ui changes, fixed issue with items floating
This commit is contained in:
@@ -12,43 +12,41 @@ var SingleItem = React.createClass({
|
|||||||
var itemClick = this.itemClick;
|
var itemClick = this.itemClick;
|
||||||
var firstImage = this.props.item.get('multi_media_descriptions')[0];
|
var firstImage = this.props.item.get('multi_media_descriptions')[0];
|
||||||
firstImage = firstImage || { resized_url: "https://res.cloudinary.com/lfvt7ps2n/image/upload/c_fit,h_172,w_226/v1421732950/http_www.asms.ru_bitrix_templates_main_images_nophoto_irnofq.png" } ;
|
firstImage = firstImage || { resized_url: "https://res.cloudinary.com/lfvt7ps2n/image/upload/c_fit,h_172,w_226/v1421732950/http_www.asms.ru_bitrix_templates_main_images_nophoto_irnofq.png" } ;
|
||||||
if (hidePrice) {
|
if (hidePrice) {
|
||||||
return (
|
return (
|
||||||
<div className="col-lg-2 col-md-2 col-sm-3 col-xs-6">
|
<div className="col-lg-2 col-md-2 col-sm-3 col-xs-6">
|
||||||
<div className="productbox">
|
<div className="productbox">
|
||||||
<img className="img-responsive" src={firstImage.url} alt="product image" />
|
<img className="img-responsive" src={firstImage.url} alt="product image" />
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<p>{ this.props.item.get('brand') ? this.props.item.get('brand').name : '' }{ this.props.item.get('name') }</p>
|
<p>{ this.props.item.get('brand') ? this.props.item.get('brand').name : '' }{ this.props.item.get('name') }</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return (
|
return (
|
||||||
|
|
||||||
<div className="col-lg-3 col-md-3 col-sm-4 col-xs-6" onClick={itemClick}>
|
<div className="col-lg-3 col-md-3 col-sm-4 col-xs-6" onClick={itemClick}>
|
||||||
<div className="productbox">
|
<div className="productbox">
|
||||||
<img className="img-responsive" src={firstImage.resized_url} alt="product image" />
|
<img className="img-responsive" src={firstImage.resized_url} alt="product image" />
|
||||||
<div>
|
<div style={{height: "110px"}}>
|
||||||
<div>
|
|
||||||
<p>{ this.props.item.get('brand') ? this.props.item.get('brand').name : '' }{ this.props.item.get('name') }</p>
|
<p>{ this.props.item.get('brand') ? this.props.item.get('brand').name : '' }{ this.props.item.get('name') }</p>
|
||||||
<h4>{ this.props.item.get('list_price') } KM </h4>
|
<h4>{ this.props.item.get('list_price') } KM </h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
itemClick: function(e) {
|
itemClick: function(e) {
|
||||||
NavigationActions.goToItemDetails(this.props.item);
|
NavigationActions.goToItemDetails(this.props.item);
|
||||||
console.log(this.props.item)
|
console.log(this.props.item)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
module.exports = SingleItem;
|
module.exports = SingleItem;
|
||||||
|
|||||||
@@ -9,11 +9,7 @@ var StartPage = React.createClass({
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<div className='col-md-2'>
|
<div className='col-md-12'>
|
||||||
left content
|
|
||||||
</div>
|
|
||||||
<div className='col-md-10'>
|
|
||||||
<h2>Ribica Start Page</h2>
|
|
||||||
<LinkBanner locationName="startPage" />
|
<LinkBanner locationName="startPage" />
|
||||||
<AllItems />
|
<AllItems />
|
||||||
<RouteHandler />
|
<RouteHandler />
|
||||||
|
|||||||
Reference in New Issue
Block a user