From 6257d7855a89b70d39baa7d91f2f0aa5dde77aaf Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 9 Nov 2015 02:04:26 -0500 Subject: signup view --- StoneIsland/www/css/account.css | 27 +++++++++++++++++++++++++++ StoneIsland/www/css/cart.css | 9 +++++++++ StoneIsland/www/css/nav.css | 7 ++++++- StoneIsland/www/index.html | 28 ++++++++++++++++++++++++---- StoneIsland/www/js/lib/account/LoginView.js | 11 +++++++++-- StoneIsland/www/js/lib/account/SignupView.js | 23 +++++++++++++++++++++++ StoneIsland/www/js/lib/cart/CartBilling.js | 12 ------------ StoneIsland/www/js/lib/cart/CartPayment.js | 16 ++++++++++++++++ StoneIsland/www/js/lib/cart/CartShipping.js | 4 ++++ StoneIsland/www/js/lib/cart/CartView.js | 2 +- 10 files changed, 119 insertions(+), 20 deletions(-) delete mode 100644 StoneIsland/www/js/lib/cart/CartBilling.js create mode 100644 StoneIsland/www/js/lib/cart/CartPayment.js diff --git a/StoneIsland/www/css/account.css b/StoneIsland/www/css/account.css index 70f8d216..e023480b 100644 --- a/StoneIsland/www/css/account.css +++ b/StoneIsland/www/css/account.css @@ -1,4 +1,31 @@ +.login #footer .cancel, +.login #footer .submit, +.signup #footer .cancel, +.signup #footer .submit { + display: block +} + .login #login { display: block } #login { display: none; } + + +.signup #signup { display: block } +#signup { + display: none; +} + + +.profile #profile { display: block } +#profile { + display: none; +} +.payment #payment { display: block } +#payment { + display: none; +} +.shipping #shipping { display: block } +#shipping { + display: none; +} diff --git a/StoneIsland/www/css/cart.css b/StoneIsland/www/css/cart.css index 5a5efcd6..b479f36d 100644 --- a/StoneIsland/www/css/cart.css +++ b/StoneIsland/www/css/cart.css @@ -38,3 +38,12 @@ #billing { display: none; } + +.cart_payment #cart_payment { display: block } +#cart_payment { + display: none; +} +.cart_shipping #cart_shipping { display: block } +#cart_shipping { + display: none; +} diff --git a/StoneIsland/www/css/nav.css b/StoneIsland/www/css/nav.css index 70e9cbc3..809e8943 100644 --- a/StoneIsland/www/css/nav.css +++ b/StoneIsland/www/css/nav.css @@ -177,6 +177,7 @@ #footer .buynow, #footer .addtocart, #footer .cancel, +#footer .submit, #footer .checkout, #footer .checkout_proceed { width: 50%; @@ -215,7 +216,11 @@ /* CONTENT */ -#story, #hub, #archive, #collection, #product, #cart, #faq, #search, #login, #logout { +#story, #hub, #archive, #faq, +#collection, #product, #search, +#login, #logout, +#cart, +#signup, #shipping, #payment, #profile { position: absolute; top: 43px; height: -webkit-calc(100% - 43px); diff --git a/StoneIsland/www/index.html b/StoneIsland/www/index.html index f358c0dd..faf6e351 100644 --- a/StoneIsland/www/index.html +++ b/StoneIsland/www/index.html @@ -74,6 +74,7 @@ BUY NOW ADD TO CART CANCEL + SUBMIT CHECKOUT PROCEED WITH CHECKOUT @@ -195,10 +196,29 @@
+

LOGIN

- + - SIGN IN + + New User? + + +
+
+ +
+

NEW USER

+
+ + + + + +

PASSWORD

+ + +
@@ -273,7 +293,7 @@ -
+
@@ -375,7 +395,7 @@ - + diff --git a/StoneIsland/www/js/lib/account/LoginView.js b/StoneIsland/www/js/lib/account/LoginView.js index 31137c55..9c69489e 100644 --- a/StoneIsland/www/js/lib/account/LoginView.js +++ b/StoneIsland/www/js/lib/account/LoginView.js @@ -3,18 +3,25 @@ var LoginView = View.extend({ el: "#login", events: { + "click .newuser": "newuser", "submit form": "submit", }, initialize: function(){ this.$form = this.$("form") + this.$msg = this.$(".msg") }, show: function(){ this.$form.get(0).reset() + this.$msg.html("* Your personal and payment information will always remain private") document.body.className = "login" }, + newuser: function(){ + app.router.go("account/signup") + }, + submit: function(e){ e.preventDefault() }, @@ -22,5 +29,5 @@ var LoginView = View.extend({ success: function(){ // change login in ui to logout or whatever }, - -}) \ 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 395c0b00..c6cd2930 100644 --- a/StoneIsland/www/js/lib/account/SignupView.js +++ b/StoneIsland/www/js/lib/account/SignupView.js @@ -1,5 +1,28 @@ var SignupView = View.extend({ el: "#signup", + + events: { + "submit form": "submit", + }, + + initialize: function(){ + this.$form = this.$("form") + this.$msg = this.$(".msg") + }, + + show: function(){ + this.$form.get(0).reset() + this.$msg.html("* Your personal and payment information will always remain private") + document.body.className = "signup" + }, + + submit: function(e){ + e.preventDefault() + }, + + success: function(){ + // change login in ui to logout or whatever + }, }) \ No newline at end of file diff --git a/StoneIsland/www/js/lib/cart/CartBilling.js b/StoneIsland/www/js/lib/cart/CartBilling.js deleted file mode 100644 index ef9b8eff..00000000 --- a/StoneIsland/www/js/lib/cart/CartBilling.js +++ /dev/null @@ -1,12 +0,0 @@ -var CartBilling = View.extend({ - - el: "#cart_billing", - - events: { - }, - - initialize: function(){ - this.address = new AddressView ({ parent: this }) - }, - -}) \ No newline at end of file diff --git a/StoneIsland/www/js/lib/cart/CartPayment.js b/StoneIsland/www/js/lib/cart/CartPayment.js new file mode 100644 index 00000000..a797765d --- /dev/null +++ b/StoneIsland/www/js/lib/cart/CartPayment.js @@ -0,0 +1,16 @@ +var CartPayment = View.extend({ + + el: "#cart_payment", + + events: { + }, + + initialize: function(){ + this.address = new AddressView ({ parent: this }) + }, + + show: function(){ + document.body.className = "cart_payment" + }, + +}) \ 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 23b8cdf0..22b2794a 100644 --- a/StoneIsland/www/js/lib/cart/CartShipping.js +++ b/StoneIsland/www/js/lib/cart/CartShipping.js @@ -8,5 +8,9 @@ var CartShipping = View.extend({ initialize: function(){ this.address = new AddressView ({ parent: this }) }, + + show: function(){ + document.body.className = "cart_shipping" + }, }) \ 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 5d741492..5918048c 100644 --- a/StoneIsland/www/js/lib/cart/CartView.js +++ b/StoneIsland/www/js/lib/cart/CartView.js @@ -7,7 +7,7 @@ var CartView = View.extend({ initialize: function(){ this.summary = new CartSummary () - this.billing = new CartBilling () + this.payment = new CartPayment () this.shipping = new CartShipping () }, -- cgit v1.2.3-70-g09d2