diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-11-09 02:04:26 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-11-09 02:11:46 -0500 |
| commit | d7385f6e25ae41d8b3021c4e01727848ac5922bd (patch) | |
| tree | e5895cf0f9361c20254c3cbc890794430889640e /StoneIsland/www/js | |
| parent | 9cb9177accbbf6e4397cc71bc06dff0ccd47f441 (diff) | |
signup view
Diffstat (limited to 'StoneIsland/www/js')
| -rw-r--r-- | StoneIsland/www/js/lib/account/LoginView.js | 12 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/account/LogoutView.js | 1 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/account/SignupView.js | 23 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/cart/CartBilling.js | 12 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/cart/CartPayment.js | 16 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/cart/CartShipping.js | 4 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/cart/CartView.js | 2 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/nav/FooterView.js | 20 |
8 files changed, 62 insertions, 28 deletions
diff --git a/StoneIsland/www/js/lib/account/LoginView.js b/StoneIsland/www/js/lib/account/LoginView.js index 31137c55..5058d335 100644 --- a/StoneIsland/www/js/lib/account/LoginView.js +++ b/StoneIsland/www/js/lib/account/LoginView.js @@ -3,24 +3,30 @@ 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() }, success: function(){ - // change login in ui to logout or whatever }, - -})
\ No newline at end of file + +}) diff --git a/StoneIsland/www/js/lib/account/LogoutView.js b/StoneIsland/www/js/lib/account/LogoutView.js index d5b70aff..45abc303 100644 --- a/StoneIsland/www/js/lib/account/LogoutView.js +++ b/StoneIsland/www/js/lib/account/LogoutView.js @@ -14,7 +14,6 @@ var LogoutView = 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 () }, diff --git a/StoneIsland/www/js/lib/nav/FooterView.js b/StoneIsland/www/js/lib/nav/FooterView.js index 2f872530..d5560545 100644 --- a/StoneIsland/www/js/lib/nav/FooterView.js +++ b/StoneIsland/www/js/lib/nav/FooterView.js @@ -5,11 +5,13 @@ var FooterView = View.extend({ events: { "click .filter": "filter", "click .back": "back", - "click .buynow": "buynow", - "click .addtocart": "addtocart", "click .cancel": "cancel", - "click .checkout": "checkout", - "click .checkout_proceed": "checkout_proceed", + + "click .save": "ok", + "click .buynow": "ok", + "click .addtocart": "ok", + "click .checkout": "ok", + "click .checkout_proceed": "ok", }, initialize: function(){ @@ -20,15 +22,11 @@ var FooterView = View.extend({ back: function(){ app.router.go('store') }, - buynow: function(){ - }, - addtocart: function(){ - }, cancel: function(){ }, - checkout: function(){ - }, - checkout_proceed: function(){ + + ok: function(){ + app.view.submit() }, })
\ No newline at end of file |
