summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-11-11 02:28:43 -0500
committerJules Laplace <jules@okfoc.us>2015-11-11 02:28:43 -0500
commit93b3bded0286b2ec2e8b2f8210590ae7d052f09f (patch)
tree967b61a08cae3efe34b2e2eab801d5ea13780238 /StoneIsland/www/js
parent1d0bff6384549b05927690e60c8bf708eda834bf (diff)
make footer better
Diffstat (limited to 'StoneIsland/www/js')
-rw-r--r--StoneIsland/www/js/lib/account/LoginView.js1
-rw-r--r--StoneIsland/www/js/lib/account/LogoutView.js1
-rw-r--r--StoneIsland/www/js/lib/account/PaymentView.js6
-rw-r--r--StoneIsland/www/js/lib/account/ProfileView.js8
-rw-r--r--StoneIsland/www/js/lib/account/SettingsView.js6
-rw-r--r--StoneIsland/www/js/lib/account/ShippingView.js6
-rw-r--r--StoneIsland/www/js/lib/account/SignupView.js1
-rw-r--r--StoneIsland/www/js/lib/blogs/ArchiveView.js1
-rw-r--r--StoneIsland/www/js/lib/blogs/FaqView.js1
-rw-r--r--StoneIsland/www/js/lib/blogs/HubView.js1
-rw-r--r--StoneIsland/www/js/lib/blogs/StoryView.js1
-rw-r--r--StoneIsland/www/js/lib/cart/CartConfirm.js11
-rw-r--r--StoneIsland/www/js/lib/cart/CartPayment.js12
-rw-r--r--StoneIsland/www/js/lib/cart/CartShipping.js13
-rw-r--r--StoneIsland/www/js/lib/cart/CartSummary.js11
-rw-r--r--StoneIsland/www/js/lib/cart/CartThanks.js10
-rw-r--r--StoneIsland/www/js/lib/cart/CartView.js17
-rw-r--r--StoneIsland/www/js/lib/nav/FooterView.js38
-rw-r--r--StoneIsland/www/js/lib/nav/SearchView.js6
-rw-r--r--StoneIsland/www/js/lib/products/CollectionView.js5
-rw-r--r--StoneIsland/www/js/lib/products/ProductView.js9
-rw-r--r--StoneIsland/www/js/sdk/account.js7
22 files changed, 147 insertions, 25 deletions
diff --git a/StoneIsland/www/js/lib/account/LoginView.js b/StoneIsland/www/js/lib/account/LoginView.js
index 9545b0d8..334c58b2 100644
--- a/StoneIsland/www/js/lib/account/LoginView.js
+++ b/StoneIsland/www/js/lib/account/LoginView.js
@@ -13,6 +13,7 @@ var LoginView = SerializableView.extend({
},
show: function(){
+ app.footer.show("SUBMIT", "CANCEL")
this.$form.get(0).reset()
this.$msg.html("* Your personal and payment information will always remain private")
document.body.className = "login"
diff --git a/StoneIsland/www/js/lib/account/LogoutView.js b/StoneIsland/www/js/lib/account/LogoutView.js
index 45abc303..71e0bc31 100644
--- a/StoneIsland/www/js/lib/account/LogoutView.js
+++ b/StoneIsland/www/js/lib/account/LogoutView.js
@@ -7,6 +7,7 @@ var LogoutView = View.extend({
show: function(){
document.body.className = "logout"
+ app.footer.hide()
},
submit: function(e){
diff --git a/StoneIsland/www/js/lib/account/PaymentView.js b/StoneIsland/www/js/lib/account/PaymentView.js
index 95b63879..103cbf8f 100644
--- a/StoneIsland/www/js/lib/account/PaymentView.js
+++ b/StoneIsland/www/js/lib/account/PaymentView.js
@@ -6,12 +6,18 @@ var PaymentView = View.extend({
},
initialize: function(){
+ this.$form = this.$("form")
+ this.$msg = this.$(".msg")
this.address = new AddressView ({ parent: this })
this.cc = new CreditCardView ({ parent: this })
},
show: function(){
+ app.footer.show("SAVE", "CANCEL")
document.body.className = "payment"
},
+
+ save: function(){
+ },
})
diff --git a/StoneIsland/www/js/lib/account/ProfileView.js b/StoneIsland/www/js/lib/account/ProfileView.js
index eb738a04..b93dcbc5 100644
--- a/StoneIsland/www/js/lib/account/ProfileView.js
+++ b/StoneIsland/www/js/lib/account/ProfileView.js
@@ -6,10 +6,16 @@ var ProfileView = View.extend({
},
initialize: function(){
+ this.$form = this.$("form")
+ this.$msg = this.$(".msg")
},
show: function(){
+ app.footer.show("SAVE", "CANCEL")
document.body.className = "profile"
},
-
+
+ save: function(){
+ },
+
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/account/SettingsView.js b/StoneIsland/www/js/lib/account/SettingsView.js
index b690ed81..f6b2a992 100644
--- a/StoneIsland/www/js/lib/account/SettingsView.js
+++ b/StoneIsland/www/js/lib/account/SettingsView.js
@@ -6,10 +6,16 @@ var SettingsView = View.extend({
},
initialize: function(){
+ this.$form = this.$("form")
+ this.$msg = this.$(".msg")
},
show: function(){
+ app.footer.show("SAVE", "CANCEL")
document.body.className = "settings"
},
+ save: function(){
+ },
+
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/account/ShippingView.js b/StoneIsland/www/js/lib/account/ShippingView.js
index d22029c7..37ba9df9 100644
--- a/StoneIsland/www/js/lib/account/ShippingView.js
+++ b/StoneIsland/www/js/lib/account/ShippingView.js
@@ -6,11 +6,17 @@ var ShippingView = View.extend({
},
initialize: function(){
+ this.$form = this.$("form")
+ this.$msg = this.$(".msg")
this.address = new AddressView ({ parent: this })
},
show: function(){
+ app.footer.show("SAVE", "CANCEL")
document.body.className = "shipping"
},
+
+ save: function(){
+ },
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/account/SignupView.js b/StoneIsland/www/js/lib/account/SignupView.js
index 0f527d4f..d8459f9b 100644
--- a/StoneIsland/www/js/lib/account/SignupView.js
+++ b/StoneIsland/www/js/lib/account/SignupView.js
@@ -12,6 +12,7 @@ var SignupView = SerializableView.extend({
},
show: function(){
+ app.footer.show("SUBMIT", "CANCEL")
this.$form.get(0).reset()
this.$msg.html("* Your personal and payment information will always remain private")
document.body.className = "signup"
diff --git a/StoneIsland/www/js/lib/blogs/ArchiveView.js b/StoneIsland/www/js/lib/blogs/ArchiveView.js
index 91316dea..051ef0c9 100644
--- a/StoneIsland/www/js/lib/blogs/ArchiveView.js
+++ b/StoneIsland/www/js/lib/blogs/ArchiveView.js
@@ -14,6 +14,7 @@ var ArchiveView = ScrollableView.extend({
show: function(){
this.deferScrollToTop()
+ app.footer.hide()
document.body.className = "archive"
},
diff --git a/StoneIsland/www/js/lib/blogs/FaqView.js b/StoneIsland/www/js/lib/blogs/FaqView.js
index bce83d88..fe7246db 100644
--- a/StoneIsland/www/js/lib/blogs/FaqView.js
+++ b/StoneIsland/www/js/lib/blogs/FaqView.js
@@ -13,6 +13,7 @@ var FaqView = ScrollableView.extend({
show: function(){
this.deferScrollToTop()
+ app.footer.hide()
document.body.className = "faq"
},
diff --git a/StoneIsland/www/js/lib/blogs/HubView.js b/StoneIsland/www/js/lib/blogs/HubView.js
index 5832eb2e..3ed45b7c 100644
--- a/StoneIsland/www/js/lib/blogs/HubView.js
+++ b/StoneIsland/www/js/lib/blogs/HubView.js
@@ -14,6 +14,7 @@ var HubView = ScrollableView.extend({
show: function(){
this.deferScrollToTop()
+ app.footer.hide()
document.body.className = "hub"
},
diff --git a/StoneIsland/www/js/lib/blogs/StoryView.js b/StoneIsland/www/js/lib/blogs/StoryView.js
index 62928cec..1829e8cf 100644
--- a/StoneIsland/www/js/lib/blogs/StoryView.js
+++ b/StoneIsland/www/js/lib/blogs/StoryView.js
@@ -18,6 +18,7 @@ var StoryView = ScrollableView.extend({
show: function(){
this.deferScrollToTop()
+ app.footer.hide()
document.body.className = "story"
},
diff --git a/StoneIsland/www/js/lib/cart/CartConfirm.js b/StoneIsland/www/js/lib/cart/CartConfirm.js
index cf01a67e..4bce4db3 100644
--- a/StoneIsland/www/js/lib/cart/CartConfirm.js
+++ b/StoneIsland/www/js/lib/cart/CartConfirm.js
@@ -7,5 +7,16 @@ var CartConfirm = View.extend({
initialize: function(){
},
+
+ show: function(){
+ app.cart.el.className = "confirm"
+ app.footer.show("PLACE ORDER", "CANCEL")
+ },
+
+ save: function(){
+ },
+
+ cancel: function(){
+ },
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/cart/CartPayment.js b/StoneIsland/www/js/lib/cart/CartPayment.js
index 69cbf81b..b70e7f73 100644
--- a/StoneIsland/www/js/lib/cart/CartPayment.js
+++ b/StoneIsland/www/js/lib/cart/CartPayment.js
@@ -6,12 +6,22 @@ var CartPayment = View.extend({
},
initialize: function(){
+ this.$form = this.$("form")
+ this.$msg = this.$(".msg")
this.address = new AddressView ({ parent: this })
this.cc = new CreditCardView ({ parent: this })
},
show: function(){
- document.body.className = "cart_payment"
+ app.cart.el.className = "payment"
+ app.footer.show("CONFIRM &gt;", "CANCEL")
},
+
+ save: function(){
+ },
+
+ cancel: function(){
+ },
+
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/cart/CartShipping.js b/StoneIsland/www/js/lib/cart/CartShipping.js
index 22b2794a..d4c98157 100644
--- a/StoneIsland/www/js/lib/cart/CartShipping.js
+++ b/StoneIsland/www/js/lib/cart/CartShipping.js
@@ -6,11 +6,20 @@ var CartShipping = View.extend({
},
initialize: function(){
+ this.$form = this.$("form")
+ this.$msg = this.$(".msg")
this.address = new AddressView ({ parent: this })
},
-
+
show: function(){
- document.body.className = "cart_shipping"
+ app.cart.el.className = "shipping"
+ app.footer.show("PAYMENT &gt;", "CANCEL")
+ },
+
+ save: function(){
+ },
+
+ cancel: function(){
},
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/cart/CartSummary.js b/StoneIsland/www/js/lib/cart/CartSummary.js
index 37400dd0..6233dfc7 100644
--- a/StoneIsland/www/js/lib/cart/CartSummary.js
+++ b/StoneIsland/www/js/lib/cart/CartSummary.js
@@ -7,5 +7,16 @@ var CartSummary = View.extend({
initialize: function(){
},
+
+ show: function(){
+ app.cart.el.className = "summary"
+ app.footer.show("SHIPPING &gt;", "CANCEL")
+ },
+
+ ok: function(){
+ },
+
+ cancel: function(){
+ },
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/cart/CartThanks.js b/StoneIsland/www/js/lib/cart/CartThanks.js
index e4dff0a3..991f603b 100644
--- a/StoneIsland/www/js/lib/cart/CartThanks.js
+++ b/StoneIsland/www/js/lib/cart/CartThanks.js
@@ -7,5 +7,15 @@ var CartThanks = View.extend({
initialize: function(){
},
+
+ show: function(){
+ app.cart.el.className = "thanks"
+ app.footer.show("&lt; BACK TO COLLECTION")
+ app.footer.hide()
+ },
+
+ ok: function(){
+ app.router.go("store")
+ },
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/cart/CartView.js b/StoneIsland/www/js/lib/cart/CartView.js
index 0292068d..7744ad9d 100644
--- a/StoneIsland/www/js/lib/cart/CartView.js
+++ b/StoneIsland/www/js/lib/cart/CartView.js
@@ -3,6 +3,9 @@ var CartView = View.extend({
el: "#cart",
events: {
+ "click .summary": "show_summary",
+ "click .shipping": "show_shipping",
+ "click .payment": "show_payment",
},
initialize: function(){
@@ -10,10 +13,24 @@ var CartView = View.extend({
this.payment = new CartPayment ()
this.shipping = new CartShipping ()
this.confirm = new CartConfirm ()
+ this.thanks = new CartThanks ()
},
show: function(){
document.body.className = "cart"
+ this.show_summary()
+ },
+
+ show_summary: function(){
+ this.el.className = "summary"
+ },
+
+ show_shipping: function(){
+ this.el.className = "shipping"
+ },
+
+ show_payment: function(){
+ this.el.className = "payment"
},
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/nav/FooterView.js b/StoneIsland/www/js/lib/nav/FooterView.js
index 414dc4c1..7f404581 100644
--- a/StoneIsland/www/js/lib/nav/FooterView.js
+++ b/StoneIsland/www/js/lib/nav/FooterView.js
@@ -3,30 +3,38 @@ var FooterView = View.extend({
el: "#footer",
events: {
- "click .filter": "filter",
- "click .back": "back",
+ "click .ok": "ok",
"click .cancel": "cancel",
-
- "click .save": "ok",
- "click .buynow": "ok",
- "click .addtocart": "ok",
- "click .checkout": "ok",
- "click .checkout_proceed": "ok",
},
initialize: function(){
+ this.$ok = this.$(".ok")
+ this.$cancel = this.$(".cancel")
},
- filter: function(){
- },
- back: function(){
- app.router.go('store')
+ show: function(ok, cancel){
+ if (cancel) {
+ this.$ok.removeClass("wide")
+ this.$cancel.show().html(cancel)
+ }
+ else {
+ this.$ok.addClass("wide")
+ this.$cancel.hide()
+ }
+ this.$ok.html(ok)
+ this.$el.show()
},
- cancel: function(){
+
+ hide: function(){
+ this.$el.hide()
},
-
+
ok: function(){
- (app.view.save || app.view.submit || noop)()
+ (app.view.save || app.view.ok)()
},
+ cancel: function(){
+ (app.view.cancel || app.intro.show)()
+ },
+
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/nav/SearchView.js b/StoneIsland/www/js/lib/nav/SearchView.js
index c9738773..f21634a5 100644
--- a/StoneIsland/www/js/lib/nav/SearchView.js
+++ b/StoneIsland/www/js/lib/nav/SearchView.js
@@ -6,7 +6,11 @@ var SearchView = View.extend({
},
show: function(){
+ app.footer.show("SEARCH", "CANCEL")
document.body.className = "search"
},
-
+
+ save: function(){
+ },
+
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/products/CollectionView.js b/StoneIsland/www/js/lib/products/CollectionView.js
index 490b10fe..dbece93b 100644
--- a/StoneIsland/www/js/lib/products/CollectionView.js
+++ b/StoneIsland/www/js/lib/products/CollectionView.js
@@ -23,6 +23,7 @@ var CollectionView = ScrollableView.extend({
},
show: function(){
+ app.footer.show("FILTER")
document.body.className = "collection"
if (this.loaded) {
return this.populate(this.data)
@@ -30,6 +31,10 @@ var CollectionView = ScrollableView.extend({
this.fetch()
},
+ ok: function(){
+ // this.filter()
+ },
+
fetch: function(){
if (this.loaded) return
this.$loader.show()
diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js
index 9bfbe4a2..fd81f199 100644
--- a/StoneIsland/www/js/lib/products/ProductView.js
+++ b/StoneIsland/www/js/lib/products/ProductView.js
@@ -20,6 +20,8 @@ var ProductView = ScrollableView.extend({
this.$size = this.$(".size")
this.$color = this.$(".color")
this.$body = this.$(".body")
+
+ app.footer.show("&lt; BACK TO SHOPPING", "ADD TO CART")
},
show: function(){
@@ -132,7 +134,12 @@ var ProductView = ScrollableView.extend({
this.$color.html(color.label)
}.bind(this))
},
-
+
+ ok: function(){
+ },
+ cancel: function(){
+ app.router.go('store')
+ },
share: function(){
},
diff --git a/StoneIsland/www/js/sdk/account.js b/StoneIsland/www/js/sdk/account.js
index 7e7eb3dc..0a18ba1e 100644
--- a/StoneIsland/www/js/sdk/account.js
+++ b/StoneIsland/www/js/sdk/account.js
@@ -36,11 +36,10 @@ sdk.account = (function(){
data: opt.data,
success: function(data){
// console.log(data)
- // auth.user_id = data['UserFull']['UserId']
- // auth.access_token = data['UserFull']['AccessToken']
+ auth.user_id = data['UserFull']['UserId']
+ auth.access_token = data['UserFull']['AccessToken']
- // why bother?
- // auth.set_user(user_id, access_token, name)
+ auth.set_user(user_id, access_token, name)
opt.success(data)
},