summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/www
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/platforms/ios/www')
-rwxr-xr-xStoneIsland/platforms/ios/www/css/account.css25
-rwxr-xr-xStoneIsland/platforms/ios/www/css/blogs.css40
-rwxr-xr-xStoneIsland/platforms/ios/www/css/nav.css52
-rwxr-xr-xStoneIsland/platforms/ios/www/css/products.css15
-rwxr-xr-xStoneIsland/platforms/ios/www/index.html10
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/_router.js1
-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.js8
-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.js8
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/cart/CartView.js6
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/nav/HeaderView.js2
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/products/ClosedStoreView.js2
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/products/ProductView.js20
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/products/Selector.js16
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/products/filters/CategoryFilter.js2
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/view/Serializable.js2
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/view/View.js6
23 files changed, 155 insertions, 86 deletions
diff --git a/StoneIsland/platforms/ios/www/css/account.css b/StoneIsland/platforms/ios/www/css/account.css
index fa4243c1..fbb960d0 100755
--- a/StoneIsland/platforms/ios/www/css/account.css
+++ b/StoneIsland/platforms/ios/www/css/account.css
@@ -206,9 +206,11 @@ input[type=text], input[type=password], input[type=number], input[type=email] {
}
input.switch {
- max-height: 0;
- max-width: 0;
- opacity: 0;
+ height: 50px;
+ width: 50px;
+ opacity: 0;
+ z-index: 9999999;
+ position: relative;
}
input.switch + label {
@@ -220,7 +222,7 @@ input.switch + label {
border-radius: 15px;
position: absolute;
top: 50%;
- left: 0;
+ left: 25px;
transform: translateX(-50%) translateY(-50%);
}
@@ -295,7 +297,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 +345,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 +413,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/platforms/ios/www/css/blogs.css b/StoneIsland/platforms/ios/www/css/blogs.css
index c45658a0..7af45c4f 100755
--- a/StoneIsland/platforms/ios/www/css/blogs.css
+++ b/StoneIsland/platforms/ios/www/css/blogs.css
@@ -23,10 +23,11 @@
text-decoration: underline;
}
#story .content > div {
- display: none;
+display:none;
}
#story .content div.active {
- display: block;
+display:block;
+animation: mfadein 0.6s;
}
.hub #hub { display: block }
@@ -99,7 +100,7 @@
.content-share {
border:1px solid black;
- padding:4px 8px;
+ padding:4px 8px 2px;
float:right
}
@@ -125,7 +126,7 @@
left:20px;
font-size:18px;
padding:3px 3px 3px 1px;
- z-index:999;
+ z-index:2;
position:absolute;
display:block;
}
@@ -146,7 +147,7 @@
right:20px;
font-size:18px;
padding:3px 1px 3px 3px;
- z-index:999;
+ z-index:2;
position:absolute;
display:block;
}
@@ -278,13 +279,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 +311,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 +339,6 @@ content:'';
transform:translateY(-50%) translateX(-50%);
}
+#archive {
+ box-sizing:border-box
+}
diff --git a/StoneIsland/platforms/ios/www/css/nav.css b/StoneIsland/platforms/ios/www/css/nav.css
index a75fb35c..923dd85f 100755
--- a/StoneIsland/platforms/ios/www/css/nav.css
+++ b/StoneIsland/platforms/ios/www/css/nav.css
@@ -29,7 +29,7 @@
-webkit-transform: translateZ(0) translateX(249px);
}
#nav .logo {
- background-image: url(../img/wide-logo.png);
+ background-image: url(../img/small-logo.png);
background-repeat: no-repeat;
background-position: center center;
background-size: contain;
@@ -103,7 +103,7 @@
#nav-container {
display:flex;
- height:calc(100% - 40px);
+ height:calc(100vh - 40px);
width:100%;
position:absolute;
flex-direction: column;
@@ -185,19 +185,20 @@ padding-bottom:0px;
border-bottom: 1px solid black;
}
#header .logo {
- background-image: url(../img/wide-logo.png);
+ background-image: url(../img/small-logo.png);
background-repeat: no-repeat;
background-position: center center;
position: absolute;
background-size: contain;
- width: 120px; height: 40px;
+ width: 100px; height: 40px;
left: 50%; top: -4px;
- margin-left: -60px;
+ margin-left: -50px;
+ top:0px;
}
#header .burger {
display: inline-block;
font-size: 24px;
- padding: 6px 10px;
+ padding: 9px 10px 5px;
}
#header .cart {
@@ -207,9 +208,12 @@ padding-bottom:0px;
top: 15px;
height: 18px;
margin-right:18px;
- border: 1px solid #a9a9a9;
+ background: #fff;
+ background-image:url(../img/cart-box.png);
+ background-size:100%;
+ background-repeat:no-repeat;
position: relative;
- background: #fff;
+
}
.cart .cart_count {
@@ -217,18 +221,25 @@ padding-bottom:0px;
top: 50%;
left: 50%;
transform: translateY(-50%) translateX(-50%);
- color: #a9a9a9;
- font-size:13px
+ color: #bbb;
+ font-size:12.35px;
}
.cart::before {
position: absolute;
- content: '\25E0';
- left:50%;
- transform:translateX(-50%);
- color:#a9a9a9;
- font-size:20px;
- top:calc(-100%);
+ content: '';
+ left: 50%;
+ transform: translateX(-50%);
+ color: #a9a9a9;
+ background-image: url(../img/small-cart-handle.png);
+ font-size: 20px;
+ background-size: 16px 8px;
+ background-repeat: no-repeat;
+ background-position: center;
+ width: 16px;
+ height: 8px;
+ top: calc(-50%);
+ opacity: 0.3;
}
#footer {
@@ -291,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/platforms/ios/www/css/products.css b/StoneIsland/platforms/ios/www/css/products.css
index 82c7c36c..bc215573 100755
--- a/StoneIsland/platforms/ios/www/css/products.css
+++ b/StoneIsland/platforms/ios/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/platforms/ios/www/index.html b/StoneIsland/platforms/ios/www/index.html
index 9ea4a499..b5f6c1b9 100755
--- a/StoneIsland/platforms/ios/www/index.html
+++ b/StoneIsland/platforms/ios/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/platforms/ios/www/js/lib/_router.js b/StoneIsland/platforms/ios/www/js/lib/_router.js
index b1fa1c97..5cd09d6c 100755
--- a/StoneIsland/platforms/ios/www/js/lib/_router.js
+++ b/StoneIsland/platforms/ios/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/platforms/ios/www/js/lib/account/OrdersView.js b/StoneIsland/platforms/ios/www/js/lib/account/OrdersView.js
index a1b83767..e51676e0 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: {
- "click .back": "back",
- "click .item": "load_single",
+ "touchstart .back": "back",
+ "touchstart .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 1f7438cc..f96d1e44 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: {
- "click .newuser": "new_user",
+ "touchstart .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 afbb8877..19c07c32 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: {
- "click .privacy-msg": "privacy_link",
+ "touchstart .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 254df6d1..2802ab9e 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: {
- "click .item": "pick",
+ "touchstart .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 49c05ff6..b2fb16db 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: {
- "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/platforms/ios/www/js/lib/blogs/StoryView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js
index 84684ff7..ee7193a6 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: {
- "click .links li": "pick",
+ "touchstart .links li": "pick",
},
initialize: function(){
@@ -58,7 +58,11 @@ var StoryView = ScrollableView.extend({
this.$content.find("[data-id=" + id + "]").addClass("active")
var section = this.sections[id]
- this.$img.attr("src", section.image.uri)
+ var replace = this.$img
+ // optional image transition.. ?
+ this.$img.fadeTo(110,0.65, function() {
+ replace.attr("src", section.image.uri)
+ }).fadeTo(130,1)
this.deferScrollToTop()
},
diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js
index f3c54d55..7dd4db7c 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",
- "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/platforms/ios/www/js/lib/cart/CartShipping.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartShipping.js
index f17d42d2..33b082c0 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: {
- "click .dropdown-wrapper": "toggle_dropdown",
+ "touchstart .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 ff1e001f..51b9cb80 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: {
- "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/platforms/ios/www/js/lib/cart/CartView.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartView.js
index 1b08e418..0e04c025 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: {
- "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/platforms/ios/www/js/lib/nav/HeaderView.js b/StoneIsland/platforms/ios/www/js/lib/nav/HeaderView.js
index b2f01208..73fe106d 100755
--- a/StoneIsland/platforms/ios/www/js/lib/nav/HeaderView.js
+++ b/StoneIsland/platforms/ios/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/platforms/ios/www/js/lib/products/ClosedStoreView.js b/StoneIsland/platforms/ios/www/js/lib/products/ClosedStoreView.js
index 5f8c1e84..c42e1828 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: {
- "click .website_link": "website_link",
+ "touchstart .website_link": "website_link",
},
delay: 8000,
diff --git a/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js b/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js
index 4789850a..9d518b11 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: {
- "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/platforms/ios/www/js/lib/products/Selector.js b/StoneIsland/platforms/ios/www/js/lib/products/Selector.js
index 76c498ec..1b91cf80 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: {
- "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/platforms/ios/www/js/lib/products/filters/CategoryFilter.js b/StoneIsland/platforms/ios/www/js/lib/products/filters/CategoryFilter.js
index 4e6baf62..53f9a59b 100755
--- a/StoneIsland/platforms/ios/www/js/lib/products/filters/CategoryFilter.js
+++ b/StoneIsland/platforms/ios/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/platforms/ios/www/js/lib/view/Serializable.js b/StoneIsland/platforms/ios/www/js/lib/view/Serializable.js
index 98aa8ce3..921dc275 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",
- "click .date-wrapper": "focus_date",
+ "touchstart .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 41638ab7..70d2c7eb 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 = 'tap'
-// }
+ if (eventName === 'click') {
+ eventName = 'touchstart'
+ }
}
if (selector === '') {
this.$el.on(eventName, method);