diff options
| author | Rene Ae <aehtyb@gmail.com> | 2015-12-08 20:55:47 -0600 |
|---|---|---|
| committer | Rene Ae <aehtyb@gmail.com> | 2015-12-08 20:55:47 -0600 |
| commit | ea6860e8d1d8f8b5dac999373feed0a98534f213 (patch) | |
| tree | 2c6c8a0c25826accc9a828a50921f37c91359101 | |
| parent | f757b2c031bd6f44e4ee40227f68605958cdc099 (diff) | |
android modifications
24 files changed, 118 insertions, 66 deletions
diff --git a/StoneIsland/www/css/account.css b/StoneIsland/www/css/account.css index fa4243c1..cfca71de 100644 --- a/StoneIsland/www/css/account.css +++ b/StoneIsland/www/css/account.css @@ -206,9 +206,10 @@ input[type=text], input[type=password], input[type=number], input[type=email] { } input.switch { - max-height: 0; - max-width: 0; + height: 50px; + width: 50px; opacity: 0; + z-index:9999999; } input.switch + label { @@ -295,7 +296,7 @@ input.switch:checked + label:after { text-align:center; width:calc(100vw - 10px); box-sizing:border-box; - margin:12px auto; + margin:10px auto; position:relative } @@ -343,8 +344,11 @@ input.switch:checked + label:after { } .checkbox-toggle input { - width:25px; height:35px; - opacity:0; + width: 50px; + height: 35px; + opacity: 0; + z-index: 99999; + position: relative; } .checkbox-caption { @@ -408,7 +412,11 @@ input.switch:checked + label:after { } .privacy-msg { - text-align: center; + left: 50%; + display: inline-block; + position: relative; + transform: translateX(-50%); + padding-top: 15px; } .select-wrapper { diff --git a/StoneIsland/www/css/blogs.css b/StoneIsland/www/css/blogs.css index c83d9dc7..70753fd8 100644 --- a/StoneIsland/www/css/blogs.css +++ b/StoneIsland/www/css/blogs.css @@ -125,7 +125,7 @@ left:20px; font-size:18px; padding:3px 3px 3px 1px; - z-index:999; + z-index:2; position:absolute; display:block; } @@ -146,7 +146,7 @@ right:20px; font-size:18px; padding:3px 1px 3px 3px; - z-index:999; + z-index:2; position:absolute; display:block; } @@ -278,13 +278,13 @@ ul.links { #archive .scroll { top: 0; left: 0; - height: 100%; + height: calc(100% - 125px); } #archive .row:first-of-type { margin-top: 7em; } #archive .row:last-of-type { - margin-bottom: 10em; + margin-bottom: 150px; } #archive .row { position: relative; @@ -310,23 +310,23 @@ ul.links { } .gallery-video-post { -position:relative; + position:relative; } .gallery-video-post .play { -width:60px; -height:60px; -border-radius:100px; -background:white; -box-shadow:0px 0px 2px #000; -position:absolute; -transform:translateY(-50%) translateX(-50%); -top:50%; -left:50%; + width:60px; + height:60px; + border-radius:100px; + background:white; + box-shadow:0px 0px 2px #000; + position:absolute; + transform:translateY(-50%) translateX(-50%); + top:50%; + left:50%; } .gallery-video-post .play:before { -content:''; + content:''; width: 0; height: 0; border-top: 8px solid transparent; @@ -338,3 +338,6 @@ content:''; transform:translateY(-50%) translateX(-50%); } +#archive { + box-sizing:border-box +} diff --git a/StoneIsland/www/css/nav.css b/StoneIsland/www/css/nav.css index d785c458..923dd85f 100644 --- a/StoneIsland/www/css/nav.css +++ b/StoneIsland/www/css/nav.css @@ -222,7 +222,7 @@ padding-bottom:0px; left: 50%; transform: translateY(-50%) translateX(-50%); color: #bbb; - font-size:13px + font-size:12.35px; } .cart::before { @@ -302,16 +302,19 @@ padding-bottom:0px; #selector { display: none; - width: 100%; - position: absolute; bottom: 0; left: 0; + position: absolute; background: #fff; z-index: 2; + width:100%; + box-sizing:border-box } #selector .options div { width: 100%; background: white; text-align: center; - padding: 5px; + padding: 8px; + + box-sizing:border-box; font-size: 14px; } diff --git a/StoneIsland/www/css/products.css b/StoneIsland/www/css/products.css index 82c7c36c..bc215573 100644 --- a/StoneIsland/www/css/products.css +++ b/StoneIsland/www/css/products.css @@ -141,10 +141,12 @@ .style-share { letter-spacing:0.5px; + font-size:12.35px } .size-color { - position:relative + position:relative; + font-size:12.35px } .type-price, .style-share { @@ -195,6 +197,17 @@ padding:13px 0; } +#collection .content { +position:relative; +padding-top:45px; +padding-bottom:45px; +} + #collection h1 { background:white } + +#selector { +z-index:9 +} + diff --git a/StoneIsland/www/index.html b/StoneIsland/www/index.html index 9ea4a499..b5f6c1b9 100644 --- a/StoneIsland/www/index.html +++ b/StoneIsland/www/index.html @@ -10,9 +10,9 @@ * Disables use of inline scripts in order to mitigate risk of XSS vulnerabilities. To change this: * Enable inline JS: add 'unsafe-inline' to default-src --> -<!-- - <meta http-equiv="Content-Security-Policy" content="default-src 'self' lvh.me lvh.me:5000 data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *"> ---> + + <meta http-equiv="Content-Security-Policy" content="default-src 'self' lvh.me lvh.me:5000 cdn.yoox.biz secure.api.yoox.biz cdn3.yoox.biz ltho.s3.amazonaws.com stone.sup.land secure.api.yoox.com data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *"> + <meta name="format-detection" content="telephone=no"> <meta name="msapplication-tap-highlight" content="no"> <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width"> @@ -184,6 +184,7 @@ <div id="archive"> <div class="scroll"> <div class="content"> + <script type="text/html" class="template"> <div class="image" style="background-image:url({{image}})"></div> <div class="text"> @@ -195,8 +196,11 @@ {{caption}} </div> </div> + </script> + </div> + <div class="extra" style="height:500px">asdf</div> </div> <div class="menu"> <div class="items"> diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js index 0b3531dd..414f2b42 100644 --- 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: "development" }) app.bind() app.build() diff --git a/StoneIsland/www/js/lib/_router.js b/StoneIsland/www/js/lib/_router.js index b1fa1c97..5cd09d6c 100644 --- a/StoneIsland/www/js/lib/_router.js +++ b/StoneIsland/www/js/lib/_router.js @@ -86,6 +86,7 @@ var SiteRouter = Router.extend({ app.view = app[name] } app.header.set_back( !! app.view.back ) + console.log("showing now") app.view.show() }.bind(this) return fn diff --git a/StoneIsland/www/js/lib/account/OrdersView.js b/StoneIsland/www/js/lib/account/OrdersView.js index a1b83767..e51676e0 100644 --- 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: { - "click .back": "back", - "click .item": "load_single", + "touchstart .back": "back", + "touchstart .item": "load_single", }, initialize: function(){ diff --git a/StoneIsland/www/js/lib/auth/LoginView.js b/StoneIsland/www/js/lib/auth/LoginView.js index 1f7438cc..f96d1e44 100644 --- 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: { - "click .newuser": "new_user", + "touchstart .newuser": "new_user", "submit form": "save", }, diff --git a/StoneIsland/www/js/lib/auth/SignupView.js b/StoneIsland/www/js/lib/auth/SignupView.js index afbb8877..19c07c32 100644 --- 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: { - "click .privacy-msg": "privacy_link", + "touchstart .privacy-msg": "privacy_link", "submit form": "save", }, diff --git a/StoneIsland/www/js/lib/blogs/ArchiveView.js b/StoneIsland/www/js/lib/blogs/ArchiveView.js index 254df6d1..2802ab9e 100644 --- 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: { - "click .item": "pick", + "touchstart .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 49c05ff6..b2fb16db 100644 --- 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: { - "click .share": "content-share", - "click .store": "store_link", - "click .gallery-left": "gallery_left", - "click .gallery-right": "gallery_right", - "click .play": "play_video", + "touchstart .share": "content-share", + "touchstart .store": "store_link", + "touchstart .gallery-left": "gallery_left", + "touchstart .gallery-right": "gallery_right", + "touchstart .play": "play_video", }, initialize: function(){ diff --git a/StoneIsland/www/js/lib/blogs/StoryView.js b/StoneIsland/www/js/lib/blogs/StoryView.js index 84684ff7..d0449635 100644 --- 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: { - "click .links li": "pick", + "touchstart .links li": "pick", }, initialize: function(){ diff --git a/StoneIsland/www/js/lib/cart/CartPayment.js b/StoneIsland/www/js/lib/cart/CartPayment.js index f3c54d55..7dd4db7c 100644 --- 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", - "click .address_dropdown": "toggle_address", - "click .cc_dropdown": "toggle_cc", + "touchstart .address_dropdown": "toggle_address", + "touchstart .cc_dropdown": "toggle_cc", }, initialize: function(opt){ diff --git a/StoneIsland/www/js/lib/cart/CartShipping.js b/StoneIsland/www/js/lib/cart/CartShipping.js index f17d42d2..33b082c0 100644 --- 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: { - "click .dropdown-wrapper": "toggle_dropdown", + "touchstart .dropdown-wrapper": "toggle_dropdown", }, initialize: function(opt){ diff --git a/StoneIsland/www/js/lib/cart/CartSummary.js b/StoneIsland/www/js/lib/cart/CartSummary.js index ff1e001f..51b9cb80 100644 --- 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: { - "click .remove": "remove_item", + "touchstart .remove": "remove_item", }, data: null, @@ -156,6 +156,7 @@ var CartSummary = ScrollableView.extend({ this.parent.$itemcount.html("0 ITEMS") this.el.className = "empty" this.parent.$steps.hide() + app.curtain.hide("loading") }, save: function(){ @@ -188,12 +189,17 @@ var CartSummary = ScrollableView.extend({ } app.curtain.show("loading") + console.log("loading") sdk.cart.delete_item({ data: { Code10: data.code, Size: data.size, }, success: function(){ + console.log("success") + app.curtain.hide("loading") + }, + error: function(){ app.curtain.hide("loading") }, }) diff --git a/StoneIsland/www/js/lib/cart/CartView.js b/StoneIsland/www/js/lib/cart/CartView.js index 1b08e418..0e04c025 100644 --- 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: { - "click .summary_step": "show_summary", - "click .shipping_step": "show_shipping", - "click .payment_step": "show_payment", + "touchstart .summary_step": "show_summary", + "touchstart .shipping_step": "show_shipping", + "touchstart .payment_step": "show_payment", }, initialize: function(){ diff --git a/StoneIsland/www/js/lib/nav/HeaderView.js b/StoneIsland/www/js/lib/nav/HeaderView.js index b2f01208..73fe106d 100644 --- a/StoneIsland/www/js/lib/nav/HeaderView.js +++ b/StoneIsland/www/js/lib/nav/HeaderView.js @@ -45,7 +45,7 @@ var HeaderView = View.extend({ count: 0, set_cart_count: function(n){ this.count = n - this.$cart_count.html(n || " ") + this.$cart_count.html(n || "0") }, increment_cart_count: function(){ this.$cart_count.html( ++this.count ) diff --git a/StoneIsland/www/js/lib/products/ClosedStoreView.js b/StoneIsland/www/js/lib/products/ClosedStoreView.js index 5f8c1e84..c42e1828 100644 --- 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: { - "click .website_link": "website_link", + "touchstart .website_link": "website_link", }, delay: 8000, diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js index 4789850a..9d518b11 100644 --- 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: { - "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", + "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", }, initialize: function(){ @@ -21,6 +21,7 @@ var ProductView = ScrollableView.extend({ this.$type = this.$(".type") this.$price = this.$(".price") this.$size = this.$(".size") + this.$share = this.$(".share") this.$color = this.$(".color") this.$body = this.$(".body") this.$fit = this.$(".fit") @@ -202,12 +203,14 @@ var ProductView = ScrollableView.extend({ }, select_size: function(){ + if (this.is_onesize) { return this.select_color() } if (this.item['Sizes'].length == 0) { return } var sizes = Object.keys(this.sizes).map(function(key){ return this.sizes[key] }.bind(this)) - app.selector.select(sizes, function(size){ + + app.selector.select("style", sizes, function(size){ this.size = size.value this.$size.html(size.label) }.bind(this)) @@ -218,7 +221,7 @@ var ProductView = ScrollableView.extend({ var colors = Object.keys(this.colors).map(function(key){ return this.colors[key] }.bind(this)) - app.selector.select(colors, function(color){ + app.selector.select("style", colors, function(color){ this.code = color.code this.$color.html(color.label) }.bind(this)) @@ -267,6 +270,7 @@ var ProductView = ScrollableView.extend({ }, share: function(){ + console.log("share") window.plugins.socialsharing.share( this.item['ModelNames'], null, null, "http://stoneisland.com/") }, diff --git a/StoneIsland/www/js/lib/products/Selector.js b/StoneIsland/www/js/lib/products/Selector.js index 76c498ec..1b91cf80 100644 --- 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: { - "click .close": "hide", + "touchstart .close": "hide", "click .options div": "pick", }, @@ -14,7 +14,7 @@ var Selector = View.extend({ lookup: null, callback: null, - select: function(options, callback){ + select: function(origin, options, callback){ this.lookup = {} this.callback = callback || function(item){ console.log(item) } this.$options.empty() @@ -27,6 +27,17 @@ 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}) + + + + }, hide: function(){ @@ -40,7 +51,6 @@ var Selector = View.extend({ var $option = $(e.currentTarget) var id = String($option.data("id")) var selection = this.lookup[id] - this.callback( selection ) this.hide() }, diff --git a/StoneIsland/www/js/lib/products/filters/CategoryFilter.js b/StoneIsland/www/js/lib/products/filters/CategoryFilter.js index 4e6baf62..53f9a59b 100644 --- a/StoneIsland/www/js/lib/products/filters/CategoryFilter.js +++ b/StoneIsland/www/js/lib/products/filters/CategoryFilter.js @@ -17,7 +17,7 @@ var CategoryFilter = View.extend({ label: "REMOVE FILTER", }) } - app.selector.select(cats, this.pick.bind(this)) + app.selector.select("wide", cats, this.pick.bind(this)) }, last_choice: null, diff --git a/StoneIsland/www/js/lib/view/Serializable.js b/StoneIsland/www/js/lib/view/Serializable.js index 98aa8ce3..921dc275 100644 --- 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", - "click .date-wrapper": "focus_date", + "touchstart .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 41638ab7..70d2c7eb 100644 --- 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 = 'tap' -// } + if (eventName === 'click') { + eventName = 'touchstart' + } } if (selector === '') { this.$el.on(eventName, method); |
