diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-11-11 02:28:43 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-11-11 02:28:43 -0500 |
| commit | 93b3bded0286b2ec2e8b2f8210590ae7d052f09f (patch) | |
| tree | 967b61a08cae3efe34b2e2eab801d5ea13780238 | |
| parent | 1d0bff6384549b05927690e60c8bf708eda834bf (diff) | |
make footer better
27 files changed, 176 insertions, 62 deletions
diff --git a/StoneIsland/www/css/cart.css b/StoneIsland/www/css/cart.css index b479f36d..e8a1e8fb 100644 --- a/StoneIsland/www/css/cart.css +++ b/StoneIsland/www/css/cart.css @@ -27,23 +27,27 @@ color: #888; } -#summary { +#cart.summary #cart_summary { display: block } +#cart_summary { display: none; } -#shipping { +#cart.payment #cart_payment { display: block } +#cart_payment { display: none; } -#billing { +#cart.shipping #cart_shipping { display: block } +#cart_shipping { display: none; } -.cart_payment #cart_payment { display: block } -#cart_payment { +#cart.confirm #cart_confirm { display: block } +#cart_confirm { display: none; } -.cart_shipping #cart_shipping { display: block } -#cart_shipping { + +#cart.thanks #cart_thanks { display: block } +#cart_thanks { display: none; } diff --git a/StoneIsland/www/css/index.css b/StoneIsland/www/css/index.css index f57aebed..79364e54 100644 --- a/StoneIsland/www/css/index.css +++ b/StoneIsland/www/css/index.css @@ -22,9 +22,9 @@ body { width: 80px; height: 80px; position: absolute; - top: 50%; + top: 50vw; left: 50%; - margin-top: -40px; + margin-top: -60px; margin-left: -40px; display: none; } diff --git a/StoneIsland/www/css/nav.css b/StoneIsland/www/css/nav.css index 33a7d026..e1e045a3 100644 --- a/StoneIsland/www/css/nav.css +++ b/StoneIsland/www/css/nav.css @@ -169,25 +169,21 @@ border-top: 1px solid #ddd; z-index: 1; } -#footer span { - display: none; +#footer div { + width: 50%; + text-align: center; padding: 10px 0; color: #bbb; + float: left; } -#footer .filter { - float: right; - padding: 10px; +#footer .ok { + color: #000; } -#footer .back, -#footer .buynow, -#footer .addtocart, -#footer .cancel, -#footer .submit, -#footer .checkout, -#footer .checkout_proceed { - width: 50%; - text-align: center; - float: left; +#footer .ok.wide { + width: 100%; +} +#footer .ok.disabled { + color: #bbb; } diff --git a/StoneIsland/www/css/products.css b/StoneIsland/www/css/products.css index cd0814d8..8e97b233 100644 --- a/StoneIsland/www/css/products.css +++ b/StoneIsland/www/css/products.css @@ -1,5 +1,4 @@ .collection #collection { display: block } -.collection #footer .filter { display: block } #collection { display: none; text-align: center; @@ -15,8 +14,6 @@ } .product #product { display: block } -.product #footer .back { display: block } -.product #footer .addtocart { display: block } #product { display: none; } diff --git a/StoneIsland/www/index.html b/StoneIsland/www/index.html index 5544d327..e701929b 100644 --- a/StoneIsland/www/index.html +++ b/StoneIsland/www/index.html @@ -68,24 +68,18 @@ <div class="hub">HUB</div> <div class="story">STORY</div> <div class="archive">ARCHIVE</div> - <span class="latlng">+40.589060 -74.044636</span> + <span class="latlng">+40° 58' 90" -74° 04' 46"</span> </div> <div id="header"> <span class="burger ion-android-menu"></span> <span class="logo"></span> - <span class="cart"><span class="cart_count">2</span></span> + <span class="cart"><span class="cart_count">0</span></span> </div> <div id="footer"> - <span class="filter">FILTER</span> - <span class="back">< BACK TO SHOPPING</span> - <span class="buynow">BUY NOW</span> - <span class="addtocart">ADD TO CART</span> - <span class="cancel">CANCEL</span> - <span class="submit">SUBMIT</span> - <span class="checkout">CHECKOUT</span> - <span class="checkout_proceed">PROCEED WITH CHECKOUT</span> + <div class="cancel">CANCEL</div> + <div class="ok">OK</div> </div> @@ -462,6 +456,7 @@ <script src="js/lib/cart/CartShipping.js"></script> <script src="js/lib/cart/CartSummary.js"></script> <script src="js/lib/cart/CartConfirm.js"></script> +<script src="js/lib/cart/CartThanks.js"></script> <script src="js/lib/nav/IntroView.js"></script> <script src="js/lib/nav/CurtainView.js"></script> 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 >", "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 >", "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 >", "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("< 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("< 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) }, |
