summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xStoneIsland/config.xml2
-rwxr-xr-xStoneIsland/platforms/ios/Stone Island.xcodeproj/project.pbxproj2
-rwxr-xr-xStoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstatebin37061 -> 39869 bytes
-rwxr-xr-xStoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist4
-rwxr-xr-xStoneIsland/platforms/ios/Stone Island/config.xml2
-rwxr-xr-xStoneIsland/platforms/ios/www/js/index.js2
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js1
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js42
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js2
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/etc/push.js3
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/products/ClosedStoreView.js20
-rwxr-xr-xStoneIsland/www/js/index.js2
-rwxr-xr-xStoneIsland/www/js/lib/blogs/ArchiveView.js1
-rwxr-xr-xStoneIsland/www/js/lib/blogs/BlogView.js42
-rwxr-xr-xStoneIsland/www/js/lib/blogs/StoryView.js2
-rwxr-xr-xStoneIsland/www/js/lib/etc/push.js3
-rwxr-xr-xStoneIsland/www/js/lib/products/ClosedStoreView.js20
17 files changed, 98 insertions, 52 deletions
diff --git a/StoneIsland/config.xml b/StoneIsland/config.xml
index 8904f386..d6130be4 100755
--- a/StoneIsland/config.xml
+++ b/StoneIsland/config.xml
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
-<widget id="us.okfoc.stoneisland" version="0.3.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+<widget id="us.okfoc.stoneisland" version="0.3.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Stone Island</name>
<description>
Stone Island
diff --git a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.pbxproj b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.pbxproj
index c3164364..bb05ee63 100755
--- a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.pbxproj
+++ b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.pbxproj
@@ -567,6 +567,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
+ ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"Stone Island/Plugins/com.parse.cordova.core.pushplugin\"",
@@ -606,6 +607,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
+ ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"Stone Island/Plugins/com.parse.cordova.core.pushplugin\"",
diff --git a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate
index b811b6a2..739ca125 100755
--- a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate
+++ b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate
Binary files differ
diff --git a/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist b/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist
index 78446e5b..259f7c4d 100755
--- a/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist
+++ b/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist
@@ -57,7 +57,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>0.3.2</string>
+ <string>0.3.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
@@ -70,7 +70,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
- <string>0.3.2</string>
+ <string>0.3.3</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
diff --git a/StoneIsland/platforms/ios/Stone Island/config.xml b/StoneIsland/platforms/ios/Stone Island/config.xml
index e2b86e33..3dfdae4b 100755
--- a/StoneIsland/platforms/ios/Stone Island/config.xml
+++ b/StoneIsland/platforms/ios/Stone Island/config.xml
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
-<widget id="us.okfoc.stoneisland" version="0.3.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+<widget id="us.okfoc.stoneisland" version="0.3.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<preference name="AllowInlineMediaPlayback" value="false" />
<preference name="BackupWebStorage" value="cloud" />
<preference name="DisallowOverscroll" value="false" />
diff --git a/StoneIsland/platforms/ios/www/js/index.js b/StoneIsland/platforms/ios/www/js/index.js
index 468c0d7e..0b3531dd 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: "test" })
+ sdk.init({ env: "production" })
app.bind()
app.build()
diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js
index 254df6d1..a1863b67 100755
--- a/StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js
@@ -78,6 +78,7 @@ var ArchiveView = ScrollableView.extend({
count = count || row.images.length
row.images.forEach(function(cell, i){
+ if (count && i > count) { return }
var $t = $("<div>")
$t.addClass("row").addClass("loading")
var t = this.row_template.replace(/{{image}}/, cell.uri)
diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js
index 51881aa5..ffd09fe1 100755
--- a/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js
@@ -24,6 +24,29 @@ var BlogView = View.extend({
this.loaded = true
this.data = data = typeof data == "string" ? JSON.parse(data) : data
+ switch (data.store[0].StoreStatus) {
+ case "open":
+ app.closed.storeIsClosed = false
+ break
+ case "closed":
+ app.closed.storeIsClosed = true
+ app.closed.storeOpenDate = null
+ break
+ case "openson":
+ app.closed.storeIsClosed = true
+ app.closed.storeOpenDate = moment(data.store[0].OpensOn)
+ break
+ }
+
+ if (app.closed.storeIsClosed) {
+ app.closed.populate(data.store[0].ClosedStoreImages)
+ }
+ else {
+ app.gallery_id = data.store[0].CollectionId
+ app.collection.setCollectionName( data.store[0].collection )
+ app.collection.fetch()
+ }
+
app.archive.populate(data.archive)
this.loader.preloadImage(data.hub[0].image[0].uri, function(img){
app.hub.populate(data.hub)
@@ -39,22 +62,7 @@ var BlogView = View.extend({
data.page.forEach(function(page){
app[page.tag].populate(page)
})
- app.collection.setCollectionName( data.store[0].collection )
- app.closed.populate(data.store[0].ClosedStoreImages)
- switch (data.store[0].StoreStatus) {
- case "open":
- app.closed.storeIsClosed = false
- break
- case "closed":
- app.closed.storeIsClosed = true
- app.closed.storeOpenDate = null
- break
- case "openson":
- app.closed.storeIsClosed = true
- app.closed.storeOpenDate = moment(data.store[0].OpensOn)
- break
- }
console.log(data.store[0].StoreStatus)
var fits_large = (data.store[0].FitsLarge === "true")
@@ -65,10 +73,6 @@ var BlogView = View.extend({
app.collection.$el.addClass("gray")
app.product.gallery.$el.addClass("gray")
}
-
- app.gallery_id = data.store[0].CollectionId
-
- app.collection.fetch()
},
}) \ No newline at end of file
diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js
index a10c8351..98cd330b 100755
--- a/StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js
@@ -15,6 +15,7 @@ var StoryView = ScrollableView.extend({
this.$content = this.$(".content")
this.$links = this.$(".links")
this.$loader = this.$(".loader")
+ this.loader = new Loader ()
this.scroller = new IScroll('#story', app.iscroll_options)
},
@@ -60,6 +61,7 @@ var StoryView = ScrollableView.extend({
var section = this.sections[id]
var replace = this.$img
// optional image transition.. ?
+
this.$img.fadeTo(110,0.65, function() {
replace.attr("src", section.image.uri)
}).fadeTo(130,1)
diff --git a/StoneIsland/platforms/ios/www/js/lib/etc/push.js b/StoneIsland/platforms/ios/www/js/lib/etc/push.js
index 9a921059..15371247 100755
--- a/StoneIsland/platforms/ios/www/js/lib/etc/push.js
+++ b/StoneIsland/platforms/ios/www/js/lib/etc/push.js
@@ -25,6 +25,7 @@ var push = (function(){
parsePlugin.subscribe(channel, function(){
push.settings[channel] = true
localStorage.setItem("yoox.push_" + channel, "true")
+ console.log("subscribed to", channel)
cb && cb()
}, push.error)
}
@@ -32,6 +33,7 @@ var push = (function(){
parsePlugin.unsubscribe(channel, function(){
push.settings[channel] = false
localStorage.setItem("yoox.push_" + channel, "false")
+ console.log("unsubscribed from", channel)
cb && cb()
}, push.error)
}
@@ -58,6 +60,7 @@ var push = (function(){
else {
app.intro.$alert.show().html("[ STORE UPDATED ]")
}
+ }
catch (e) {
app.intro.$alert.show().html("[ HUB UPDATED ]")
}
diff --git a/StoneIsland/platforms/ios/www/js/lib/products/ClosedStoreView.js b/StoneIsland/platforms/ios/www/js/lib/products/ClosedStoreView.js
index 5f8c1e84..6f7b8486 100755
--- a/StoneIsland/platforms/ios/www/js/lib/products/ClosedStoreView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/products/ClosedStoreView.js
@@ -12,6 +12,7 @@ var ClosedStoreView = View.extend({
timeout: -1,
images: null,
+ images_loaded: {},
initialize: function(){
this.loader = new Loader ()
@@ -21,7 +22,6 @@ var ClosedStoreView = View.extend({
document.body.className = "closed"
this.animate()
app.footer.hide()
- console.log(this)
if (this.storeOpenDate) {
var date = moment(this.storeOpenDate).format("MM/DD")
console.log(date)
@@ -38,15 +38,27 @@ var ClosedStoreView = View.extend({
animate: function(){
this.timeout = setTimeout(this.animate.bind(this), this.delay)
+ this.next()
+ },
+
+ next: function(){
if (! this.images) return
var url = choice(this.images)
- this.loader.preloadImage(url, function(img){
- this.el.style.backgroundImage = 'url(' + img.src + ')'
- }.bind(this))
+
+ if (this.images_loaded[url]) {
+ this.el.style.backgroundImage = 'url(' + url + ')'
+ }
+ else {
+ this.loader.preloadImage(url, function(img){
+ this.el.style.backgroundImage = 'url(' + url + ')'
+ this.images_loaded[url] = true
+ }.bind(this))
+ }
},
populate: function(data){
this.images = data.map(function(img){ return img.uri })
+ this.next()
},
website_link: function(){
diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js
index 468c0d7e..0b3531dd 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: "test" })
+ sdk.init({ env: "production" })
app.bind()
app.build()
diff --git a/StoneIsland/www/js/lib/blogs/ArchiveView.js b/StoneIsland/www/js/lib/blogs/ArchiveView.js
index 254df6d1..a1863b67 100755
--- a/StoneIsland/www/js/lib/blogs/ArchiveView.js
+++ b/StoneIsland/www/js/lib/blogs/ArchiveView.js
@@ -78,6 +78,7 @@ var ArchiveView = ScrollableView.extend({
count = count || row.images.length
row.images.forEach(function(cell, i){
+ if (count && i > count) { return }
var $t = $("<div>")
$t.addClass("row").addClass("loading")
var t = this.row_template.replace(/{{image}}/, cell.uri)
diff --git a/StoneIsland/www/js/lib/blogs/BlogView.js b/StoneIsland/www/js/lib/blogs/BlogView.js
index 51881aa5..ffd09fe1 100755
--- a/StoneIsland/www/js/lib/blogs/BlogView.js
+++ b/StoneIsland/www/js/lib/blogs/BlogView.js
@@ -24,6 +24,29 @@ var BlogView = View.extend({
this.loaded = true
this.data = data = typeof data == "string" ? JSON.parse(data) : data
+ switch (data.store[0].StoreStatus) {
+ case "open":
+ app.closed.storeIsClosed = false
+ break
+ case "closed":
+ app.closed.storeIsClosed = true
+ app.closed.storeOpenDate = null
+ break
+ case "openson":
+ app.closed.storeIsClosed = true
+ app.closed.storeOpenDate = moment(data.store[0].OpensOn)
+ break
+ }
+
+ if (app.closed.storeIsClosed) {
+ app.closed.populate(data.store[0].ClosedStoreImages)
+ }
+ else {
+ app.gallery_id = data.store[0].CollectionId
+ app.collection.setCollectionName( data.store[0].collection )
+ app.collection.fetch()
+ }
+
app.archive.populate(data.archive)
this.loader.preloadImage(data.hub[0].image[0].uri, function(img){
app.hub.populate(data.hub)
@@ -39,22 +62,7 @@ var BlogView = View.extend({
data.page.forEach(function(page){
app[page.tag].populate(page)
})
- app.collection.setCollectionName( data.store[0].collection )
- app.closed.populate(data.store[0].ClosedStoreImages)
- switch (data.store[0].StoreStatus) {
- case "open":
- app.closed.storeIsClosed = false
- break
- case "closed":
- app.closed.storeIsClosed = true
- app.closed.storeOpenDate = null
- break
- case "openson":
- app.closed.storeIsClosed = true
- app.closed.storeOpenDate = moment(data.store[0].OpensOn)
- break
- }
console.log(data.store[0].StoreStatus)
var fits_large = (data.store[0].FitsLarge === "true")
@@ -65,10 +73,6 @@ var BlogView = View.extend({
app.collection.$el.addClass("gray")
app.product.gallery.$el.addClass("gray")
}
-
- app.gallery_id = data.store[0].CollectionId
-
- app.collection.fetch()
},
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/blogs/StoryView.js b/StoneIsland/www/js/lib/blogs/StoryView.js
index a10c8351..98cd330b 100755
--- a/StoneIsland/www/js/lib/blogs/StoryView.js
+++ b/StoneIsland/www/js/lib/blogs/StoryView.js
@@ -15,6 +15,7 @@ var StoryView = ScrollableView.extend({
this.$content = this.$(".content")
this.$links = this.$(".links")
this.$loader = this.$(".loader")
+ this.loader = new Loader ()
this.scroller = new IScroll('#story', app.iscroll_options)
},
@@ -60,6 +61,7 @@ var StoryView = ScrollableView.extend({
var section = this.sections[id]
var replace = this.$img
// optional image transition.. ?
+
this.$img.fadeTo(110,0.65, function() {
replace.attr("src", section.image.uri)
}).fadeTo(130,1)
diff --git a/StoneIsland/www/js/lib/etc/push.js b/StoneIsland/www/js/lib/etc/push.js
index 9a921059..15371247 100755
--- a/StoneIsland/www/js/lib/etc/push.js
+++ b/StoneIsland/www/js/lib/etc/push.js
@@ -25,6 +25,7 @@ var push = (function(){
parsePlugin.subscribe(channel, function(){
push.settings[channel] = true
localStorage.setItem("yoox.push_" + channel, "true")
+ console.log("subscribed to", channel)
cb && cb()
}, push.error)
}
@@ -32,6 +33,7 @@ var push = (function(){
parsePlugin.unsubscribe(channel, function(){
push.settings[channel] = false
localStorage.setItem("yoox.push_" + channel, "false")
+ console.log("unsubscribed from", channel)
cb && cb()
}, push.error)
}
@@ -58,6 +60,7 @@ var push = (function(){
else {
app.intro.$alert.show().html("[ STORE UPDATED ]")
}
+ }
catch (e) {
app.intro.$alert.show().html("[ HUB UPDATED ]")
}
diff --git a/StoneIsland/www/js/lib/products/ClosedStoreView.js b/StoneIsland/www/js/lib/products/ClosedStoreView.js
index 5f8c1e84..6f7b8486 100755
--- a/StoneIsland/www/js/lib/products/ClosedStoreView.js
+++ b/StoneIsland/www/js/lib/products/ClosedStoreView.js
@@ -12,6 +12,7 @@ var ClosedStoreView = View.extend({
timeout: -1,
images: null,
+ images_loaded: {},
initialize: function(){
this.loader = new Loader ()
@@ -21,7 +22,6 @@ var ClosedStoreView = View.extend({
document.body.className = "closed"
this.animate()
app.footer.hide()
- console.log(this)
if (this.storeOpenDate) {
var date = moment(this.storeOpenDate).format("MM/DD")
console.log(date)
@@ -38,15 +38,27 @@ var ClosedStoreView = View.extend({
animate: function(){
this.timeout = setTimeout(this.animate.bind(this), this.delay)
+ this.next()
+ },
+
+ next: function(){
if (! this.images) return
var url = choice(this.images)
- this.loader.preloadImage(url, function(img){
- this.el.style.backgroundImage = 'url(' + img.src + ')'
- }.bind(this))
+
+ if (this.images_loaded[url]) {
+ this.el.style.backgroundImage = 'url(' + url + ')'
+ }
+ else {
+ this.loader.preloadImage(url, function(img){
+ this.el.style.backgroundImage = 'url(' + url + ')'
+ this.images_loaded[url] = true
+ }.bind(this))
+ }
},
populate: function(data){
this.images = data.map(function(img){ return img.uri })
+ this.next()
},
website_link: function(){