summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-11-19 16:44:49 -0500
committerJules Laplace <jules@okfoc.us>2015-11-19 16:44:49 -0500
commit1688752c5f3230fd9986691c2f67d9c7cd0bc164 (patch)
tree22e7773514fe1b14274b5d5a16c29838ce1a224a
parent336282e0dd2fa1c7f4cbcba1c92e272fac76c327 (diff)
scrollers
-rw-r--r--StoneIsland/www/css/account.css23
-rw-r--r--StoneIsland/www/js/index.js6
-rw-r--r--StoneIsland/www/js/lib/account/LoginView.js1
-rw-r--r--StoneIsland/www/js/lib/account/PaymentView.js1
-rw-r--r--StoneIsland/www/js/lib/account/ProfileView.js1
-rw-r--r--StoneIsland/www/js/lib/account/SettingsView.js1
-rw-r--r--StoneIsland/www/js/lib/account/ShippingView.js1
-rw-r--r--StoneIsland/www/js/lib/account/SignupView.js1
-rw-r--r--StoneIsland/www/js/lib/cart/CartConfirm.js2
-rw-r--r--StoneIsland/www/js/lib/cart/CartPayment.js2
-rw-r--r--StoneIsland/www/js/lib/cart/CartShipping.js2
-rw-r--r--StoneIsland/www/js/lib/cart/CartSummary.js4
-rw-r--r--StoneIsland/www/js/lib/cart/CartView.js6
13 files changed, 27 insertions, 24 deletions
diff --git a/StoneIsland/www/css/account.css b/StoneIsland/www/css/account.css
index 8d26ce1e..e2054adb 100644
--- a/StoneIsland/www/css/account.css
+++ b/StoneIsland/www/css/account.css
@@ -1,24 +1,15 @@
-.profile #footer .cancel,
-.profile #footer .submit,
-.payment #footer .cancel,
-.payment #footer .submit,
-.shipping #footer .cancel,
-.shipping #footer .submit,
-.settings #footer .cancel,
-.settings #footer .submit,
-.login #footer .cancel,
-.login #footer .submit,
-.signup #footer .cancel,
-.signup #footer .submit {
- display: block
-}
-
.login #login { display: block }
#login {
display: none;
}
+.logout #logout { display: block }
+#logout {
+ display: none;
+}
+
+
.signup #signup { display: block }
#signup {
display: none;
@@ -205,7 +196,7 @@ input.switch:checked + label:after {
}
.container-fill {
-flex: 1;
+ flex: 1;
align-items: center;
justify-content: center;
position:relative;
diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js
index 4350e383..3d8d46bb 100644
--- a/StoneIsland/www/js/index.js
+++ b/StoneIsland/www/js/index.js
@@ -63,10 +63,8 @@ var app = (function(){
if (window.cordova) {
// cordova.plugins.Keyboard.disableScroll(true)
}
- else {
- auth.init()
- app.launch()
- }
+
+ auth.init( app.launch )
}
app.launch = function(){
app.view = null
diff --git a/StoneIsland/www/js/lib/account/LoginView.js b/StoneIsland/www/js/lib/account/LoginView.js
index 329cf984..8c875ae8 100644
--- a/StoneIsland/www/js/lib/account/LoginView.js
+++ b/StoneIsland/www/js/lib/account/LoginView.js
@@ -12,6 +12,7 @@ var LoginView = FormView.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/PaymentView.js b/StoneIsland/www/js/lib/account/PaymentView.js
index e8dd1dc2..4d6ccce5 100644
--- a/StoneIsland/www/js/lib/account/PaymentView.js
+++ b/StoneIsland/www/js/lib/account/PaymentView.js
@@ -10,6 +10,7 @@ var PaymentView = FormView.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 342e831a..6d9a44a3 100644
--- a/StoneIsland/www/js/lib/account/ProfileView.js
+++ b/StoneIsland/www/js/lib/account/ProfileView.js
@@ -8,6 +8,7 @@ var ProfileView = FormView.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 37274b24..ba871543 100644
--- a/StoneIsland/www/js/lib/account/SettingsView.js
+++ b/StoneIsland/www/js/lib/account/SettingsView.js
@@ -8,6 +8,7 @@ var SettingsView = FormView.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 e7f44949..bc4d24ef 100644
--- a/StoneIsland/www/js/lib/account/ShippingView.js
+++ b/StoneIsland/www/js/lib/account/ShippingView.js
@@ -9,6 +9,7 @@ var ShippingView = FormView.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 62a8f498..04600517 100644
--- a/StoneIsland/www/js/lib/account/SignupView.js
+++ b/StoneIsland/www/js/lib/account/SignupView.js
@@ -11,6 +11,7 @@ var SignupView = FormView.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 &gt;", "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 &gt;", "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 &gt;", "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