summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-09-16 20:27:14 -0400
committerJules Laplace <jules@okfoc.us>2015-09-16 20:27:14 -0400
commit7eb327b13bd9ee241f47f22ba1c3db3c90e8e942 (patch)
tree0a47937e7e0785ff7f4cd925193ed385ade97567
parent14b92bdc7fb69a5751a7e029537e910cb7345262 (diff)
populate collectionview and productview
-rw-r--r--StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcshareddata/StoneIsland.xccheckout41
-rw-r--r--StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstatebin7709 -> 7875 bytes
-rw-r--r--StoneIsland/platforms/ios/www/css/blogs.css3
-rw-r--r--StoneIsland/platforms/ios/www/css/products.css2
-rw-r--r--StoneIsland/www/css/blogs.css3
-rw-r--r--StoneIsland/www/css/nav.css2
-rw-r--r--StoneIsland/www/css/products.css2
-rw-r--r--StoneIsland/www/index.html23
-rw-r--r--StoneIsland/www/js/lib/products/CollectionView.js9
-rw-r--r--StoneIsland/www/js/lib/products/ProductView.js156
10 files changed, 226 insertions, 15 deletions
diff --git a/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcshareddata/StoneIsland.xccheckout b/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcshareddata/StoneIsland.xccheckout
new file mode 100644
index 00000000..841af2bf
--- /dev/null
+++ b/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcshareddata/StoneIsland.xccheckout
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IDESourceControlProjectFavoriteDictionaryKey</key>
+ <false/>
+ <key>IDESourceControlProjectIdentifier</key>
+ <string>7E1D02F6-0F9E-4C28-9F28-2E37CB639DF0</string>
+ <key>IDESourceControlProjectName</key>
+ <string>StoneIsland</string>
+ <key>IDESourceControlProjectOriginsDictionary</key>
+ <dict>
+ <key>10B248D89F55F057EF759644D7695723C40D8B27</key>
+ <string>github.com:okfocus/stone-island.git</string>
+ </dict>
+ <key>IDESourceControlProjectPath</key>
+ <string>StoneIsland/platforms/ios/StoneIsland.xcodeproj</string>
+ <key>IDESourceControlProjectRelativeInstallPathDictionary</key>
+ <dict>
+ <key>10B248D89F55F057EF759644D7695723C40D8B27</key>
+ <string>../../../../..</string>
+ </dict>
+ <key>IDESourceControlProjectURL</key>
+ <string>github.com:okfocus/stone-island.git</string>
+ <key>IDESourceControlProjectVersion</key>
+ <integer>111</integer>
+ <key>IDESourceControlProjectWCCIdentifier</key>
+ <string>10B248D89F55F057EF759644D7695723C40D8B27</string>
+ <key>IDESourceControlProjectWCConfigurations</key>
+ <array>
+ <dict>
+ <key>IDESourceControlRepositoryExtensionIdentifierKey</key>
+ <string>public.vcs.git</string>
+ <key>IDESourceControlWCCIdentifierKey</key>
+ <string>10B248D89F55F057EF759644D7695723C40D8B27</string>
+ <key>IDESourceControlWCCName</key>
+ <string>stone-island</string>
+ </dict>
+ </array>
+</dict>
+</plist>
diff --git a/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate b/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate
index a5309150..5b45af91 100644
--- a/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate
+++ b/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate
Binary files differ
diff --git a/StoneIsland/platforms/ios/www/css/blogs.css b/StoneIsland/platforms/ios/www/css/blogs.css
index 5f0641c2..ec945f65 100644
--- a/StoneIsland/platforms/ios/www/css/blogs.css
+++ b/StoneIsland/platforms/ios/www/css/blogs.css
@@ -1,14 +1,17 @@
.story #story { display: block }
+#content.story { overflow: scroll }
#story {
display: none;
}
.hub #hub { display: block }
+#content.hub { overflow: scroll }
#hub {
display: none;
}
.archive #archive { display: block }
+#content.archive { overflow: scroll }
#archive {
display: none;
} \ No newline at end of file
diff --git a/StoneIsland/platforms/ios/www/css/products.css b/StoneIsland/platforms/ios/www/css/products.css
index ec175386..bac0d116 100644
--- a/StoneIsland/platforms/ios/www/css/products.css
+++ b/StoneIsland/platforms/ios/www/css/products.css
@@ -1,5 +1,6 @@
.collection #collection { display: block }
.collection #footer .filter { display: block }
+#content.collection { overflow: scroll }
#collection {
display: none;
}
@@ -7,6 +8,7 @@
.product #product { display: block }
.product #footer .buynow { display: block }
.product #footer .addtocart { display: block }
+#content.product { overflow: scroll }
#product {
display: none;
}
diff --git a/StoneIsland/www/css/blogs.css b/StoneIsland/www/css/blogs.css
index 5f0641c2..ec945f65 100644
--- a/StoneIsland/www/css/blogs.css
+++ b/StoneIsland/www/css/blogs.css
@@ -1,14 +1,17 @@
.story #story { display: block }
+#content.story { overflow: scroll }
#story {
display: none;
}
.hub #hub { display: block }
+#content.hub { overflow: scroll }
#hub {
display: none;
}
.archive #archive { display: block }
+#content.archive { overflow: scroll }
#archive {
display: none;
} \ No newline at end of file
diff --git a/StoneIsland/www/css/nav.css b/StoneIsland/www/css/nav.css
index 25f4c3bb..8842e6e1 100644
--- a/StoneIsland/www/css/nav.css
+++ b/StoneIsland/www/css/nav.css
@@ -16,13 +16,11 @@
-webkit-transform: translateZ(0) translateX(0px);
-webkit-transition: -webkit-transform 0.3s;
}
-/*
.ios #nav,
.ios #content {
top: 20px;
height: -webkit-calc(100% - 20px);
}
- */
.nav #nav {
-webkit-transform: translateZ(0) translateX(0);
}
diff --git a/StoneIsland/www/css/products.css b/StoneIsland/www/css/products.css
index ec175386..bac0d116 100644
--- a/StoneIsland/www/css/products.css
+++ b/StoneIsland/www/css/products.css
@@ -1,5 +1,6 @@
.collection #collection { display: block }
.collection #footer .filter { display: block }
+#content.collection { overflow: scroll }
#collection {
display: none;
}
@@ -7,6 +8,7 @@
.product #product { display: block }
.product #footer .buynow { display: block }
.product #footer .addtocart { display: block }
+#content.product { overflow: scroll }
#product {
display: none;
}
diff --git a/StoneIsland/www/index.html b/StoneIsland/www/index.html
index 652cce9a..a4d05049 100644
--- a/StoneIsland/www/index.html
+++ b/StoneIsland/www/index.html
@@ -126,29 +126,30 @@
<div class="loader"></div>
<div class="content">
<script type="text/html" class="template">
- <div data-code="{{code8}}">
+ <div class="item" data-code="{{code8}}">
<img src="{{image}}">
</div>
</script>
</div>
</div>
-
<div id="product">
<span class="left"></span>
<span class="right"></span>
<div class="gallery">
<img src="">
</div>
- <span class="title"></span>
- <span class="type"></span>
- <span class="price"></span>
- <span class="style">
- <span class="size"></span>
- <span class="color"></span>
- </span>
- <span class="share">SHARE +</span>
- <div class="body">
+ <div class="content">
+ <h2><b class="num"></b><span class="title"></h2>
+ <span class="type"></span>
+ <span class="price"></span>
+ <span class="style">
+ <span class="size"></span>
+ <span class="color"></span>
+ </span>
+ <span class="share">SHARE +</span>
+ <div class="body">
+ </div>
</div>
</div>
diff --git a/StoneIsland/www/js/lib/products/CollectionView.js b/StoneIsland/www/js/lib/products/CollectionView.js
index 0ce740a8..1234ec11 100644
--- a/StoneIsland/www/js/lib/products/CollectionView.js
+++ b/StoneIsland/www/js/lib/products/CollectionView.js
@@ -7,6 +7,7 @@ var CollectionView = View.extend({
items: {},
events: {
+ "click .item": "pick",
},
initialize: function(){
@@ -25,7 +26,7 @@ var CollectionView = View.extend({
fetch: function(){
this.$loader.show()
sdk.fetch_collection({
- gallery_id: 31617, // STONE ISLAND / SUPREME
+ gallery_id: 31483, // FOCUS ON CAMO
success: this.populate.bind(this)
})
},
@@ -43,5 +44,11 @@ var CollectionView = View.extend({
}.bind(this))
},
+
+ pick: function(e){
+ var code = $(e.currentTarget).data("code")
+ var data = this.items[code]
+ app.product.load(data)
+ },
})
diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js
index 3c18338e..a98f3ca4 100644
--- a/StoneIsland/www/js/lib/products/ProductView.js
+++ b/StoneIsland/www/js/lib/products/ProductView.js
@@ -1,15 +1,169 @@
+var SIZE_LOOKUP = {
+ "XS": "X-SMALL",
+ "S": "SMALL",
+ "M": "MEDIUM",
+ "L": "LARGE",
+ "XL": "X-LARGE",
+ "XXL": "XX-LARGE",
+ "XXXL": "XXX-LARGE",
+};
+
var ProductView = View.extend({
el: "#product",
events: {
+ "click .left": "prev",
+ "click .right": "next",
+ "touchstart .gallery": "touchstart",
+ "touchmove .gallery": "touchmove",
+ "touchend .gallery": "touchend",
+ "click .size": "select_size",
+ "click .color": "select_color",
+ "click .share": "share",
},
initialize: function(){
+ this.$num = this.$(".num")
+ this.$title = this.$(".title")
+ this.$type = this.$(".type")
+ this.$price = this.$(".price")
+ this.$size = this.$(".size")
+ this.$color = this.$(".color")
+ this.$body = this.$(".body")
},
show: function(){
document.body.className = "product"
},
+
+ load: function(data){
+ //
+ this.item = data
+
+ var name_partz = data['ModelNames'].split(' ')
+ var num = name_partz.shift()
+ var title = name_parts.join(' ')
+ var size = data['Sizes'][0]
+ var type = data['MicroCategory'].toUpperCase()
+ var price = "$" + data['DiscountedPrice'] + ".00"
+ var color = SIZE_LOOKUP[ data['Colors'][0]['Text'] ]
+ var body = ""
+
+ this.$num.html(num)
+ this.$title.html(title)
+ this.$type.html(type)
+ this.$price.html(price)
+ this.$size.html(size)
+ this.$color.html(color)
+ this.$body.html(body)
+ },
+
+ select_size: function(){
+ },
+ select_color: function(){
+ },
+ share: function(){
+ },
+
+ prev: function(){
+ },
+ next: function(){
+ },
+ touchstart: function(e){
+ },
+ touchmove: function(e){
+ },
+ end: function(e){
+ },
+
+})
+
+
+/*
+
+{
+ "Code8": "41504876",
+ "BrandName": "STONE ISLAND",
+ "DefaultCode10": "41504876MA",
+ "MicroCategory": "Jacket",
+ "MacroCategory": "COATS & JACKETS",
+ "FullPrice": 728,
+ "DiscountedPrice": 437,
+ "PriceListId": 155702498,
+ "ModelNames": "41764 FLOWING CAMO WATRO",
+ "Sizes": [
+ {
+ "Id": 4,
+ "Text": "S",
+ "ClassFamily": "INT",
+ "Labeled": true
+ },
+ {
+ "Id": 6,
+ "Text": "L",
+ "ClassFamily": "INT",
+ "Labeled": true
+ },
+ {
+ "Id": 7,
+ "Text": "XL",
+ "ClassFamily": "INT",
+ "Labeled": true
+ },
+ {
+ "Id": 8,
+ "Text": "XXL",
+ "ClassFamily": "INT",
+ "Labeled": true
+ }
+ ],
+ "Colors": [
+ {
+ "Id": 3152,
+ "Code10": {
+ "Id": 6769575,
+ "Value": "41504876MA"
+ },
+ "Description": "Green",
+ "MacroColorId": 3152,
+ "Rgb": "3C941F"
+ }
+ ],
+ "SizeTypeId": 928,
+ "HasFlipSide": false,
+ "SeasonOfSale": "PE15",
+ "SalesLineId": "126",
+ "SalesLine": "18_STONE ISLAND",
+ "MarketId": 19,
+ "Criteria": {
+ "Sizes": [
+ "3",
+ "5",
+ "6",
+ "7"
+ ],
+ "Looks": [],
+ "Styles": [],
+ "WashTypes": [],
+ "WashStories": [],
+ "WashCodes": [],
+ "Waists": [],
+ "Fabrics": [],
+ "ColorTypes": [],
+ "ModelNames": [],
+ "Material": []
+ },
+ "NoveltyPoints": 0,
+ "C10Attributes": [
+ {
+ "Key": "MFC",
+ "Value": "621541764CC-6215-64V0050",
+ "C10": "41504876MA"
+ }
+ ],
+ "MacroCategoryId": 224,
+ "MicroCategoryId": 1319
+},
-}) \ No newline at end of file
+*/ \ No newline at end of file