diff options
28 files changed, 125 insertions, 34 deletions
diff --git a/StoneIsland/config.xml b/StoneIsland/config.xml index 37d59b36..83d0c594 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.6" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> +<widget id="us.okfoc.stoneisland" version="0.4.0" 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/android/AndroidManifest.xml b/StoneIsland/platforms/android/AndroidManifest.xml index e14caf77..a210e5a7 100755 --- a/StoneIsland/platforms/android/AndroidManifest.xml +++ b/StoneIsland/platforms/android/AndroidManifest.xml @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='utf-8'?> -<manifest android:hardwareAccelerated="true" android:versionCode="304" android:versionName="0.3.4" package="us.okfoc.stoneisland" xmlns:android="http://schemas.android.com/apk/res/android"> +<manifest android:hardwareAccelerated="true" android:versionCode="306" android:versionName="0.3.6" package="us.okfoc.stoneisland" xmlns:android="http://schemas.android.com/apk/res/android"> <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> diff --git a/StoneIsland/platforms/android/assets/www/index.html b/StoneIsland/platforms/android/assets/www/index.html index 73eed267..5b949646 100755 --- a/StoneIsland/platforms/android/assets/www/index.html +++ b/StoneIsland/platforms/android/assets/www/index.html @@ -367,6 +367,18 @@ </span> </div> </div> + + <div class="toggle-container"> + <div class="caption"> + <h3>Newsletter</h3> + Receive Stone Island Newsletter + </div> + <div class="toggle"> + <input type="checkbox" id="receive-newsletter-signup" name="YooxLetter" class="switch" value="true"> + <label for="receive-newsletter-signup"></label> + </div> + </div> + <div class="container-row"> <div class="checkbox-container"> <div class="checkbox-row"> @@ -420,9 +432,34 @@ Receive Stone Island Newsletter </div> <div class="toggle"> - <input type="checkbox" id="receive-newsletter" name="YooxLetter" class="switch" value="true"> - <label for="receive-newsletter"></label> - </div> + <input type="checkbox" id="receive-newsletter-profile" name="YooxLetter" class="switch" value="true"> + <label for="receive-newsletter-profile"></label> + </div> + </div> + <div class="container-row"> + <div class="checkbox-container"> + <div class="checkbox-row"> + <div class="checkbox-toggle"> + <input id="checkbox-data-profiling-profile" type="checkbox" name="DataProfiling" value="true" required> + <label for="checkbox-data-profiling-profile"></label> + </div> + <label class="checkbox-caption" for="checkbox-data-profiling-profile"> + I agree that YOOX and SPORTSWEAR COMPANY may collect my personal information for marketing purposes (newsletters, news and promotions). + </label> + </div> + <div class="checkbox-row"> + <div class="checkbox-toggle"> + <input type="checkbox" id="checkbox-shopping-data-profiling-profile" name="DataProfiling2" value="true" required> + <label for="checkbox-shopping-data-profiling-profile"></label> + </div> + <label class="checkbox-caption" for="checkbox-shopping-data-profiling-profile"> + I agree that YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY may collect my personal information for creating a profile of my shopping habits. + </label> + </div> + <div class="privacy-msg"> + Consult our <u>PRIVACY POLICY</u> for further information. + </div> + </div> </div> </div> <div class="container-fill"> diff --git a/StoneIsland/platforms/android/assets/www/js/index.js b/StoneIsland/platforms/android/assets/www/js/index.js index 73af443a..050a729c 100755 --- a/StoneIsland/platforms/android/assets/www/js/index.js +++ b/StoneIsland/platforms/android/assets/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/android/assets/www/js/lib/_router.js b/StoneIsland/platforms/android/assets/www/js/lib/_router.js index 5cd09d6c..b1fa1c97 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/_router.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/_router.js @@ -86,7 +86,6 @@ 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/android/assets/www/js/lib/account/AccountView.js b/StoneIsland/platforms/android/assets/www/js/lib/account/AccountView.js index 1c5c9f16..7d3b719a 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/account/AccountView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/account/AccountView.js @@ -99,12 +99,18 @@ var AccountView = View.extend({ if ( ! auth.has_cart() ) { app.curtain.show("loading") auth.create_cart(function(){ - auth.add_deferred_product_to_cart(function(){ - app.router.go("cart") - setTimeout(function(){ - app.curtain.hide("loading") - }, 500) - }) + if (auth.deferred_product) { + auth.add_deferred_product_to_cart(function(){ + app.router.go("cart") + setTimeout(function(){ + app.curtain.hide("loading") + }, 500) + }) + } + else { + app.router.go("account/profile") + app.curtain.hide("loading") + } }) } else { diff --git a/StoneIsland/platforms/android/assets/www/js/lib/account/ProfileView.js b/StoneIsland/platforms/android/assets/www/js/lib/account/ProfileView.js index f370c055..2b608cb4 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/account/ProfileView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/account/ProfileView.js @@ -17,6 +17,20 @@ var ProfileView = FormView.extend({ if (! auth.logged_in()) { return app.router.go("intro") } app.footer.show("SAVE") document.body.className = "profile" + auth.user.DataProfiling2 = auth.user.DataProfiling + if (auth.user.BirthDay.match(/T/)) { + auth.user.BirthDay = auth.user.BirthDay.split("T")[0] + } + if (auth.user.name && ! auth.user.Name) { + auth.user.Name = auth.user.name + } + if (auth.user.surname && ! auth.user.Surname) { + auth.user.Surname = auth.user.surname + } + if (auth.user.email && ! auth.user.Email) { + auth.user.Email = auth.user.email + } + console.log(auth.user) this.preload(auth.user) this.deferScrollToTop() }, @@ -63,8 +77,11 @@ var ProfileView = FormView.extend({ // submissible_data.FuriganaSurname = "" // submissible_data.UserPromocode = "" submissible_data.BirthDay += "T00:00:00Z" - submissible_data.YooxLetter = data.YooxLetter || "false" - submissible_data.DataProfiling = "true" + submissible_data.YooxLetter = this.$("[name=YooxLetter]").prop("checked") + submissible_data.DataProfiling = this.$("[name=DataProfiling]").prop("checked") + + console.log(data.DataProfiling, submissible_data.DataProfiling) + console.log(submissible_data) return submissible_data }, diff --git a/StoneIsland/platforms/android/assets/www/js/lib/auth/LoginView.js b/StoneIsland/platforms/android/assets/www/js/lib/auth/LoginView.js index 8a002632..4ef2823f 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/auth/LoginView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/auth/LoginView.js @@ -37,8 +37,10 @@ var LoginView = FormView.extend({ }, success: function(data){ - // console.log(data) - app.account.logged_in(function(){ app.router.go("store") }) + console.log(data) + app.account.logged_in(function(){ + app.router.go("store") + }) }, error: function(data){ diff --git a/StoneIsland/platforms/android/assets/www/js/lib/auth/SignupView.js b/StoneIsland/platforms/android/assets/www/js/lib/auth/SignupView.js index ff5fa6bb..599f57c7 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/auth/SignupView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/auth/SignupView.js @@ -64,7 +64,7 @@ var SignupView = FormView.extend({ // if (data.Gender === "NONE") { errors.push([ "Gender", "Please supply your gender." ]) } if (data.DataProfiling !== "true") { errors.push([ "DataProfiling", "You must consent to use this service." ]) } if (data.DataProfiling2 !== "true") { errors.push([ "DataProfiling2", "You must consent to use this service." ]) } - if (! data.YooxLetter) { data.YooxLetter = false } + data.YooxLetter = this.$("[name=YooxLetter]").prop("checked") }, finalize: function(data){ diff --git a/StoneIsland/platforms/android/assets/www/js/lib/blogs/ArchiveView.js b/StoneIsland/platforms/android/assets/www/js/lib/blogs/ArchiveView.js index a1863b67..5a036930 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/blogs/ArchiveView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/blogs/ArchiveView.js @@ -63,9 +63,8 @@ var ArchiveView = ScrollableView.extend({ }.bind(this)) this.back() - this.deferScrollToTop() - this.populateDecade(0, 3) + this.deferScrollToTop() }, populateDecade: function(index, count){ @@ -107,6 +106,8 @@ var ArchiveView = ScrollableView.extend({ $t.removeClass('loading') }.bind(this)) }.bind(this)) + + this.deferRefresh() }, // ['transformProp'] = "translateZ(0) translateX(-50%) translateY(-50%) "; @@ -175,13 +176,11 @@ var ArchiveView = ScrollableView.extend({ gray = Math.round( (1-q) * 100 ) opacity = lerp(q, 0.2, 1) text_opacity = lerp(q, 1, 0.3) -// console.log("<", gray, opacity) } else { gray = Math.round( q * 100 ) opacity = lerp(q, 1, 0.2) text_opacity = lerp(q, 0.3, 1) -// console.log(">", gray, opacity) } aa.image.style.WebkitFilter = "grayscale(" + gray + "%)" aa.image.style.opacity = opacity diff --git a/StoneIsland/platforms/android/assets/www/js/lib/blogs/HubView.js b/StoneIsland/platforms/android/assets/www/js/lib/blogs/HubView.js index a6c4384b..dae7f98d 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/blogs/HubView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/blogs/HubView.js @@ -4,7 +4,7 @@ var HubView = ScrollableView.extend({ template: $("#hub .template").html(), events: { - "click .share": "content-share", + "click .content-share": "share", "click .store": "store_link", "click .gallery-left": "gallery_left", "click .gallery-right": "gallery_right", @@ -106,8 +106,10 @@ var HubView = ScrollableView.extend({ this.galleries[id].next() }, - share: function(){ - window.plugins.socialsharing.share( this.item['ModelNames'], null, null, "http://stoneisland.com/" ) + share: function(e){ + var title = $(e.currentTarget).parent().find(".title").text() + console.log("share", title) + window.plugins.socialsharing.share(title, null, null, "http://stoneisland.com/" ) }, })
\ No newline at end of file diff --git a/StoneIsland/platforms/android/assets/www/js/lib/blogs/PageView.js b/StoneIsland/platforms/android/assets/www/js/lib/blogs/PageView.js index 4bf05430..c399a2a9 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/blogs/PageView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/blogs/PageView.js @@ -1,6 +1,7 @@ var PageView = ScrollableView.extend({ events: { + "touchstart a": "follow_link" }, initialize: function(opt){ @@ -19,6 +20,19 @@ var PageView = ScrollableView.extend({ populate: function(data){ this.$content.html(data.body.replace(/\n/g, "<br>")) + this.$content.find("a").each(function(){ + var href = $(this).attr("href") // .substr(1, "fuck".length-2) + if (href.indexOf("“")) { + href = href.substr(1, href.length-2) + $(this).attr("href", href) + } + $(this).attr("target", "_system") + }) + }, + + follow_link: function(e){ + var href = $(e.currentTarget).attr("href") + window.open(row.link, '_system') }, })
\ No newline at end of file diff --git a/StoneIsland/platforms/android/assets/www/js/lib/etc/deeplink.js b/StoneIsland/platforms/android/assets/www/js/lib/etc/deeplink.js index 648dd167..0522fbc5 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/etc/deeplink.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/etc/deeplink.js @@ -1,3 +1,4 @@ function handleOpenURL (url) { - app.router.initial_route = url + console.log("DEEP LINKING DETECTED", url) + this.parseRoute( url ) }
\ No newline at end of file diff --git a/StoneIsland/platforms/android/assets/www/js/lib/etc/push.js b/StoneIsland/platforms/android/assets/www/js/lib/etc/push.js index 4e771b62..5585ba71 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/etc/push.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/etc/push.js @@ -17,7 +17,7 @@ var push = (function(){ push.settings.store = localStorage.getItem("yoox.push_store") == "true" if ( ! push.settings.requested ) { - localStorage.setItem("yoox.push_" + channel, "true") + localStorage.setItem("yoox.push_requested", "true") push.subscribe("hub", function(){ push.subscribe("store") }) diff --git a/StoneIsland/platforms/android/assets/www/js/lib/nav/NavView.js b/StoneIsland/platforms/android/assets/www/js/lib/nav/NavView.js index 71314559..1c12e7a1 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/nav/NavView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/nav/NavView.js @@ -155,6 +155,7 @@ var NavView = View.extend({ window.open("https://twitter.com/stoneisland", '_system') }, yt: function(){ + console.log("youtube") window.open("https://www.youtube.com/user/StoneIslandOfficial", '_system') }, diff --git a/StoneIsland/platforms/android/assets/www/js/lib/products/CollectionView.js b/StoneIsland/platforms/android/assets/www/js/lib/products/CollectionView.js index 798920d1..53e99390 100755 --- a/StoneIsland/platforms/android/assets/www/js/lib/products/CollectionView.js +++ b/StoneIsland/platforms/android/assets/www/js/lib/products/CollectionView.js @@ -26,8 +26,9 @@ var CollectionView = ScrollableView.extend({ show: function(){ if (app.closed.storeIsClosed) { - // (! this.storeOpenDate || moment().diff(this.storeOpenDate) > 0 ) ) { - return app.closed.show() + if (! app.closed.storeOpenDate || app.closed.storeOpenDate.diff() > 0) { + return app.closed.show() + } } app.footer.show("FILTER") document.body.className = "collection" @@ -35,7 +36,9 @@ var CollectionView = ScrollableView.extend({ console.log("collection this loaded") return this.populate(this.data) } - // this.fetch() + else { + this.fetch() + } }, save: function(){ @@ -49,11 +52,17 @@ var CollectionView = ScrollableView.extend({ return } this.$loader.show() - sdk.product.all({ + console.log("fetching", app.gallery_id) + sdk.product.collection({ gallery_id: app.gallery_id, success: this.populate.bind(this) }) }, + + refresh: function(){ + this.loaded = false + this.fetch() + }, populate: function(data){ if (this.loaded && ! data) { diff --git a/StoneIsland/platforms/android/res/xml/config.xml b/StoneIsland/platforms/android/res/xml/config.xml index 1d29a8b0..0f3242dc 100755 --- a/StoneIsland/platforms/android/res/xml/config.xml +++ b/StoneIsland/platforms/android/res/xml/config.xml @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='utf-8'?> -<widget id="us.okfoc.stoneisland" version="0.3.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> +<widget id="us.okfoc.stoneisland" version="0.3.6" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <preference name="loglevel" value="DEBUG" /> <feature name="Keyboard"> <param name="android-package" value="com.ionic.keyboard.IonicKeyboard" /> 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 Binary files differindex 21a3555f..05a1b3f3 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 diff --git a/StoneIsland/platforms/ios/www/js/lib/etc/deeplink.js b/StoneIsland/platforms/ios/www/js/lib/etc/deeplink.js index 648dd167..7667cfcd 100755 --- a/StoneIsland/platforms/ios/www/js/lib/etc/deeplink.js +++ b/StoneIsland/platforms/ios/www/js/lib/etc/deeplink.js @@ -1,3 +1,5 @@ function handleOpenURL (url) { - app.router.initial_route = url + console.log("DEEP LINKING DETECTED", url) + url = url.replace("stoneisland:/", "") + app.router.parseRoute( url ) }
\ No newline at end of file diff --git a/StoneIsland/plugins/cordova-plugin-customurlscheme/LaunchMyApp-PhoneGap-Plugin.iws b/StoneIsland/plugins/cordova-plugin-customurlscheme/LaunchMyApp-PhoneGap-Plugin.iws index 9879f7f4..9879f7f4 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-customurlscheme/LaunchMyApp-PhoneGap-Plugin.iws +++ b/StoneIsland/plugins/cordova-plugin-customurlscheme/LaunchMyApp-PhoneGap-Plugin.iws diff --git a/StoneIsland/plugins/cordova-plugin-customurlscheme/README.md b/StoneIsland/plugins/cordova-plugin-customurlscheme/README.md index 2de829c2..2de829c2 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-customurlscheme/README.md +++ b/StoneIsland/plugins/cordova-plugin-customurlscheme/README.md diff --git a/StoneIsland/plugins/cordova-plugin-customurlscheme/atlassian-ide-plugin.xml b/StoneIsland/plugins/cordova-plugin-customurlscheme/atlassian-ide-plugin.xml index 858eed55..858eed55 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-customurlscheme/atlassian-ide-plugin.xml +++ b/StoneIsland/plugins/cordova-plugin-customurlscheme/atlassian-ide-plugin.xml diff --git a/StoneIsland/plugins/cordova-plugin-customurlscheme/package.json b/StoneIsland/plugins/cordova-plugin-customurlscheme/package.json index de90c8e2..de90c8e2 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-customurlscheme/package.json +++ b/StoneIsland/plugins/cordova-plugin-customurlscheme/package.json diff --git a/StoneIsland/plugins/cordova-plugin-customurlscheme/src/android/nl/xservices/plugins/LaunchMyApp.java b/StoneIsland/plugins/cordova-plugin-customurlscheme/src/android/nl/xservices/plugins/LaunchMyApp.java index 9d3f3d63..9d3f3d63 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-customurlscheme/src/android/nl/xservices/plugins/LaunchMyApp.java +++ b/StoneIsland/plugins/cordova-plugin-customurlscheme/src/android/nl/xservices/plugins/LaunchMyApp.java diff --git a/StoneIsland/plugins/cordova-plugin-customurlscheme/www/android/LaunchMyApp.js b/StoneIsland/plugins/cordova-plugin-customurlscheme/www/android/LaunchMyApp.js index 19dbdc0b..19dbdc0b 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-customurlscheme/www/android/LaunchMyApp.js +++ b/StoneIsland/plugins/cordova-plugin-customurlscheme/www/android/LaunchMyApp.js diff --git a/StoneIsland/plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js b/StoneIsland/plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js index a1d60818..a1d60818 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js +++ b/StoneIsland/plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js diff --git a/StoneIsland/plugins/cordova-plugin-customurlscheme/www/windows/LaunchMyApp.js b/StoneIsland/plugins/cordova-plugin-customurlscheme/www/windows/LaunchMyApp.js index a70d5e94..a70d5e94 100755..100644 --- a/StoneIsland/plugins/cordova-plugin-customurlscheme/www/windows/LaunchMyApp.js +++ b/StoneIsland/plugins/cordova-plugin-customurlscheme/www/windows/LaunchMyApp.js diff --git a/StoneIsland/www/js/lib/etc/deeplink.js b/StoneIsland/www/js/lib/etc/deeplink.js index 648dd167..7667cfcd 100755 --- a/StoneIsland/www/js/lib/etc/deeplink.js +++ b/StoneIsland/www/js/lib/etc/deeplink.js @@ -1,3 +1,5 @@ function handleOpenURL (url) { - app.router.initial_route = url + console.log("DEEP LINKING DETECTED", url) + url = url.replace("stoneisland:/", "") + app.router.parseRoute( url ) }
\ No newline at end of file |
