summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/www/js/lib')
-rw-r--r--StoneIsland/www/js/lib/account/LoginView.js26
-rw-r--r--StoneIsland/www/js/lib/account/PaymentView.js5
-rw-r--r--StoneIsland/www/js/lib/account/ProfileView.js6
-rw-r--r--StoneIsland/www/js/lib/account/ShippingView.js2
-rw-r--r--StoneIsland/www/js/lib/cart/CartBilling.js2
-rw-r--r--StoneIsland/www/js/lib/cart/CartShipping.js2
-rw-r--r--StoneIsland/www/js/lib/products/ProductView.js11
7 files changed, 18 insertions, 36 deletions
diff --git a/StoneIsland/www/js/lib/account/LoginView.js b/StoneIsland/www/js/lib/account/LoginView.js
index 60f6263e..40cc29ba 100644
--- a/StoneIsland/www/js/lib/account/LoginView.js
+++ b/StoneIsland/www/js/lib/account/LoginView.js
@@ -3,9 +3,6 @@ var LoginView = View.extend({
el: "#login",
events: {
- "click .close": "hide",
- "click .login_ask": "login",
- "click .signup_ask": "signup",
"submit form": "submit",
},
@@ -13,15 +10,10 @@ var LoginView = View.extend({
initialize: function(){
this.$form = this.$("form")
- this.$email = this.$("[name=email]")
- this.$password = this.$("[name=password]")
},
show: function(){
- this.$form.hide()
- this.$email.val("")
- this.$password.val("")
- app.curtain.show()
+ this.$form.reset()
document.body.classList.add("login")
},
@@ -30,24 +22,8 @@ var LoginView = View.extend({
document.body.classList.remove("login")
},
- login: function(){
- this.mode = "login"
- this.$form.show()
- },
-
- signup: function(){
- this.mode = "signup"
- this.$form.show()
- },
-
submit: function(e){
e.preventDefault()
- if (this.mode == "login") {
- // login api
- }
- else {
- // signup api
- }
},
success: function(){
diff --git a/StoneIsland/www/js/lib/account/PaymentView.js b/StoneIsland/www/js/lib/account/PaymentView.js
index a8c68267..1ce91283 100644
--- a/StoneIsland/www/js/lib/account/PaymentView.js
+++ b/StoneIsland/www/js/lib/account/PaymentView.js
@@ -6,7 +6,7 @@ var PaymentView = View.extend({
},
initialize: function(){
- this.address = new AddressView ()
+ this.address = new AddressView ({ parent: this })
},
})
@@ -18,7 +18,8 @@ var AddressView = View.extend({
events: {
},
- initialize: function(){
+ initialize: function(opt){
+ this.parent = opt.parent
},
build: function(){
diff --git a/StoneIsland/www/js/lib/account/ProfileView.js b/StoneIsland/www/js/lib/account/ProfileView.js
index 93c61b33..f6e331a5 100644
--- a/StoneIsland/www/js/lib/account/ProfileView.js
+++ b/StoneIsland/www/js/lib/account/ProfileView.js
@@ -1,5 +1,11 @@
var ProfileView = View.extend({
el: "#profile",
+
+ events: {
+ },
+
+ initialize: 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 5bf80cfb..d3a5d8df 100644
--- a/StoneIsland/www/js/lib/account/ShippingView.js
+++ b/StoneIsland/www/js/lib/account/ShippingView.js
@@ -6,7 +6,7 @@ var ShippingView = View.extend({
},
initialize: function(){
- this.address = new AddressView ()
+ this.address = new AddressView ({ parent: this })
},
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/cart/CartBilling.js b/StoneIsland/www/js/lib/cart/CartBilling.js
index 447fae0f..ef9b8eff 100644
--- a/StoneIsland/www/js/lib/cart/CartBilling.js
+++ b/StoneIsland/www/js/lib/cart/CartBilling.js
@@ -6,7 +6,7 @@ var CartBilling = View.extend({
},
initialize: function(){
- this.address = new AddressView ()
+ this.address = new AddressView ({ parent: this })
},
}) \ 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 32b25bb9..23b8cdf0 100644
--- a/StoneIsland/www/js/lib/cart/CartShipping.js
+++ b/StoneIsland/www/js/lib/cart/CartShipping.js
@@ -6,7 +6,7 @@ var CartShipping = View.extend({
},
initialize: function(){
- this.address = new AddressView ()
+ this.address = new AddressView ({ parent: this })
},
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js
index 0d0b0b25..9bfbe4a2 100644
--- a/StoneIsland/www/js/lib/products/ProductView.js
+++ b/StoneIsland/www/js/lib/products/ProductView.js
@@ -56,12 +56,11 @@ var ProductView = ScrollableView.extend({
this.el.className = "loading"
}
sdk.product.item({
- code: code,
- success: function(details){
- this.cache[code] = details
- this.populate(data, details)
- }.bind(this),
- })
+ code: code
+ }).done(function(details){
+ this.cache[code] = details
+ this.populate(data, details)
+ }.bind(this))
},
populate: function(data, details){