Merge branch 'master' of https://github.com/senaduka/ribica
This commit is contained in:
@@ -2,8 +2,8 @@ var React = require('react'),
|
||||
CartStore = require('../../stores/cartStore'),
|
||||
AddToCart = require('../cart/addToCart'),
|
||||
CartActions = require('../../actions/cartActions'),
|
||||
NavigationActions = require('../../actions/navigationActions'),
|
||||
SingleItem = require('../items/singleItem'),
|
||||
AddToCart = require('../cart/addToCart'),
|
||||
Globals = require('../../globals'),
|
||||
CartTotal = require('./cartTotal');
|
||||
|
||||
@@ -32,15 +32,25 @@ var CartPage = React.createClass({
|
||||
<div className="col-md-2"> { Globals.FormatCurrency(count * price) }</div>
|
||||
</div>
|
||||
|
||||
|
||||
)
|
||||
});
|
||||
|
||||
var cartTotal = (
|
||||
<div className="row cart-total">
|
||||
<CartTotal items={this.state.items} itemCounts={this.state.itemCounts} />
|
||||
<div className="col-md-1 span1">
|
||||
<button className="btn btn-warning" onClick="this._onOrderClick">Naruči</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
<div className="cart-page center">
|
||||
{displayedItems}
|
||||
<CartTotal items={this.state.items} itemCounts={this.state.itemCounts} />
|
||||
{cartTotal}
|
||||
{displayedItems}
|
||||
{cartTotal}
|
||||
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -62,6 +72,9 @@ var CartPage = React.createClass({
|
||||
}
|
||||
|
||||
},
|
||||
_onOrderClick: function () {
|
||||
//NavigationActions.goToCheckout();
|
||||
},
|
||||
|
||||
getInitialState: function () {
|
||||
return CartStore.getWholeCartState();
|
||||
|
||||
@@ -20,12 +20,9 @@ var CartTotal = React.createClass({
|
||||
|
||||
});
|
||||
|
||||
return (
|
||||
|
||||
<div className="row-fluid cart-total">
|
||||
<div className="col-md-offset-9 col-md-3">
|
||||
Ukupno: {Globals.FormatCurrency(total)} + Dostava
|
||||
</div>
|
||||
return (
|
||||
<div className="col-md-3 cart-total">
|
||||
Ukupno: {Globals.FormatCurrency(total)} + Dostava
|
||||
</div>
|
||||
);
|
||||
|
||||
|
||||
@@ -32,4 +32,6 @@
|
||||
|
||||
.cart-total {
|
||||
font-size: 17px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
Reference in New Issue
Block a user