diff options
Diffstat (limited to 'StoneIsland/www/js/lib')
| -rw-r--r-- | StoneIsland/www/js/lib/account/LoginView.js | 3 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/account/LogoutView.js | 7 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/account/PaymentView.js | 3 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/account/ProfileView.js | 3 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/account/SettingsView.js | 3 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/account/ShippingView.js | 3 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/account/SignupView.js | 3 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/cart/CartConfirm.js | 2 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/cart/CartPayment.js | 2 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/cart/CartShipping.js | 2 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/cart/CartSummary.js | 4 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/cart/CartView.js | 6 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/nav/IntroView.js | 1 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/nav/NavView.js | 31 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/products/ProductView.js | 2 |
15 files changed, 47 insertions, 28 deletions
diff --git a/StoneIsland/www/js/lib/account/LoginView.js b/StoneIsland/www/js/lib/account/LoginView.js index 30a4a735..8c875ae8 100644 --- a/StoneIsland/www/js/lib/account/LoginView.js +++ b/StoneIsland/www/js/lib/account/LoginView.js @@ -1,4 +1,4 @@ -var LoginView = SerializableView.extend({ +var LoginView = FormView.extend({ el: "#login", @@ -12,6 +12,7 @@ var LoginView = SerializableView.extend({ initialize: function(){ this.$form = this.$("form") this.$msg = this.$(".msg") + this.scroller = new IScroll('#login', app.iscroll_options) }, show: function(){ diff --git a/StoneIsland/www/js/lib/account/LogoutView.js b/StoneIsland/www/js/lib/account/LogoutView.js index 71e0bc31..62c925eb 100644 --- a/StoneIsland/www/js/lib/account/LogoutView.js +++ b/StoneIsland/www/js/lib/account/LogoutView.js @@ -9,12 +9,5 @@ var LogoutView = View.extend({ document.body.className = "logout" app.footer.hide() }, - - submit: function(e){ - e.preventDefault() - }, - - success: function(){ - }, })
\ No newline at end of file diff --git a/StoneIsland/www/js/lib/account/PaymentView.js b/StoneIsland/www/js/lib/account/PaymentView.js index 103cbf8f..4d6ccce5 100644 --- a/StoneIsland/www/js/lib/account/PaymentView.js +++ b/StoneIsland/www/js/lib/account/PaymentView.js @@ -1,4 +1,4 @@ -var PaymentView = View.extend({ +var PaymentView = FormView.extend({ el: "#payment", @@ -10,6 +10,7 @@ var PaymentView = View.extend({ this.$msg = this.$(".msg") this.address = new AddressView ({ parent: this }) this.cc = new CreditCardView ({ parent: this }) + this.scroller = new IScroll('#payment', app.iscroll_options) }, show: function(){ diff --git a/StoneIsland/www/js/lib/account/ProfileView.js b/StoneIsland/www/js/lib/account/ProfileView.js index 892ccbec..6d9a44a3 100644 --- a/StoneIsland/www/js/lib/account/ProfileView.js +++ b/StoneIsland/www/js/lib/account/ProfileView.js @@ -1,4 +1,4 @@ -var ProfileView = View.extend({ +var ProfileView = FormView.extend({ el: "#profile", @@ -8,6 +8,7 @@ var ProfileView = View.extend({ initialize: function(){ this.$form = this.$("form") this.$msg = this.$(".msg") + this.scroller = new IScroll('#profile', app.iscroll_options) }, show: function(){ diff --git a/StoneIsland/www/js/lib/account/SettingsView.js b/StoneIsland/www/js/lib/account/SettingsView.js index f6b2a992..ba871543 100644 --- a/StoneIsland/www/js/lib/account/SettingsView.js +++ b/StoneIsland/www/js/lib/account/SettingsView.js @@ -1,4 +1,4 @@ -var SettingsView = View.extend({ +var SettingsView = FormView.extend({ el: "#settings", @@ -8,6 +8,7 @@ var SettingsView = View.extend({ initialize: function(){ this.$form = this.$("form") this.$msg = this.$(".msg") + this.scroller = new IScroll('#settings', app.iscroll_options) }, show: function(){ diff --git a/StoneIsland/www/js/lib/account/ShippingView.js b/StoneIsland/www/js/lib/account/ShippingView.js index 37ba9df9..bc4d24ef 100644 --- a/StoneIsland/www/js/lib/account/ShippingView.js +++ b/StoneIsland/www/js/lib/account/ShippingView.js @@ -1,4 +1,4 @@ -var ShippingView = View.extend({ +var ShippingView = FormView.extend({ el: "#shipping", @@ -9,6 +9,7 @@ var ShippingView = View.extend({ this.$form = this.$("form") this.$msg = this.$(".msg") this.address = new AddressView ({ parent: this }) + this.scroller = new IScroll('#shipping', app.iscroll_options) }, show: function(){ diff --git a/StoneIsland/www/js/lib/account/SignupView.js b/StoneIsland/www/js/lib/account/SignupView.js index 616fd9ea..04600517 100644 --- a/StoneIsland/www/js/lib/account/SignupView.js +++ b/StoneIsland/www/js/lib/account/SignupView.js @@ -1,4 +1,4 @@ -var SignupView = SerializableView.extend({ +var SignupView = FormView.extend({ el: "#signup", @@ -11,6 +11,7 @@ var SignupView = SerializableView.extend({ initialize: function(){ this.$form = this.$("form") this.$msg = this.$(".msg") + this.scroller = new IScroll('#signup', app.iscroll_options) }, show: function(){ diff --git a/StoneIsland/www/js/lib/cart/CartConfirm.js b/StoneIsland/www/js/lib/cart/CartConfirm.js index 0ce94f22..659d36e6 100644 --- a/StoneIsland/www/js/lib/cart/CartConfirm.js +++ b/StoneIsland/www/js/lib/cart/CartConfirm.js @@ -6,12 +6,14 @@ var CartConfirm = View.extend({ }, initialize: function(){ + this.scroller = new IScroll('#cart_confirm', app.iscroll_options) }, show: function(){ document.body.className = "cart" app.cart.el.className = "confirm" app.footer.show("PLACE ORDER", "CANCEL") + this.deferScrollToTop() }, populate: function(){ diff --git a/StoneIsland/www/js/lib/cart/CartPayment.js b/StoneIsland/www/js/lib/cart/CartPayment.js index f5dfb6ed..50fbef9c 100644 --- a/StoneIsland/www/js/lib/cart/CartPayment.js +++ b/StoneIsland/www/js/lib/cart/CartPayment.js @@ -10,12 +10,14 @@ var CartPayment = View.extend({ this.$msg = this.$(".msg") this.address = new AddressView ({ parent: this }) this.cc = new CreditCardView ({ parent: this }) + this.scroller = new IScroll('#cart_payment', app.iscroll_options) }, show: function(){ document.body.className = "cart" app.cart.el.className = "payment" app.footer.show("CONFIRM >", "CANCEL") + this.deferScrollToTop() }, save: function(){ diff --git a/StoneIsland/www/js/lib/cart/CartShipping.js b/StoneIsland/www/js/lib/cart/CartShipping.js index b819ed0a..2c7bae4a 100644 --- a/StoneIsland/www/js/lib/cart/CartShipping.js +++ b/StoneIsland/www/js/lib/cart/CartShipping.js @@ -9,12 +9,14 @@ var CartShipping = View.extend({ this.$form = this.$("form") this.$msg = this.$(".msg") this.address = new AddressView ({ parent: this }) + this.scroller = new IScroll('#cart_shipping', app.iscroll_options) }, show: function(){ document.body.className = "cart" app.cart.el.className = "shipping" app.footer.show("PAYMENT >", "CANCEL") + this.deferScrollToTop() }, save: function(){ diff --git a/StoneIsland/www/js/lib/cart/CartSummary.js b/StoneIsland/www/js/lib/cart/CartSummary.js index d91b801f..800ac3a6 100644 --- a/StoneIsland/www/js/lib/cart/CartSummary.js +++ b/StoneIsland/www/js/lib/cart/CartSummary.js @@ -1,4 +1,4 @@ -var CartSummary = View.extend({ +var CartSummary = ScrollableView.extend({ el: "#summary", @@ -6,12 +6,14 @@ var CartSummary = View.extend({ }, initialize: function(){ + this.scroller = new IScroll('#summary', app.iscroll_options) }, show: function(){ document.body.className = "cart" app.cart.el.className = "summary" app.footer.show("SHIPPING >", "CANCEL") + this.deferScrollToTop() }, populate: function(){ diff --git a/StoneIsland/www/js/lib/cart/CartView.js b/StoneIsland/www/js/lib/cart/CartView.js index 7744ad9d..43dc7dd4 100644 --- a/StoneIsland/www/js/lib/cart/CartView.js +++ b/StoneIsland/www/js/lib/cart/CartView.js @@ -22,15 +22,15 @@ var CartView = View.extend({ }, show_summary: function(){ - this.el.className = "summary" + this.summary.show() }, show_shipping: function(){ - this.el.className = "shipping" + this.shipping.show() }, show_payment: function(){ - this.el.className = "payment" + this.payment.show() }, })
\ No newline at end of file diff --git a/StoneIsland/www/js/lib/nav/IntroView.js b/StoneIsland/www/js/lib/nav/IntroView.js index 93602eb5..87e68959 100644 --- a/StoneIsland/www/js/lib/nav/IntroView.js +++ b/StoneIsland/www/js/lib/nav/IntroView.js @@ -17,6 +17,7 @@ var IntroView = View.extend({ show: function(){ document.body.className = "intro" window.addEventListener("deviceorientation", this.orient) + app.footer.hide() this.orient({ alpha: 0 }) // get location.. }, diff --git a/StoneIsland/www/js/lib/nav/NavView.js b/StoneIsland/www/js/lib/nav/NavView.js index a9129650..2145c163 100644 --- a/StoneIsland/www/js/lib/nav/NavView.js +++ b/StoneIsland/www/js/lib/nav/NavView.js @@ -3,6 +3,8 @@ var NavView = View.extend({ el: "#nav", events: { + "click .logo": "intro", + "click .store": "store", "click .hub": "hub", "click .story": "story", @@ -12,13 +14,13 @@ var NavView = View.extend({ "click .faq": "faq", "click .search": "search", - "click .account_back": "account_back", + "click .account_back": "back", "click .profile": "profile", "click .payment": "payment", "click .shipping": "shipping", "click .settings": "settings", - "click .faq_back": "faq_back", + "click .faq_back": "back", "click .privacy": "privacy", "click .returns": "returns", "click .terms": "terms", @@ -32,9 +34,14 @@ var NavView = View.extend({ initialize: function(){ }, - show: function(){ + show: function(klass){ $("body").addClass("nav") app.curtain.show() + if (klass) { + setTimeout(function(){ + this.addClass(klass) + }.bind(this), 500) + } }, hide: function(){ @@ -42,6 +49,10 @@ var NavView = View.extend({ app.curtain.hide() }, + intro: function(){ + this.hide() + app.router.go("intro") + }, store: function(){ this.hide() app.router.go("store") @@ -60,16 +71,17 @@ var NavView = View.extend({ }, login: function(){ - if (true || auth.logged_in()) { - this.$el.addClass("account") + if (auth.logged_in()) { + this.el.className = "account" } else { this.hide() app.router.go("account/login") } }, - account_back: function(){ - this.$el.removeClass("account") + + back: function(){ + this.el.className = "" }, profile: function(){ @@ -90,10 +102,7 @@ var NavView = View.extend({ }, faq: function(){ - this.$el.addClass("faq") - }, - faq_back: function(){ - this.$el.removeClass("faq") + this.el.className = "faq" }, privacy: function(){ this.hide() diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js index df604d5b..75f62ac6 100644 --- a/StoneIsland/www/js/lib/products/ProductView.js +++ b/StoneIsland/www/js/lib/products/ProductView.js @@ -116,6 +116,8 @@ var ProductView = ScrollableView.extend({ else { this.$color.hide() } + + this.deferScrollToTop() }, find_sizes_for_color: function(color_id){ |
