summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/www/js/lib/account/AccountView.js
diff options
context:
space:
mode:
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")
}
},