summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xStoneIsland/platforms/ios/www/js/index.js2
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/account/OrdersView.js4
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/auth/LoginView.js2
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/auth/SignupView.js2
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js2
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/blogs/HubView.js10
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js2
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js4
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/cart/CartShipping.js2
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js2
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/cart/CartView.js6
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/products/ClosedStoreView.js2
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/products/CollectionView.js2
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/products/ProductView.js12
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/products/Selector.js2
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/view/Serializable.js2
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/view/View.js6
-rwxr-xr-xStoneIsland/platforms/ios/www/js/sdk/product.js10
-rwxr-xr-xStoneIsland/www/css/nav.css1
-rwxr-xr-xStoneIsland/www/js/index.js2
-rwxr-xr-xStoneIsland/www/js/lib/account/OrdersView.js4
-rwxr-xr-xStoneIsland/www/js/lib/account/PaymentView.js2
-rwxr-xr-xStoneIsland/www/js/lib/account/ProfileView.js2
-rwxr-xr-xStoneIsland/www/js/lib/account/SettingsView.js2
-rwxr-xr-xStoneIsland/www/js/lib/account/ShippingView.js2
-rwxr-xr-xStoneIsland/www/js/lib/auth/LoginView.js4
-rwxr-xr-xStoneIsland/www/js/lib/auth/SignupView.js4
-rwxr-xr-xStoneIsland/www/js/lib/blogs/ArchiveView.js2
-rwxr-xr-xStoneIsland/www/js/lib/blogs/HubView.js10
-rwxr-xr-xStoneIsland/www/js/lib/blogs/StoryView.js2
-rwxr-xr-xStoneIsland/www/js/lib/cart/CartConfirm.js2
-rwxr-xr-xStoneIsland/www/js/lib/cart/CartPayment.js6
-rwxr-xr-xStoneIsland/www/js/lib/cart/CartShipping.js4
-rwxr-xr-xStoneIsland/www/js/lib/cart/CartSummary.js4
-rwxr-xr-xStoneIsland/www/js/lib/cart/CartView.js6
-rwxr-xr-xStoneIsland/www/js/lib/nav/SearchView.js2
-rwxr-xr-xStoneIsland/www/js/lib/products/ClosedStoreView.js2
-rwxr-xr-xStoneIsland/www/js/lib/products/CollectionView.js2
-rwxr-xr-xStoneIsland/www/js/lib/products/ProductView.js84
-rwxr-xr-xStoneIsland/www/js/lib/products/Selector.js20
-rwxr-xr-xStoneIsland/www/js/lib/view/Serializable.js2
-rwxr-xr-xStoneIsland/www/js/lib/view/View.js6
-rwxr-xr-xStoneIsland/www/js/sdk/_sdk.js2
43 files changed, 145 insertions, 108 deletions
diff --git a/StoneIsland/platforms/ios/www/js/index.js b/StoneIsland/platforms/ios/www/js/index.js
index 0b3531dd..468c0d7e 100755
--- a/StoneIsland/platforms/ios/www/js/index.js
+++ b/StoneIsland/platforms/ios/www/js/index.js
@@ -3,7 +3,7 @@ var app = (function(){
app.init = function(){
- sdk.init({ env: "production" })
+ sdk.init({ env: "test" })
app.bind()
app.build()
diff --git a/StoneIsland/platforms/ios/www/js/lib/account/OrdersView.js b/StoneIsland/platforms/ios/www/js/lib/account/OrdersView.js
index e51676e0..a1b83767 100755
--- a/StoneIsland/platforms/ios/www/js/lib/account/OrdersView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/account/OrdersView.js
@@ -8,8 +8,8 @@ var OrdersView = ScrollableView.extend({
item_template: $("#orders .item_template").html(),
events: {
- "touchstart .back": "back",
- "touchstart .item": "load_single",
+ "click .back": "back",
+ "click .item": "load_single",
},
initialize: function(){
diff --git a/StoneIsland/platforms/ios/www/js/lib/auth/LoginView.js b/StoneIsland/platforms/ios/www/js/lib/auth/LoginView.js
index f96d1e44..1f7438cc 100755
--- a/StoneIsland/platforms/ios/www/js/lib/auth/LoginView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/auth/LoginView.js
@@ -5,7 +5,7 @@ var LoginView = FormView.extend({
action: sdk.account.login,
events: {
- "touchstart .newuser": "new_user",
+ "click .newuser": "new_user",
"submit form": "save",
},
diff --git a/StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js b/StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js
index 19c07c32..afbb8877 100755
--- a/StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js
@@ -20,7 +20,7 @@ var SignupView = FormView.extend({
*/
events: {
- "touchstart .privacy-msg": "privacy_link",
+ "click .privacy-msg": "privacy_link",
"submit form": "save",
},
diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js
index 2802ab9e..254df6d1 100755
--- a/StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js
@@ -5,7 +5,7 @@ var ArchiveView = ScrollableView.extend({
row_template: $("#archive .scroll .template").html(),
events: {
- "touchstart .item": "pick",
+ "click .item": "pick",
"mousedown .row": "mousedown",
"touchstart .row": "touchstart",
"mousemove .row": "mousemove",
diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js
index b2fb16db..49c05ff6 100755
--- a/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js
@@ -4,11 +4,11 @@ var HubView = ScrollableView.extend({
template: $("#hub .template").html(),
events: {
- "touchstart .share": "content-share",
- "touchstart .store": "store_link",
- "touchstart .gallery-left": "gallery_left",
- "touchstart .gallery-right": "gallery_right",
- "touchstart .play": "play_video",
+ "click .share": "content-share",
+ "click .store": "store_link",
+ "click .gallery-left": "gallery_left",
+ "click .gallery-right": "gallery_right",
+ "click .play": "play_video",
},
initialize: function(){
diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js
index ee7193a6..a10c8351 100755
--- a/StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js
@@ -6,7 +6,7 @@ var StoryView = ScrollableView.extend({
template: $("#story .template").html(),
events: {
- "touchstart .links li": "pick",
+ "click .links li": "pick",
},
initialize: function(){
diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js
index 7dd4db7c..f3c54d55 100755
--- a/StoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js
+++ b/StoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js
@@ -13,8 +13,8 @@ var CartPayment = FormView.extend({
events: {
"change [name=SameAsShipping]": "toggle_shipping",
- "touchstart .address_dropdown": "toggle_address",
- "touchstart .cc_dropdown": "toggle_cc",
+ "click .address_dropdown": "toggle_address",
+ "click .cc_dropdown": "toggle_cc",
},
initialize: function(opt){
diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartShipping.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartShipping.js
index 33b082c0..f17d42d2 100755
--- a/StoneIsland/platforms/ios/www/js/lib/cart/CartShipping.js
+++ b/StoneIsland/platforms/ios/www/js/lib/cart/CartShipping.js
@@ -10,7 +10,7 @@ var CartShipping = FormView.extend({
template: $("#cart_shipping .template").html(),
events: {
- "touchstart .dropdown-wrapper": "toggle_dropdown",
+ "click .dropdown-wrapper": "toggle_dropdown",
},
initialize: function(opt){
diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js
index 51b9cb80..21fc27dc 100755
--- a/StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js
+++ b/StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js
@@ -5,7 +5,7 @@ var CartSummary = ScrollableView.extend({
template: $("#cart_summary .template").html(),
events: {
- "touchstart .remove": "remove_item",
+ "click .remove": "remove_item",
},
data: null,
diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartView.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartView.js
index 0e04c025..1b08e418 100755
--- a/StoneIsland/platforms/ios/www/js/lib/cart/CartView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/cart/CartView.js
@@ -3,9 +3,9 @@ var CartView = View.extend({
el: "#cart",
events: {
- "touchstart .summary_step": "show_summary",
- "touchstart .shipping_step": "show_shipping",
- "touchstart .payment_step": "show_payment",
+ "click .summary_step": "show_summary",
+ "click .shipping_step": "show_shipping",
+ "click .payment_step": "show_payment",
},
initialize: function(){
diff --git a/StoneIsland/platforms/ios/www/js/lib/products/ClosedStoreView.js b/StoneIsland/platforms/ios/www/js/lib/products/ClosedStoreView.js
index c42e1828..5f8c1e84 100755
--- a/StoneIsland/platforms/ios/www/js/lib/products/ClosedStoreView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/products/ClosedStoreView.js
@@ -5,7 +5,7 @@ var ClosedStoreView = View.extend({
storeIsClosed: false,
events: {
- "touchstart .website_link": "website_link",
+ "click .website_link": "website_link",
},
delay: 8000,
diff --git a/StoneIsland/platforms/ios/www/js/lib/products/CollectionView.js b/StoneIsland/platforms/ios/www/js/lib/products/CollectionView.js
index 7a020798..798920d1 100755
--- a/StoneIsland/platforms/ios/www/js/lib/products/CollectionView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/products/CollectionView.js
@@ -49,7 +49,7 @@ var CollectionView = ScrollableView.extend({
return
}
this.$loader.show()
- sdk.product.collection({
+ sdk.product.all({
gallery_id: app.gallery_id,
success: this.populate.bind(this)
})
diff --git a/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js b/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js
index 9d518b11..6893f88c 100755
--- a/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js
@@ -4,12 +4,12 @@ var ProductView = ScrollableView.extend({
el: "#product",
events: {
- "touchstart .fit": "scroll_to_bottom",
- "touchstart .size": "select_size",
- "touchstart .color": "select_color",
- "touchstart .share": "share",
- "touchstart .gallery-left": "gallery_left",
- "touchstart .gallery-right": "gallery_right",
+ "click .fit": "scroll_to_bottom",
+ "click .size": "select_size",
+ "click .color": "select_color",
+ "click .share": "share",
+ "click .gallery-left": "gallery_left",
+ "click .gallery-right": "gallery_right",
},
initialize: function(){
diff --git a/StoneIsland/platforms/ios/www/js/lib/products/Selector.js b/StoneIsland/platforms/ios/www/js/lib/products/Selector.js
index 1b91cf80..69bb1186 100755
--- a/StoneIsland/platforms/ios/www/js/lib/products/Selector.js
+++ b/StoneIsland/platforms/ios/www/js/lib/products/Selector.js
@@ -4,7 +4,7 @@ var Selector = View.extend({
template: $("#selector .template").html(),
events: {
- "touchstart .close": "hide",
+ "click .close": "hide",
"click .options div": "pick",
},
diff --git a/StoneIsland/platforms/ios/www/js/lib/view/Serializable.js b/StoneIsland/platforms/ios/www/js/lib/view/Serializable.js
index 921dc275..98aa8ce3 100755
--- a/StoneIsland/platforms/ios/www/js/lib/view/Serializable.js
+++ b/StoneIsland/platforms/ios/www/js/lib/view/Serializable.js
@@ -4,7 +4,7 @@ var SerializableView = View.extend({
"change select": "update_select",
"change [type=date]": "update_date",
"focus input": "focus_input",
- "touchstart .date-wrapper": "focus_date",
+ "click .date-wrapper": "focus_date",
"submit form": "save",
},
diff --git a/StoneIsland/platforms/ios/www/js/lib/view/View.js b/StoneIsland/platforms/ios/www/js/lib/view/View.js
index 70d2c7eb..fe145221 100755
--- a/StoneIsland/platforms/ios/www/js/lib/view/View.js
+++ b/StoneIsland/platforms/ios/www/js/lib/view/View.js
@@ -64,9 +64,9 @@ var View = (function($, _){
if (eventName === 'mouseenter' || eventName === 'mouseleave') {
continue
}
- if (eventName === 'click') {
- eventName = 'touchstart'
- }
+ if (is_android && eventName === 'click') {
+ eventName = 'touchstart'
+ }
}
if (selector === '') {
this.$el.on(eventName, method);
diff --git a/StoneIsland/platforms/ios/www/js/sdk/product.js b/StoneIsland/platforms/ios/www/js/sdk/product.js
index 55f1940a..7c12e7d7 100755
--- a/StoneIsland/platforms/ios/www/js/sdk/product.js
+++ b/StoneIsland/platforms/ios/www/js/sdk/product.js
@@ -3,6 +3,16 @@ sdk.product = (function(){
var default_gallery = 31617
+ product.all = function(opt){
+ return $.ajax({
+ method: "GET",
+ url: sdk.path("Search.API/1.2", "search.json"),
+ data: { format: "full", productsPerPage: 100 },
+ success: opt.success,
+ error: opt.error,
+ })
+ }
+
product.collection = function(opt){
return $.ajax({
method: "GET",
diff --git a/StoneIsland/www/css/nav.css b/StoneIsland/www/css/nav.css
index 923dd85f..f76fb744 100755
--- a/StoneIsland/www/css/nav.css
+++ b/StoneIsland/www/css/nav.css
@@ -303,6 +303,7 @@ padding-bottom:0px;
#selector {
display: none;
position: absolute;
+ bottom: 0; left: 0;
background: #fff;
z-index: 2;
width:100%;
diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js
index 0b3531dd..468c0d7e 100755
--- a/StoneIsland/www/js/index.js
+++ b/StoneIsland/www/js/index.js
@@ -3,7 +3,7 @@ var app = (function(){
app.init = function(){
- sdk.init({ env: "production" })
+ sdk.init({ env: "test" })
app.bind()
app.build()
diff --git a/StoneIsland/www/js/lib/account/OrdersView.js b/StoneIsland/www/js/lib/account/OrdersView.js
index e51676e0..a1b83767 100755
--- a/StoneIsland/www/js/lib/account/OrdersView.js
+++ b/StoneIsland/www/js/lib/account/OrdersView.js
@@ -8,8 +8,8 @@ var OrdersView = ScrollableView.extend({
item_template: $("#orders .item_template").html(),
events: {
- "touchstart .back": "back",
- "touchstart .item": "load_single",
+ "click .back": "back",
+ "click .item": "load_single",
},
initialize: function(){
diff --git a/StoneIsland/www/js/lib/account/PaymentView.js b/StoneIsland/www/js/lib/account/PaymentView.js
index 03dc8cbf..8b49ed1d 100755
--- a/StoneIsland/www/js/lib/account/PaymentView.js
+++ b/StoneIsland/www/js/lib/account/PaymentView.js
@@ -34,7 +34,7 @@ var PaymentView = FormView.extend({
show: function(){
if (! auth.logged_in()) { return app.router.go("intro") }
- app.footer.show("SAVE", "CANCEL")
+ app.footer.show("SAVE")
document.body.className = "payment"
this.deferScrollToTop()
// this.preload()
diff --git a/StoneIsland/www/js/lib/account/ProfileView.js b/StoneIsland/www/js/lib/account/ProfileView.js
index ed2f3536..f370c055 100755
--- a/StoneIsland/www/js/lib/account/ProfileView.js
+++ b/StoneIsland/www/js/lib/account/ProfileView.js
@@ -15,7 +15,7 @@ var ProfileView = FormView.extend({
show: function(){
if (! auth.logged_in()) { return app.router.go("intro") }
- app.footer.show("SAVE", "CANCEL")
+ app.footer.show("SAVE")
document.body.className = "profile"
this.preload(auth.user)
this.deferScrollToTop()
diff --git a/StoneIsland/www/js/lib/account/SettingsView.js b/StoneIsland/www/js/lib/account/SettingsView.js
index 7f96bb88..0de80048 100755
--- a/StoneIsland/www/js/lib/account/SettingsView.js
+++ b/StoneIsland/www/js/lib/account/SettingsView.js
@@ -13,7 +13,7 @@ var SettingsView = FormView.extend({
show: function(){
if (! auth.logged_in()) { return app.router.go("intro") }
- app.footer.show("SAVE", "CANCEL")
+ app.footer.show("SAVE")
document.body.className = "settings"
this.deferScrollToTop()
},
diff --git a/StoneIsland/www/js/lib/account/ShippingView.js b/StoneIsland/www/js/lib/account/ShippingView.js
index 39baf2aa..0bf88025 100755
--- a/StoneIsland/www/js/lib/account/ShippingView.js
+++ b/StoneIsland/www/js/lib/account/ShippingView.js
@@ -33,7 +33,7 @@ var ShippingView = FormView.extend({
show: function(){
if (! auth.logged_in()) { return app.router.go("intro") }
// this.preload( this.data || this.test_data )
- app.footer.show("SAVE", "CANCEL")
+ app.footer.show("SAVE")
document.body.className = "shipping"
this.deferScrollToTop()
},
diff --git a/StoneIsland/www/js/lib/auth/LoginView.js b/StoneIsland/www/js/lib/auth/LoginView.js
index f96d1e44..8a002632 100755
--- a/StoneIsland/www/js/lib/auth/LoginView.js
+++ b/StoneIsland/www/js/lib/auth/LoginView.js
@@ -5,7 +5,7 @@ var LoginView = FormView.extend({
action: sdk.account.login,
events: {
- "touchstart .newuser": "new_user",
+ "click .newuser": "new_user",
"submit form": "save",
},
@@ -21,7 +21,7 @@ var LoginView = FormView.extend({
return
}
var msg = "* Your personal and payment<br>information will always remain private"
- app.footer.show("SUBMIT", "CANCEL")
+ app.footer.show("SUBMIT")
this.$form.get(0).reset()
this.$msg.html(msg)
document.body.className = "login"
diff --git a/StoneIsland/www/js/lib/auth/SignupView.js b/StoneIsland/www/js/lib/auth/SignupView.js
index 19c07c32..ff5fa6bb 100755
--- a/StoneIsland/www/js/lib/auth/SignupView.js
+++ b/StoneIsland/www/js/lib/auth/SignupView.js
@@ -20,7 +20,7 @@ var SignupView = FormView.extend({
*/
events: {
- "touchstart .privacy-msg": "privacy_link",
+ "click .privacy-msg": "privacy_link",
"submit form": "save",
},
@@ -36,7 +36,7 @@ var SignupView = FormView.extend({
return
}
var msg = "* Your personal and payment<br>information will always remain private"
- app.footer.show("SUBMIT", "CANCEL")
+ app.footer.show("SUBMIT")
this.$form.get(0).reset()
this.$msg.html(msg)
document.body.className = "signup"
diff --git a/StoneIsland/www/js/lib/blogs/ArchiveView.js b/StoneIsland/www/js/lib/blogs/ArchiveView.js
index 2802ab9e..254df6d1 100755
--- a/StoneIsland/www/js/lib/blogs/ArchiveView.js
+++ b/StoneIsland/www/js/lib/blogs/ArchiveView.js
@@ -5,7 +5,7 @@ var ArchiveView = ScrollableView.extend({
row_template: $("#archive .scroll .template").html(),
events: {
- "touchstart .item": "pick",
+ "click .item": "pick",
"mousedown .row": "mousedown",
"touchstart .row": "touchstart",
"mousemove .row": "mousemove",
diff --git a/StoneIsland/www/js/lib/blogs/HubView.js b/StoneIsland/www/js/lib/blogs/HubView.js
index b2fb16db..49c05ff6 100755
--- a/StoneIsland/www/js/lib/blogs/HubView.js
+++ b/StoneIsland/www/js/lib/blogs/HubView.js
@@ -4,11 +4,11 @@ var HubView = ScrollableView.extend({
template: $("#hub .template").html(),
events: {
- "touchstart .share": "content-share",
- "touchstart .store": "store_link",
- "touchstart .gallery-left": "gallery_left",
- "touchstart .gallery-right": "gallery_right",
- "touchstart .play": "play_video",
+ "click .share": "content-share",
+ "click .store": "store_link",
+ "click .gallery-left": "gallery_left",
+ "click .gallery-right": "gallery_right",
+ "click .play": "play_video",
},
initialize: function(){
diff --git a/StoneIsland/www/js/lib/blogs/StoryView.js b/StoneIsland/www/js/lib/blogs/StoryView.js
index ee7193a6..a10c8351 100755
--- a/StoneIsland/www/js/lib/blogs/StoryView.js
+++ b/StoneIsland/www/js/lib/blogs/StoryView.js
@@ -6,7 +6,7 @@ var StoryView = ScrollableView.extend({
template: $("#story .template").html(),
events: {
- "touchstart .links li": "pick",
+ "click .links li": "pick",
},
initialize: function(){
diff --git a/StoneIsland/www/js/lib/cart/CartConfirm.js b/StoneIsland/www/js/lib/cart/CartConfirm.js
index f6c7f1f5..b7eb8828 100755
--- a/StoneIsland/www/js/lib/cart/CartConfirm.js
+++ b/StoneIsland/www/js/lib/cart/CartConfirm.js
@@ -28,7 +28,7 @@ var CartConfirm = FormView.extend({
show: function(){
document.body.className = "cart"
app.cart.el.className = "confirm"
- app.footer.show("PLACE ORDER", "CANCEL")
+ app.footer.show("PLACE ORDER")
window.location.hash = "#/cart/confirm"
this.deferScrollToTop()
diff --git a/StoneIsland/www/js/lib/cart/CartPayment.js b/StoneIsland/www/js/lib/cart/CartPayment.js
index 7dd4db7c..ab454246 100755
--- a/StoneIsland/www/js/lib/cart/CartPayment.js
+++ b/StoneIsland/www/js/lib/cart/CartPayment.js
@@ -13,8 +13,8 @@ var CartPayment = FormView.extend({
events: {
"change [name=SameAsShipping]": "toggle_shipping",
- "touchstart .address_dropdown": "toggle_address",
- "touchstart .cc_dropdown": "toggle_cc",
+ "click .address_dropdown": "toggle_address",
+ "click .cc_dropdown": "toggle_cc",
},
initialize: function(opt){
@@ -41,7 +41,7 @@ var CartPayment = FormView.extend({
show: function(){
document.body.className = "cart"
app.cart.el.className = "payment"
- app.footer.show("CONFIRM &gt;", "CANCEL")
+ app.footer.show("CONFIRM &gt;")
window.location.hash = "#/cart/payment"
this.populate()
diff --git a/StoneIsland/www/js/lib/cart/CartShipping.js b/StoneIsland/www/js/lib/cart/CartShipping.js
index 33b082c0..1f60307e 100755
--- a/StoneIsland/www/js/lib/cart/CartShipping.js
+++ b/StoneIsland/www/js/lib/cart/CartShipping.js
@@ -10,7 +10,7 @@ var CartShipping = FormView.extend({
template: $("#cart_shipping .template").html(),
events: {
- "touchstart .dropdown-wrapper": "toggle_dropdown",
+ "click .dropdown-wrapper": "toggle_dropdown",
},
initialize: function(opt){
@@ -28,7 +28,7 @@ var CartShipping = FormView.extend({
show: function(){
document.body.className = "cart"
app.cart.el.className = "shipping"
- app.footer.show("PAYMENT &gt;", "CANCEL")
+ app.footer.show("PAYMENT &gt;")
window.location.hash = "#/cart/shipping"
this.populate()
this.deferScrollToTop()
diff --git a/StoneIsland/www/js/lib/cart/CartSummary.js b/StoneIsland/www/js/lib/cart/CartSummary.js
index 51b9cb80..01887d95 100755
--- a/StoneIsland/www/js/lib/cart/CartSummary.js
+++ b/StoneIsland/www/js/lib/cart/CartSummary.js
@@ -5,7 +5,7 @@ var CartSummary = ScrollableView.extend({
template: $("#cart_summary .template").html(),
events: {
- "touchstart .remove": "remove_item",
+ "click .remove": "remove_item",
},
data: null,
@@ -38,7 +38,7 @@ var CartSummary = ScrollableView.extend({
load: function(){
this.el.className = "loading"
- app.footer.show("SHIPPING &gt;", "CANCEL")
+ app.footer.show("SHIPPING &gt;")
app.curtain.show("loading")
sdk.cart.get_status({
success: this.populate.bind(this),
diff --git a/StoneIsland/www/js/lib/cart/CartView.js b/StoneIsland/www/js/lib/cart/CartView.js
index 0e04c025..1b08e418 100755
--- a/StoneIsland/www/js/lib/cart/CartView.js
+++ b/StoneIsland/www/js/lib/cart/CartView.js
@@ -3,9 +3,9 @@ var CartView = View.extend({
el: "#cart",
events: {
- "touchstart .summary_step": "show_summary",
- "touchstart .shipping_step": "show_shipping",
- "touchstart .payment_step": "show_payment",
+ "click .summary_step": "show_summary",
+ "click .shipping_step": "show_shipping",
+ "click .payment_step": "show_payment",
},
initialize: function(){
diff --git a/StoneIsland/www/js/lib/nav/SearchView.js b/StoneIsland/www/js/lib/nav/SearchView.js
index f21634a5..b477d72f 100755
--- a/StoneIsland/www/js/lib/nav/SearchView.js
+++ b/StoneIsland/www/js/lib/nav/SearchView.js
@@ -6,7 +6,7 @@ var SearchView = View.extend({
},
show: function(){
- app.footer.show("SEARCH", "CANCEL")
+ app.footer.show("SEARCH")
document.body.className = "search"
},
diff --git a/StoneIsland/www/js/lib/products/ClosedStoreView.js b/StoneIsland/www/js/lib/products/ClosedStoreView.js
index c42e1828..5f8c1e84 100755
--- a/StoneIsland/www/js/lib/products/ClosedStoreView.js
+++ b/StoneIsland/www/js/lib/products/ClosedStoreView.js
@@ -5,7 +5,7 @@ var ClosedStoreView = View.extend({
storeIsClosed: false,
events: {
- "touchstart .website_link": "website_link",
+ "click .website_link": "website_link",
},
delay: 8000,
diff --git a/StoneIsland/www/js/lib/products/CollectionView.js b/StoneIsland/www/js/lib/products/CollectionView.js
index 7a020798..798920d1 100755
--- a/StoneIsland/www/js/lib/products/CollectionView.js
+++ b/StoneIsland/www/js/lib/products/CollectionView.js
@@ -49,7 +49,7 @@ var CollectionView = ScrollableView.extend({
return
}
this.$loader.show()
- sdk.product.collection({
+ sdk.product.all({
gallery_id: app.gallery_id,
success: this.populate.bind(this)
})
diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js
index 9d518b11..285e551d 100755
--- a/StoneIsland/www/js/lib/products/ProductView.js
+++ b/StoneIsland/www/js/lib/products/ProductView.js
@@ -4,12 +4,12 @@ var ProductView = ScrollableView.extend({
el: "#product",
events: {
- "touchstart .fit": "scroll_to_bottom",
- "touchstart .size": "select_size",
- "touchstart .color": "select_color",
- "touchstart .share": "share",
- "touchstart .gallery-left": "gallery_left",
- "touchstart .gallery-right": "gallery_right",
+ "click .fit": "scroll_to_bottom",
+ "click .size": "select_size",
+ "click .color": "select_color",
+ "click .share": "share",
+ "click .gallery-left": "gallery_left",
+ "click .gallery-right": "gallery_right",
},
initialize: function(){
@@ -29,12 +29,21 @@ var ProductView = ScrollableView.extend({
},
show: function(){
- app.footer.show("ADD TO CART", "BUY NOW")
+ this.showFooter()
document.body.className = "product"
},
hide: function(){
},
+ showFooter: function(){
+ if (this.not_available) {
+ app.footer.show("SOLD OUT")
+ }
+ else {
+ app.footer.show("ADD TO CART", "BUY NOW")
+ }
+ },
+
item: null,
details: null,
size: null,
@@ -87,7 +96,6 @@ var ProductView = ScrollableView.extend({
}
window.location.href = "#/store/" + code
- console.log(data)
if (data) {
app.collection.items[code] = data
}
@@ -113,38 +121,46 @@ var ProductView = ScrollableView.extend({
var body = descriptions['EditorialDescription'].replace(/<br>/g, "<br><br>")
var default_color_id = this.populate_selectors(data, details)
-
- var color = this.colors[default_color_id]
- var color_label = color.label
- var sizes = this.find_sizes_for_color(default_color_id)
- var size = sizes[0]
- var size_label = this.sizes[size].label
- this.is_onesize = !! this.sizes[1]
+ if (this.not_available) {
+ this.$color.html("NOT AVAILABLE")
+ this.$size.hide()
+ }
+ else {
+ var color = this.colors[default_color_id]
+ var color_label = color.label
+ var sizes = this.find_sizes_for_color(default_color_id)
+ var size = sizes[0]
+ var size_label = this.sizes[size].label
+
+ this.color = color
+ this.size = size
+
+ this.is_onesize = !! this.sizes[1]
+ this.$size.show().html(size_label)
+ if (color_label) {
+ this.$color.html(color_label)
+ }
+ else {
+ this.$color.hide()
+ }
+ }
+
// console.log(color, color_label, size, size_label)
this.item = data
this.details = details['Item']
this.code = data['DefaultCode10']
- this.color = color
- this.size = size
-
this.$num.html(num)
this.$title.html(title)
this.$type.html(type)
this.$price.html(price)
this.$body.html(body)
-
- this.$size.html(size_label)
- if (color_label) {
- this.$color.show().html(color_label)
- }
- else {
- this.$color.hide()
- }
+ this.showFooter()
+
this.deferScrollToTop()
},
@@ -167,6 +183,15 @@ var ProductView = ScrollableView.extend({
populate_selectors: function(data, details){
var sizes = {}, colors = {}, size_lookup = {}, default_color
+ console.log(details['Item']['ModelColors'].length)
+ if (! details['Item']['ModelColors'].length) {
+ this.not_available = true
+ return
+ }
+ else {
+ this.not_available = false
+ }
+
details['Item']['ModelColors'].forEach(function(color, index){
if (! default_color || color['Code10'] == data['DefaultCode10']) {
default_color = color['ColorId']
@@ -203,7 +228,7 @@ var ProductView = ScrollableView.extend({
},
select_size: function(){
-
+ if (this.not_available) { return }
if (this.is_onesize) { return this.select_color() }
if (this.item['Sizes'].length == 0) { return }
var sizes = Object.keys(this.sizes).map(function(key){
@@ -217,6 +242,7 @@ var ProductView = ScrollableView.extend({
},
select_color: function(){
+ if (this.not_available) { return }
if (this.item['Colors'].length == 0) { return }
var colors = Object.keys(this.colors).map(function(key){
return this.colors[key]
@@ -224,15 +250,19 @@ var ProductView = ScrollableView.extend({
app.selector.select("style", colors, function(color){
this.code = color.code
this.$color.html(color.label)
+
+ // UPDATE GALLERY
}.bind(this))
},
// ADD TO CART
save: function(){
+ if (this.not_available) { return }
this.add_to_cart({ route: false })
},
// BUY NOW
cancel: function(){
+ if (this.not_available) { return }
this.add_to_cart({ route: true })
},
diff --git a/StoneIsland/www/js/lib/products/Selector.js b/StoneIsland/www/js/lib/products/Selector.js
index 1b91cf80..17278a06 100755
--- a/StoneIsland/www/js/lib/products/Selector.js
+++ b/StoneIsland/www/js/lib/products/Selector.js
@@ -4,7 +4,7 @@ var Selector = View.extend({
template: $("#selector .template").html(),
events: {
- "touchstart .close": "hide",
+ "click .close": "hide",
"click .options div": "pick",
},
@@ -27,17 +27,13 @@ var Selector = View.extend({
this.$el.show()
app.curtain.show("white")
this.visible = true
- var selectionXY = $("." + origin).offset()
- var selectionWidth = $("." + origin).width()
- var selectorHeight = $('#selector').height()
- console.log(selectionXY.left)
- console.log(selectionXY.top)
-
- $("#selector").css({"top":(selectionXY.top - selectorHeight),"left":selectionXY.left})
-
-
-
-
+// var selectionXY = $("." + origin).offset()
+// var selectionWidth = $("." + origin).width()
+// var selectorHeight = $('#selector').height()
+// console.log(selectionXY.left)
+// console.log(selectionXY.top)
+//
+// $("#selector").css({"top":(selectionXY.top - selectorHeight),"left":selectionXY.left})
},
hide: function(){
diff --git a/StoneIsland/www/js/lib/view/Serializable.js b/StoneIsland/www/js/lib/view/Serializable.js
index 921dc275..98aa8ce3 100755
--- a/StoneIsland/www/js/lib/view/Serializable.js
+++ b/StoneIsland/www/js/lib/view/Serializable.js
@@ -4,7 +4,7 @@ var SerializableView = View.extend({
"change select": "update_select",
"change [type=date]": "update_date",
"focus input": "focus_input",
- "touchstart .date-wrapper": "focus_date",
+ "click .date-wrapper": "focus_date",
"submit form": "save",
},
diff --git a/StoneIsland/www/js/lib/view/View.js b/StoneIsland/www/js/lib/view/View.js
index 70d2c7eb..fe145221 100755
--- a/StoneIsland/www/js/lib/view/View.js
+++ b/StoneIsland/www/js/lib/view/View.js
@@ -64,9 +64,9 @@ var View = (function($, _){
if (eventName === 'mouseenter' || eventName === 'mouseleave') {
continue
}
- if (eventName === 'click') {
- eventName = 'touchstart'
- }
+ if (is_android && eventName === 'click') {
+ eventName = 'touchstart'
+ }
}
if (selector === '') {
this.$el.on(eventName, method);
diff --git a/StoneIsland/www/js/sdk/_sdk.js b/StoneIsland/www/js/sdk/_sdk.js
index b7880e50..017df015 100755
--- a/StoneIsland/www/js/sdk/_sdk.js
+++ b/StoneIsland/www/js/sdk/_sdk.js
@@ -26,7 +26,7 @@ var sdk = (function(){
}
sdk.image = function(code, size){
- return "http://cdn.yoox.biz/" + code.substr(0,2) + "/" + code.substr(0,8) + "_" + size + ".jpg"
+ return "http://cdn.yoox.biz/" + code.substr(0,2) + "/" + code + "_" + size + ".jpg"
}
$.ajaxSetup({