.gitignore
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -50,3 +50,6 @@
|
|||||||
|
|
||||||
# everyone has its own configuration :)
|
# everyone has its own configuration :)
|
||||||
config.rb
|
config.rb
|
||||||
|
|
||||||
|
# bundle should be ignored
|
||||||
|
ribica.bundle.js
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
var React = require('react');
|
var React = require('react');
|
||||||
var CartStore = require('../../stores/cartStore.js');
|
var CartStore = require('../../stores/cartStore.js');
|
||||||
var CartActions = require('../../actions/cartActions.js');
|
var CartActions = require('../../actions/cartActions.js');
|
||||||
|
var NavigationActions = require('../../actions/navigationActions.js');
|
||||||
var Globals = require('../../globals');
|
var Globals = require('../../globals');
|
||||||
|
|
||||||
var buttonHolderStyle = {
|
var buttonHolderStyle = {
|
||||||
@@ -69,6 +70,10 @@ var AddToCart = React.createClass({
|
|||||||
|
|
||||||
_addToCartClick: function () {
|
_addToCartClick: function () {
|
||||||
CartActions.addNItems(this.props.item, this.state.count);
|
CartActions.addNItems(this.props.item, this.state.count);
|
||||||
|
|
||||||
|
setTimeout(function() {
|
||||||
|
NavigationActions.goToCart();
|
||||||
|
}, 500);
|
||||||
},
|
},
|
||||||
|
|
||||||
componentWillUnmount: function () {
|
componentWillUnmount: function () {
|
||||||
|
|||||||
@@ -16,6 +16,10 @@ var CartPage = React.createClass({
|
|||||||
_onTakeItemOut: function(itemId) {
|
_onTakeItemOut: function(itemId) {
|
||||||
CartActions.takeItemOut(itemId);
|
CartActions.takeItemOut(itemId);
|
||||||
},
|
},
|
||||||
|
_goToStartPage: function() {
|
||||||
|
NavigationActions.goToHome();
|
||||||
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
var counts = this.state.itemCounts;
|
var counts = this.state.itemCounts;
|
||||||
var self = this;
|
var self = this;
|
||||||
@@ -46,7 +50,7 @@ var CartPage = React.createClass({
|
|||||||
<div className="col-lg-6 text-right">
|
<div className="col-lg-6 text-right">
|
||||||
|
|
||||||
<CartTotal items={this.state.items} itemCounts={this.state.itemCounts} /><br />
|
<CartTotal items={this.state.items} itemCounts={this.state.itemCounts} /><br />
|
||||||
<span className={this.state.deliveryDestinationValid ? 'shown' : 'hidden'}>
|
<span className={this.state.deliveryDestinationErrors['place'] ? 'hidden' : 'shown'}>
|
||||||
<CartTotal deliveryCosts={this.state.deliveryCosts} instantDelivery={this.state.deliveryDestination.get('instant_delivery')}/><br />
|
<CartTotal deliveryCosts={this.state.deliveryCosts} instantDelivery={this.state.deliveryDestination.get('instant_delivery')}/><br />
|
||||||
<CartTotal items={this.state.items} itemCounts={this.state.itemCounts} deliveryCosts={this.state.deliveryCosts} instantDelivery={this.state.deliveryDestination.get('instant_delivery')}/>
|
<CartTotal items={this.state.items} itemCounts={this.state.itemCounts} deliveryCosts={this.state.deliveryCosts} instantDelivery={this.state.deliveryDestination.get('instant_delivery')}/>
|
||||||
</span>
|
</span>
|
||||||
@@ -55,7 +59,7 @@ var CartPage = React.createClass({
|
|||||||
|
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-lg-12 pull-left">
|
<div className="col-lg-12 pull-left">
|
||||||
<button className="mybutton" onClick={this._onOrderClick}>Završi narudžbu</button>
|
<button className="mybutton" onClick={this._onOrderClick}>Završi narudžbu</button> ili <button className="btn btn-default" onClick={this._goToStartPage}>Nastavi kupovati</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user