From 16e462faf5e661ceee700f6f0053d502121a5f62 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 9 Nov 2015 23:05:33 -0500 Subject: account nav --- StoneIsland/www/js/lib/nav/NavView.js | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'StoneIsland/www/js/lib/nav/NavView.js') diff --git a/StoneIsland/www/js/lib/nav/NavView.js b/StoneIsland/www/js/lib/nav/NavView.js index 9f82bf08..9019275f 100644 --- a/StoneIsland/www/js/lib/nav/NavView.js +++ b/StoneIsland/www/js/lib/nav/NavView.js @@ -12,6 +12,12 @@ var NavView = View.extend({ "click .faq": "faq", "click .search": "search", + "click .account_back": "account_back", + "click .profile": "profile", + "click .payment": "payment", + "click .shipping": "shipping", + "click .settings": "settings", + "click .fb": "fb", "click .insta": "insta", "click .tw": "tw", @@ -48,15 +54,38 @@ var NavView = View.extend({ }, login: function(){ - this.hide() - if (auth.logged_in()) { + if (true || auth.logged_in()) { this.$el.addClass("account") } else { + this.hide() app.router.go("account/login") } }, + + profile: function(){ + this.hide() + app.router.go("account/profile") + }, + payment: function(){ + this.hide() + app.router.go("account/payment") + }, + shipping: function(){ + this.hide() + app.router.go("account/shipping") + }, + settings: function(){ + this.hide() + app.router.go("account/settings") + }, + + + account_back: function(){ + this.$el.removeClass("account") + }, + search: function(){ this.hide() app.router.go("search") @@ -66,6 +95,7 @@ var NavView = View.extend({ app.router.go("faq") }, + fb: function(){ window.open("https://www.facebook.com/StoneIsland", '_system') }, -- cgit v1.2.3-70-g09d2