summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xStoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstatebin41614 -> 41614 bytes
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/account/AccountView.js11
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/account/PaymentView.js14
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/account/ShippingView.js9
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/cart/CartThanks.js3
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/nav/HeaderView.js2
-rwxr-xr-xStoneIsland/platforms/ios/www/js/sdk/address.js4
-rwxr-xr-xStoneIsland/www/js/lib/account/AccountView.js11
-rwxr-xr-xStoneIsland/www/js/lib/account/PaymentView.js14
-rwxr-xr-xStoneIsland/www/js/lib/account/ShippingView.js9
-rwxr-xr-xStoneIsland/www/js/lib/cart/CartConfirm.js3
-rwxr-xr-xStoneIsland/www/js/lib/cart/CartThanks.js3
-rwxr-xr-xStoneIsland/www/js/lib/nav/HeaderView.js2
-rwxr-xr-xStoneIsland/www/js/sdk/address.js4
14 files changed, 67 insertions, 22 deletions
diff --git a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate
index 48ed2a15..36d4b5a6 100755
--- a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate
+++ b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate
Binary files differ
diff --git a/StoneIsland/platforms/ios/www/js/lib/account/AccountView.js b/StoneIsland/platforms/ios/www/js/lib/account/AccountView.js
index c9a94311..9e6f1714 100755
--- a/StoneIsland/platforms/ios/www/js/lib/account/AccountView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/account/AccountView.js
@@ -21,11 +21,16 @@ var AccountView = View.extend({
ccs: [],
ccLookup: {},
- listAddresses: function(cb){
+ listAddresses: function(opt){
sdk.address.list({
success: function(data){
- this.populateAddresses(data, cb)
- }.bind(this)
+ this.populateAddresses(data, opt.success)
+ }.bind(this),
+ error: function(data){
+ console.log("error listing addresses!")
+ console.log(data.responseText)
+ opt.error && opt.error()
+ }.bind(this),
})
},
diff --git a/StoneIsland/platforms/ios/www/js/lib/account/PaymentView.js b/StoneIsland/platforms/ios/www/js/lib/account/PaymentView.js
index 0e300f9b..f773c05b 100755
--- a/StoneIsland/platforms/ios/www/js/lib/account/PaymentView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/account/PaymentView.js
@@ -55,8 +55,8 @@ var PaymentView = FormView.extend({
if (this.cc.data && this.cc.data.Guid) {
sdk.payment.delete_credit_card({
guid: this.cc.data.Guid,
- success: function(){},
- error: function(){},
+ success: function(){ console.log("deleted credit card") },
+ error: function(){ console.log("error deleting credit card") },
})
}
@@ -72,12 +72,18 @@ var PaymentView = FormView.extend({
success: function(data){
app.curtain.show("loading")
- app.account.listAddresses(function(){
- app.curtain.hide("loading")
+ app.account.listAddresses({
+ success: function(){
+ app.curtain.hide("loading")
+ },
+ error: function(){
+ app.curtain.hide("loading")
+ },
})
},
error: function(data){
+ console.log("ERROR WITH PAYMENT")
console.log(data)
},
diff --git a/StoneIsland/platforms/ios/www/js/lib/account/ShippingView.js b/StoneIsland/platforms/ios/www/js/lib/account/ShippingView.js
index 3b7b555a..71cd9eef 100755
--- a/StoneIsland/platforms/ios/www/js/lib/account/ShippingView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/account/ShippingView.js
@@ -66,8 +66,13 @@ var ShippingView = FormView.extend({
success: function(data){
app.curtain.show("loading")
- app.account.listAddresses(function(){
- app.curtain.hide("loading")
+ app.account.listAddresses({
+ success: function(){
+ app.curtain.hide("loading")
+ },
+ error: function(){
+ app.curtain.hide("loading")
+ },
})
},
diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartThanks.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartThanks.js
index eb95197b..798fbbb3 100755
--- a/StoneIsland/platforms/ios/www/js/lib/cart/CartThanks.js
+++ b/StoneIsland/platforms/ios/www/js/lib/cart/CartThanks.js
@@ -12,9 +12,10 @@ var CartThanks = View.extend({
show: function(){
document.body.className = "cart"
app.cart.el.className = "thanks"
+ app.header.set_cart_count(0)
app.footer.show("< BACK TO COLLECTION")
app.footer.hide()
-
+
app.orders.loaded = false
},
diff --git a/StoneIsland/platforms/ios/www/js/lib/nav/HeaderView.js b/StoneIsland/platforms/ios/www/js/lib/nav/HeaderView.js
index 91089d27..0961a5e8 100755
--- a/StoneIsland/platforms/ios/www/js/lib/nav/HeaderView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/nav/HeaderView.js
@@ -54,4 +54,4 @@ var HeaderView = View.extend({
this.$cart_count.html( --this.count )
},
-}) \ No newline at end of file
+})
diff --git a/StoneIsland/platforms/ios/www/js/sdk/address.js b/StoneIsland/platforms/ios/www/js/sdk/address.js
index 4fb12ad0..1256df54 100755
--- a/StoneIsland/platforms/ios/www/js/sdk/address.js
+++ b/StoneIsland/platforms/ios/www/js/sdk/address.js
@@ -15,6 +15,10 @@ sdk.address = (function(){
opt.success(data)
},
error: opt.error,
+ complete: function(data){
+ console.log("really weird")
+ console.log(data)
+ }
})
}
diff --git a/StoneIsland/www/js/lib/account/AccountView.js b/StoneIsland/www/js/lib/account/AccountView.js
index c9a94311..9e6f1714 100755
--- a/StoneIsland/www/js/lib/account/AccountView.js
+++ b/StoneIsland/www/js/lib/account/AccountView.js
@@ -21,11 +21,16 @@ var AccountView = View.extend({
ccs: [],
ccLookup: {},
- listAddresses: function(cb){
+ listAddresses: function(opt){
sdk.address.list({
success: function(data){
- this.populateAddresses(data, cb)
- }.bind(this)
+ this.populateAddresses(data, opt.success)
+ }.bind(this),
+ error: function(data){
+ console.log("error listing addresses!")
+ console.log(data.responseText)
+ opt.error && opt.error()
+ }.bind(this),
})
},
diff --git a/StoneIsland/www/js/lib/account/PaymentView.js b/StoneIsland/www/js/lib/account/PaymentView.js
index 0e300f9b..f773c05b 100755
--- a/StoneIsland/www/js/lib/account/PaymentView.js
+++ b/StoneIsland/www/js/lib/account/PaymentView.js
@@ -55,8 +55,8 @@ var PaymentView = FormView.extend({
if (this.cc.data && this.cc.data.Guid) {
sdk.payment.delete_credit_card({
guid: this.cc.data.Guid,
- success: function(){},
- error: function(){},
+ success: function(){ console.log("deleted credit card") },
+ error: function(){ console.log("error deleting credit card") },
})
}
@@ -72,12 +72,18 @@ var PaymentView = FormView.extend({
success: function(data){
app.curtain.show("loading")
- app.account.listAddresses(function(){
- app.curtain.hide("loading")
+ app.account.listAddresses({
+ success: function(){
+ app.curtain.hide("loading")
+ },
+ error: function(){
+ app.curtain.hide("loading")
+ },
})
},
error: function(data){
+ console.log("ERROR WITH PAYMENT")
console.log(data)
},
diff --git a/StoneIsland/www/js/lib/account/ShippingView.js b/StoneIsland/www/js/lib/account/ShippingView.js
index 3b7b555a..71cd9eef 100755
--- a/StoneIsland/www/js/lib/account/ShippingView.js
+++ b/StoneIsland/www/js/lib/account/ShippingView.js
@@ -66,8 +66,13 @@ var ShippingView = FormView.extend({
success: function(data){
app.curtain.show("loading")
- app.account.listAddresses(function(){
- app.curtain.hide("loading")
+ app.account.listAddresses({
+ success: function(){
+ app.curtain.hide("loading")
+ },
+ error: function(){
+ app.curtain.hide("loading")
+ },
})
},
diff --git a/StoneIsland/www/js/lib/cart/CartConfirm.js b/StoneIsland/www/js/lib/cart/CartConfirm.js
index e1bfb114..a82509af 100755
--- a/StoneIsland/www/js/lib/cart/CartConfirm.js
+++ b/StoneIsland/www/js/lib/cart/CartConfirm.js
@@ -128,9 +128,12 @@ var CartConfirm = FormView.extend({
},
save: function(){
+ app.curtain.show("loading")
promise(sdk.cart.finalize, {}).then(function(){
+ app.curtain.hide("loading")
app.router.go('cart/thanks')
}.bind(this)).error(function(data){
+ app.curtain.hide("loading")
// {"Header":{"StatusCode":403,"Description":"403 Forbidden"},"Error":{"Description":"GenericApiError:CartAlreadyClosed"}}
// {"Header":{"StatusCode":409,"Description":"304 NotModified"},"Error":{"Description":"FinalizationError:\\"Item has been removed from cart because it is no longer available.\\"\\n235"}}'
// {"Header":{"StatusCode":409,"Description":"304 NotModified"},"Error":{"Description":"FinalizationError:\"The cart cannot be empty.\"\n233"}}
diff --git a/StoneIsland/www/js/lib/cart/CartThanks.js b/StoneIsland/www/js/lib/cart/CartThanks.js
index eb95197b..798fbbb3 100755
--- a/StoneIsland/www/js/lib/cart/CartThanks.js
+++ b/StoneIsland/www/js/lib/cart/CartThanks.js
@@ -12,9 +12,10 @@ var CartThanks = View.extend({
show: function(){
document.body.className = "cart"
app.cart.el.className = "thanks"
+ app.header.set_cart_count(0)
app.footer.show("< BACK TO COLLECTION")
app.footer.hide()
-
+
app.orders.loaded = false
},
diff --git a/StoneIsland/www/js/lib/nav/HeaderView.js b/StoneIsland/www/js/lib/nav/HeaderView.js
index 91089d27..0961a5e8 100755
--- a/StoneIsland/www/js/lib/nav/HeaderView.js
+++ b/StoneIsland/www/js/lib/nav/HeaderView.js
@@ -54,4 +54,4 @@ var HeaderView = View.extend({
this.$cart_count.html( --this.count )
},
-}) \ No newline at end of file
+})
diff --git a/StoneIsland/www/js/sdk/address.js b/StoneIsland/www/js/sdk/address.js
index 4fb12ad0..1256df54 100755
--- a/StoneIsland/www/js/sdk/address.js
+++ b/StoneIsland/www/js/sdk/address.js
@@ -15,6 +15,10 @@ sdk.address = (function(){
opt.success(data)
},
error: opt.error,
+ complete: function(data){
+ console.log("really weird")
+ console.log(data)
+ }
})
}