summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-03-07 16:14:16 +0100
committerJules Laplace <jules@okfoc.us>2016-03-07 16:14:16 +0100
commit3bd704dd83f55a038b1eac699ecdf1fa3bbf8123 (patch)
tree0c39b0649eeda9e45417570c0ef7b36aaa68663a
parentf32930fac442c7948132844a9648879fbd62bab2 (diff)
fixing weirdness
-rwxr-xr-xStoneIsland/config.xml2
-rwxr-xr-xStoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstatebin41602 -> 41614 bytes
-rwxr-xr-xStoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist4
-rwxr-xr-xStoneIsland/platforms/ios/Stone Island/config.xml2
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/account/AccountView.js1
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/auth/SignupView.js9
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/cart/CartConfirm.js1
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js5
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/cart/CartShipping.js1
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js1
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/view/Serializable.js10
-rwxr-xr-xStoneIsland/www/js/lib/account/AccountView.js1
-rwxr-xr-xStoneIsland/www/js/lib/auth/SignupView.js9
-rwxr-xr-xStoneIsland/www/js/lib/cart/CartConfirm.js1
-rwxr-xr-xStoneIsland/www/js/lib/cart/CartPayment.js5
-rwxr-xr-xStoneIsland/www/js/lib/cart/CartShipping.js1
-rwxr-xr-xStoneIsland/www/js/lib/cart/CartSummary.js1
-rwxr-xr-xStoneIsland/www/js/lib/view/Serializable.js10
18 files changed, 50 insertions, 14 deletions
diff --git a/StoneIsland/config.xml b/StoneIsland/config.xml
index 33cbbd87..6a9ded95 100755
--- a/StoneIsland/config.xml
+++ b/StoneIsland/config.xml
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
-<widget id="us.okfoc.stoneisland" version="0.5.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+<widget id="us.okfoc.stoneisland" version="0.5.5" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Stone Island</name>
<description>
Stone Island
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 95a3a47b..48ed2a15 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/Stone Island/Stone Island-Info.plist b/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist
index 73cfd97a..96abd27c 100755
--- a/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist
+++ b/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist
@@ -57,7 +57,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>0.5.4</string>
+ <string>0.5.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
@@ -70,7 +70,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
- <string>0.5.4</string>
+ <string>0.5.5</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>youtube</string>
diff --git a/StoneIsland/platforms/ios/Stone Island/config.xml b/StoneIsland/platforms/ios/Stone Island/config.xml
index caaf6ba2..aae77f74 100755
--- a/StoneIsland/platforms/ios/Stone Island/config.xml
+++ b/StoneIsland/platforms/ios/Stone Island/config.xml
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
-<widget id="us.okfoc.stoneisland" version="0.5.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+<widget id="us.okfoc.stoneisland" version="0.5.5" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<preference name="AllowInlineMediaPlayback" value="false" />
<preference name="BackupWebStorage" value="cloud" />
<preference name="DisallowOverscroll" value="false" />
diff --git a/StoneIsland/platforms/ios/www/js/lib/account/AccountView.js b/StoneIsland/platforms/ios/www/js/lib/account/AccountView.js
index 0d015ab3..c9a94311 100755
--- a/StoneIsland/platforms/ios/www/js/lib/account/AccountView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/account/AccountView.js
@@ -53,6 +53,7 @@ var AccountView = View.extend({
}.bind(this))
app.cart.shipping.populate()
+ app.cart.payment.populate()
cb && cb()
},
diff --git a/StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js b/StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js
index 4645d4d9..8d9cf52d 100755
--- a/StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js
@@ -103,7 +103,14 @@ var SignupView = FormView.extend({
app.signup.show_errors([[ 'Name', data['Error']['Description'] ]])
}
catch (e) {
- app.signup.show_errors([[ 'Name', "There was an unknown error." ]])
+ switch (data.status) {
+ case 409:
+ app.signup.show_errors([[ 'Email', "Email is already in use." ]])
+ break
+ default:
+ app.signup.show_errors([[ 'Name', "There was an unknown error." ]])
+ break
+ }
}
},
diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartConfirm.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartConfirm.js
index b7eb8828..e1bfb114 100755
--- a/StoneIsland/platforms/ios/www/js/lib/cart/CartConfirm.js
+++ b/StoneIsland/platforms/ios/www/js/lib/cart/CartConfirm.js
@@ -32,6 +32,7 @@ var CartConfirm = FormView.extend({
window.location.hash = "#/cart/confirm"
this.deferScrollToTop()
+ app.view = this
app.curtain.show("loading")
promise(sdk.cart.get_status).then( this.populate.bind(this) )
},
diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js
index ab454246..a19e69a5 100755
--- a/StoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js
+++ b/StoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js
@@ -44,6 +44,7 @@ var CartPayment = FormView.extend({
app.footer.show("CONFIRM &gt;")
window.location.hash = "#/cart/payment"
+ app.view = this
this.populate()
this.deferScrollToTop()
},
@@ -138,7 +139,9 @@ var CartPayment = FormView.extend({
this.success()
}.bind(this)).error(function(data){
app.curtain.hide("loading")
+ console.log("card payment error")
console.log(data)
+ app.cart.payment.show_errors([["","There was a problem with your credit card."]])
}.bind(this))
return
@@ -173,6 +176,7 @@ var CartPayment = FormView.extend({
},
error: function(data){
+ console.log("card payment error")
console.log(data)
app.cart.payment.show_errors([["Number","There was a problem with your credit card."]])
},
@@ -181,5 +185,4 @@ var CartPayment = FormView.extend({
app.router.go('cart/shipping')
},
-
}) \ No newline at end of file
diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartShipping.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartShipping.js
index 1f60307e..fd227324 100755
--- a/StoneIsland/platforms/ios/www/js/lib/cart/CartShipping.js
+++ b/StoneIsland/platforms/ios/www/js/lib/cart/CartShipping.js
@@ -30,6 +30,7 @@ var CartShipping = FormView.extend({
app.cart.el.className = "shipping"
app.footer.show("PAYMENT &gt;")
window.location.hash = "#/cart/shipping"
+ app.view = this
this.populate()
this.deferScrollToTop()
},
diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js
index c3156265..9b5da7b7 100755
--- a/StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js
+++ b/StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js
@@ -28,6 +28,7 @@ var CartSummary = ScrollableView.extend({
document.body.className = "cart"
app.cart.el.className = "summary"
window.location.hash = "#/cart/summary"
+ app.view = this
if (auth.has_cart()) {
this.load()
}
diff --git a/StoneIsland/platforms/ios/www/js/lib/view/Serializable.js b/StoneIsland/platforms/ios/www/js/lib/view/Serializable.js
index 98aa8ce3..8d25daf4 100755
--- a/StoneIsland/platforms/ios/www/js/lib/view/Serializable.js
+++ b/StoneIsland/platforms/ios/www/js/lib/view/Serializable.js
@@ -97,7 +97,8 @@ var SerializableView = View.extend({
},
show_errors: function(errors){
- console.log(errors)
+ console.log("showing errors")
+ console.log(errors)
var msgs = []
errors.forEach(function(e, i){
if (i > 0) { return }
@@ -146,17 +147,20 @@ var SerializableView = View.extend({
}.bind(this),
error: function(data){
app.curtain.hide("loading")
+ console.log("api error")
this.error(data)
}.bind(this),
})
},
success: function(data){
- console.log("SUCCESS", data)
+ console.log("SUCCESS")
+ console.log(data)
},
error: function(data){
- console.log("FAIL", data)
+ console.log("FAIL")
+ console.log(data)
},
})
diff --git a/StoneIsland/www/js/lib/account/AccountView.js b/StoneIsland/www/js/lib/account/AccountView.js
index 0d015ab3..c9a94311 100755
--- a/StoneIsland/www/js/lib/account/AccountView.js
+++ b/StoneIsland/www/js/lib/account/AccountView.js
@@ -53,6 +53,7 @@ var AccountView = View.extend({
}.bind(this))
app.cart.shipping.populate()
+ app.cart.payment.populate()
cb && cb()
},
diff --git a/StoneIsland/www/js/lib/auth/SignupView.js b/StoneIsland/www/js/lib/auth/SignupView.js
index 4645d4d9..8d9cf52d 100755
--- a/StoneIsland/www/js/lib/auth/SignupView.js
+++ b/StoneIsland/www/js/lib/auth/SignupView.js
@@ -103,7 +103,14 @@ var SignupView = FormView.extend({
app.signup.show_errors([[ 'Name', data['Error']['Description'] ]])
}
catch (e) {
- app.signup.show_errors([[ 'Name', "There was an unknown error." ]])
+ switch (data.status) {
+ case 409:
+ app.signup.show_errors([[ 'Email', "Email is already in use." ]])
+ break
+ default:
+ app.signup.show_errors([[ 'Name', "There was an unknown error." ]])
+ break
+ }
}
},
diff --git a/StoneIsland/www/js/lib/cart/CartConfirm.js b/StoneIsland/www/js/lib/cart/CartConfirm.js
index b7eb8828..e1bfb114 100755
--- a/StoneIsland/www/js/lib/cart/CartConfirm.js
+++ b/StoneIsland/www/js/lib/cart/CartConfirm.js
@@ -32,6 +32,7 @@ var CartConfirm = FormView.extend({
window.location.hash = "#/cart/confirm"
this.deferScrollToTop()
+ app.view = this
app.curtain.show("loading")
promise(sdk.cart.get_status).then( this.populate.bind(this) )
},
diff --git a/StoneIsland/www/js/lib/cart/CartPayment.js b/StoneIsland/www/js/lib/cart/CartPayment.js
index ab454246..a19e69a5 100755
--- a/StoneIsland/www/js/lib/cart/CartPayment.js
+++ b/StoneIsland/www/js/lib/cart/CartPayment.js
@@ -44,6 +44,7 @@ var CartPayment = FormView.extend({
app.footer.show("CONFIRM &gt;")
window.location.hash = "#/cart/payment"
+ app.view = this
this.populate()
this.deferScrollToTop()
},
@@ -138,7 +139,9 @@ var CartPayment = FormView.extend({
this.success()
}.bind(this)).error(function(data){
app.curtain.hide("loading")
+ console.log("card payment error")
console.log(data)
+ app.cart.payment.show_errors([["","There was a problem with your credit card."]])
}.bind(this))
return
@@ -173,6 +176,7 @@ var CartPayment = FormView.extend({
},
error: function(data){
+ console.log("card payment error")
console.log(data)
app.cart.payment.show_errors([["Number","There was a problem with your credit card."]])
},
@@ -181,5 +185,4 @@ var CartPayment = FormView.extend({
app.router.go('cart/shipping')
},
-
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/cart/CartShipping.js b/StoneIsland/www/js/lib/cart/CartShipping.js
index 1f60307e..fd227324 100755
--- a/StoneIsland/www/js/lib/cart/CartShipping.js
+++ b/StoneIsland/www/js/lib/cart/CartShipping.js
@@ -30,6 +30,7 @@ var CartShipping = FormView.extend({
app.cart.el.className = "shipping"
app.footer.show("PAYMENT &gt;")
window.location.hash = "#/cart/shipping"
+ app.view = this
this.populate()
this.deferScrollToTop()
},
diff --git a/StoneIsland/www/js/lib/cart/CartSummary.js b/StoneIsland/www/js/lib/cart/CartSummary.js
index c3156265..9b5da7b7 100755
--- a/StoneIsland/www/js/lib/cart/CartSummary.js
+++ b/StoneIsland/www/js/lib/cart/CartSummary.js
@@ -28,6 +28,7 @@ var CartSummary = ScrollableView.extend({
document.body.className = "cart"
app.cart.el.className = "summary"
window.location.hash = "#/cart/summary"
+ app.view = this
if (auth.has_cart()) {
this.load()
}
diff --git a/StoneIsland/www/js/lib/view/Serializable.js b/StoneIsland/www/js/lib/view/Serializable.js
index 98aa8ce3..8d25daf4 100755
--- a/StoneIsland/www/js/lib/view/Serializable.js
+++ b/StoneIsland/www/js/lib/view/Serializable.js
@@ -97,7 +97,8 @@ var SerializableView = View.extend({
},
show_errors: function(errors){
- console.log(errors)
+ console.log("showing errors")
+ console.log(errors)
var msgs = []
errors.forEach(function(e, i){
if (i > 0) { return }
@@ -146,17 +147,20 @@ var SerializableView = View.extend({
}.bind(this),
error: function(data){
app.curtain.hide("loading")
+ console.log("api error")
this.error(data)
}.bind(this),
})
},
success: function(data){
- console.log("SUCCESS", data)
+ console.log("SUCCESS")
+ console.log(data)
},
error: function(data){
- console.log("FAIL", data)
+ console.log("FAIL")
+ console.log(data)
},
})