summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/nav/NavView.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-11-09 23:05:33 -0500
committerJules Laplace <jules@okfoc.us>2015-11-09 23:07:10 -0500
commit16e462faf5e661ceee700f6f0053d502121a5f62 (patch)
tree0b23c8ced6843ea54d956b224fbac5e8ae6de9b7 /StoneIsland/www/js/lib/nav/NavView.js
parentf4f94bedc9027e630c1277d15e414db686a948bd (diff)
account nav
Diffstat (limited to 'StoneIsland/www/js/lib/nav/NavView.js')
-rw-r--r--StoneIsland/www/js/lib/nav/NavView.js34
1 files changed, 32 insertions, 2 deletions
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')
},