summaryrefslogtreecommitdiff
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
parentf4f94bedc9027e630c1277d15e414db686a948bd (diff)
account nav
-rw-r--r--StoneIsland/www/css/account.css8
-rw-r--r--StoneIsland/www/css/nav.css5
-rw-r--r--StoneIsland/www/index.html2
-rw-r--r--StoneIsland/www/js/index.js1
-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
7 files changed, 53 insertions, 2 deletions
diff --git a/StoneIsland/www/css/account.css b/StoneIsland/www/css/account.css
index b16c60e0..a6bfe4fd 100644
--- a/StoneIsland/www/css/account.css
+++ b/StoneIsland/www/css/account.css
@@ -1,3 +1,11 @@
+.profile #footer .cancel,
+.profile #footer .submit,
+.payment #footer .cancel,
+.payment #footer .submit,
+.shipping #footer .cancel,
+.shipping #footer .submit,
+.settings #footer .cancel,
+.settings #footer .submit,
.login #footer .cancel,
.login #footer .submit,
.signup #footer .cancel,
diff --git a/StoneIsland/www/css/nav.css b/StoneIsland/www/css/nav.css
index 98c5402e..33a7d026 100644
--- a/StoneIsland/www/css/nav.css
+++ b/StoneIsland/www/css/nav.css
@@ -36,6 +36,7 @@
width: 120px;
height: 80px;
margin-left: 20px;
+ display: block !important;
}
#nav .menu span {
display: block;
@@ -43,6 +44,10 @@
color: #000;
padding: 15px 0 15px 20px;
}
+#nav .main_menu { display: block; }
+#nav .account_menu { display: none; }
+#nav.account .main_menu { display: none; }
+#nav.account .account_menu { display: block; }
#nav .submenu {
position: absolute;
width: 100%;
diff --git a/StoneIsland/www/index.html b/StoneIsland/www/index.html
index 77a47147..5544d327 100644
--- a/StoneIsland/www/index.html
+++ b/StoneIsland/www/index.html
@@ -39,6 +39,7 @@
<span class="archive">ARCHIVE</span>
</div>
<div class="account_menu">
+ <span class="account_back">&lt; ACCOUNT</span>
<span class="profile">PROFILE</span>
<span class="payment">PAYMENT</span>
<span class="shipping">SHIPPING</span>
@@ -454,6 +455,7 @@
<script src="js/vendor/view/formview.js"></script>
<script src="js/vendor/view/router.js"></script>
<script src="js/vendor/view/scrollable.js"></script>
+<script src="js/vendor/view/serializable.js"></script>
<script src="js/lib/cart/CartView.js"></script>
<script src="js/lib/cart/CartPayment.js"></script>
diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js
index 5023873c..a2bbf992 100644
--- a/StoneIsland/www/js/index.js
+++ b/StoneIsland/www/js/index.js
@@ -44,6 +44,7 @@ var app = (function(){
app.profile = new ProfileView ()
app.payment = new PaymentView ()
app.shipping = new ShippingView ()
+ app.settings = new SettingsView ()
app.intro = new IntroView ()
app.faq = new FaqView ()
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')
},