summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/www/js/lib/account/AccountView.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2017-11-24 01:24:24 +0100
committerJules Laplace <julescarbon@gmail.com>2017-11-24 01:24:24 +0100
commit4380488815fa9dfe899fbacf71f5e0848544dd37 (patch)
tree80a8ab62e7a5dd52a391e2727b06255a2949c96d /StoneIsland/platforms/ios/www/js/lib/account/AccountView.js
parent7a46e7f1fa592658415e0da4fe42033a31ce3951 (diff)
fix deep linking
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/lib/account/AccountView.js')
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/account/AccountView.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/StoneIsland/platforms/ios/www/js/lib/account/AccountView.js b/StoneIsland/platforms/ios/www/js/lib/account/AccountView.js
index 73637cd1..04dfa828 100755
--- a/StoneIsland/platforms/ios/www/js/lib/account/AccountView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/account/AccountView.js
@@ -3,13 +3,13 @@ var AccountView = View.extend({
initialize: function(){
},
- connect: function(cb){
- auth.init(this.ready.bind(this, cb))
+ connect: function(initialLoginPath){
+ auth.init(this.ready.bind(this, function(){}, initialLoginPath))
},
- ready: function(cb){
+ ready: function(cb, initialLoginPath){
if (auth.logged_in()) {
- this.logged_in(cb)
+ this.logged_in(cb, initialLoginPath)
}
else {
this.logged_out(cb)
@@ -88,7 +88,7 @@ var AccountView = View.extend({
cb && cb()
},
- logged_in: function(cb){
+ logged_in: function(cb, initialLoginPath){
this.listAddresses()
this.listCreditCards()
$("#nav .login").hide()
@@ -127,7 +127,12 @@ var AccountView = View.extend({
})
}
else {
- app.router.go("account/profile")
+ if (initialLoginPath) {
+ app.router.go(initialLoginPath)
+ }
+ else {
+ app.router.go("account/profile")
+ }
app.curtain.hide("loading")
}
},