summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/www/js/lib')
-rw-r--r--StoneIsland/www/js/lib/_router.js1
-rw-r--r--StoneIsland/www/js/lib/account/ProfileView.js4
-rw-r--r--StoneIsland/www/js/lib/nav/NavView.js34
3 files changed, 37 insertions, 2 deletions
diff --git a/StoneIsland/www/js/lib/_router.js b/StoneIsland/www/js/lib/_router.js
index 1e01ce96..d316ffe2 100644
--- a/StoneIsland/www/js/lib/_router.js
+++ b/StoneIsland/www/js/lib/_router.js
@@ -19,6 +19,7 @@ var SiteRouter = Router.extend({
'/account/profile': 'profile',
'/account/payment': 'payment',
'/account/shipping': 'shipping',
+ '/account/settings': 'settings',
'/faq': 'faq',
'/search': 'search',
diff --git a/StoneIsland/www/js/lib/account/ProfileView.js b/StoneIsland/www/js/lib/account/ProfileView.js
index f6e331a5..eb738a04 100644
--- a/StoneIsland/www/js/lib/account/ProfileView.js
+++ b/StoneIsland/www/js/lib/account/ProfileView.js
@@ -8,4 +8,8 @@ var ProfileView = View.extend({
initialize: function(){
},
+ show: function(){
+ document.body.className = "profile"
+ },
+
}) \ No newline at end of file
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')
},