summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xStoneIsland/config.xml2
-rw-r--r--StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstatebin26741 -> 26788 bytes
-rw-r--r--StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist4
-rwxr-xr-xStoneIsland/platforms/ios/Stone Island/config.xml2
-rwxr-xr-xStoneIsland/platforms/ios/www/css/nav.css9
-rwxr-xr-xStoneIsland/platforms/ios/www/index.html4
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/_router.js23
-rw-r--r--StoneIsland/platforms/ios/www/js/lib/account/ConsentModal.js13
-rwxr-xr-xStoneIsland/platforms/ios/www/js/lib/auth/LogoutView.js2
-rwxr-xr-xStoneIsland/www/css/nav.css9
-rwxr-xr-xStoneIsland/www/index.html4
-rwxr-xr-xStoneIsland/www/js/lib/_router.js23
-rw-r--r--StoneIsland/www/js/lib/account/ConsentModal.js13
-rwxr-xr-xStoneIsland/www/js/lib/auth/LogoutView.js2
14 files changed, 80 insertions, 30 deletions
diff --git a/StoneIsland/config.xml b/StoneIsland/config.xml
index de7094c3..293c2416 100755
--- a/StoneIsland/config.xml
+++ b/StoneIsland/config.xml
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
-<widget android-versionCode="6105" id="us.okfoc.stoneisland" version="1.0.5" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+<widget android-versionCode="6106" id="us.okfoc.stoneisland" version="1.0.6" 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.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate b/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate
index 863ea504..21f93f3d 100644
--- a/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate
+++ b/StoneIsland/platforms/ios/Stone Island.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 61399d17..578dfe3e 100644
--- a/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist
+++ b/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist
@@ -21,11 +21,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>1.0.5</string>
+ <string>1.0.6</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.0.5</string>
+ <string>1.0.6</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
diff --git a/StoneIsland/platforms/ios/Stone Island/config.xml b/StoneIsland/platforms/ios/Stone Island/config.xml
index 4d2f9418..3b86f48b 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 android-versionCode="6105" id="us.okfoc.stoneisland" version="1.0.5" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+<widget android-versionCode="6106" id="us.okfoc.stoneisland" version="1.0.6" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<feature name="LocalStorage">
<param name="ios-package" value="CDVLocalStorage" />
</feature>
diff --git a/StoneIsland/platforms/ios/www/css/nav.css b/StoneIsland/platforms/ios/www/css/nav.css
index 77bc5487..b7002f20 100755
--- a/StoneIsland/platforms/ios/www/css/nav.css
+++ b/StoneIsland/platforms/ios/www/css/nav.css
@@ -368,7 +368,14 @@ padding-bottom:0px;
color: white;
border-color: black;
}
-
+#consent_error {
+ opacity: 0;
+ color: red;
+ transition: 0.3s all;
+}
+#consent_error.visible {
+ opacity: 1;
+}
/* SELECTOR */
#selector {
diff --git a/StoneIsland/platforms/ios/www/index.html b/StoneIsland/platforms/ios/www/index.html
index e8816830..bdad67c8 100755
--- a/StoneIsland/platforms/ios/www/index.html
+++ b/StoneIsland/platforms/ios/www/index.html
@@ -1027,14 +1027,14 @@
</label>
</div>
</div>
- <div id="consent_error">Please note that if you do not consent to terms, you cannot use the app.</div>
- <br><br>
For more information, please consult our
<a href="#/page/privacy">Privacy Policy</a> or visit
<a href="#" id="care-link">Customer Care</a>.
<br><br>
To continue to My Account we invite you to click accept. Otherwise you can continue to navigate as an unregistered user.
<br><br>
+ <div id="consent_error">Please note that if you do not consent to terms, you cannot use the app.</div>
+ <br><br>
<button id="consent_proceed">PROCEED</button>
<button id="consent_logout">LOG OUT</button>
</div>
diff --git a/StoneIsland/platforms/ios/www/js/lib/_router.js b/StoneIsland/platforms/ios/www/js/lib/_router.js
index bd13c126..91f29b55 100755
--- a/StoneIsland/platforms/ios/www/js/lib/_router.js
+++ b/StoneIsland/platforms/ios/www/js/lib/_router.js
@@ -39,7 +39,9 @@ var SiteRouter = Router.extend({
'/cart/thanks': 'cart.thanks',
'/cart/error': 'cart.error',
},
-
+
+ terms_routes: ['terms','account_terms','privacy','returns','care','logout'],
+
initialize: function(){
var fn
for (var route in this.routes) {
@@ -75,9 +77,7 @@ var SiteRouter = Router.extend({
default_view: function(name){
var fn = function(){
console.log(name)
- if (app.demand_consent && app.consent.check()) {
- return
- }
+ var n = [name]
if (app.view != app.login && app.view != app.signin) {
app.last_view = app.view
}
@@ -85,7 +85,7 @@ var SiteRouter = Router.extend({
app.view.hide()
}
if (name.match(/\./)) {
- var n = name.split(".")
+ n = name.split(".")
console.log(name, n)
app.view = app[n[0]][n[1]]
}
@@ -97,6 +97,19 @@ var SiteRouter = Router.extend({
console.log("view >>", app.view)
app.header.set_back( !! app.view.back )
app.view.show()
+
+ // var isTermsRoute = this.terms_routes.indexOf(name) !== -1
+ // var isCartRoute = n[0] === 'cart'
+ // if ( (isCartRoute || app.demand_consent && !isTermsRoute) && app.account.consent.check()) {
+ // console.log('showed consent modal')
+ // return
+ // }
+
+ var isTermsRoute = this.terms_routes.indexOf(name) !== -1
+ if (app.demand_consent && !isTermsRoute && app.account.consent.check()) {
+ console.log('showed consent modal')
+ return
+ }
}.bind(this)
return fn
},
diff --git a/StoneIsland/platforms/ios/www/js/lib/account/ConsentModal.js b/StoneIsland/platforms/ios/www/js/lib/account/ConsentModal.js
index 22f63c53..dfeb4fac 100644
--- a/StoneIsland/platforms/ios/www/js/lib/account/ConsentModal.js
+++ b/StoneIsland/platforms/ios/www/js/lib/account/ConsentModal.js
@@ -13,11 +13,13 @@ var ConsentModal = View.extend({
this.$form = this.$(".form")
this.$msg = this.$(".msg")
this.$checkbox = this.$("[name=AccountTermsConsent]")
+ this.$consentError = this.$("#consent_error")
},
check: function(){
var status = localStorage.getItem('account_terms.consent')
if (status !== 'true') {
+ app.demand_consent = true
this.show()
return true
} else {
@@ -55,16 +57,17 @@ var ConsentModal = View.extend({
changeConsent: function(){
var state = this.$checkbox.prop("checked")
- // if (state) {
- // this.$el.addClass('consent-yes').removeClass('consent-no')
- // } else {
- // this.$el.addClass('consent-no').removeClass('consent-yes')
- // }
+ if (state) {
+ this.$consentError.removeClass('visible')
+ } else {
+ this.$consentError.addClass('visible')
+ }
},
proceed: function(){
var state = this.$checkbox.prop("checked")
if (!state) {
+ this.$consentError.addClass('visible')
return
}
app.demand_consent = false
diff --git a/StoneIsland/platforms/ios/www/js/lib/auth/LogoutView.js b/StoneIsland/platforms/ios/www/js/lib/auth/LogoutView.js
index 481dcb8d..89091473 100755
--- a/StoneIsland/platforms/ios/www/js/lib/auth/LogoutView.js
+++ b/StoneIsland/platforms/ios/www/js/lib/auth/LogoutView.js
@@ -10,6 +10,8 @@ var LogoutView = View.extend({
app.header.set_cart_count(0)
app.footer.hide()
auth.log_out()
+ app.demand_consent = false
+ app.account.consent.hide()
app.account.logged_out()
},
diff --git a/StoneIsland/www/css/nav.css b/StoneIsland/www/css/nav.css
index 77bc5487..b7002f20 100755
--- a/StoneIsland/www/css/nav.css
+++ b/StoneIsland/www/css/nav.css
@@ -368,7 +368,14 @@ padding-bottom:0px;
color: white;
border-color: black;
}
-
+#consent_error {
+ opacity: 0;
+ color: red;
+ transition: 0.3s all;
+}
+#consent_error.visible {
+ opacity: 1;
+}
/* SELECTOR */
#selector {
diff --git a/StoneIsland/www/index.html b/StoneIsland/www/index.html
index e8816830..bdad67c8 100755
--- a/StoneIsland/www/index.html
+++ b/StoneIsland/www/index.html
@@ -1027,14 +1027,14 @@
</label>
</div>
</div>
- <div id="consent_error">Please note that if you do not consent to terms, you cannot use the app.</div>
- <br><br>
For more information, please consult our
<a href="#/page/privacy">Privacy Policy</a> or visit
<a href="#" id="care-link">Customer Care</a>.
<br><br>
To continue to My Account we invite you to click accept. Otherwise you can continue to navigate as an unregistered user.
<br><br>
+ <div id="consent_error">Please note that if you do not consent to terms, you cannot use the app.</div>
+ <br><br>
<button id="consent_proceed">PROCEED</button>
<button id="consent_logout">LOG OUT</button>
</div>
diff --git a/StoneIsland/www/js/lib/_router.js b/StoneIsland/www/js/lib/_router.js
index 1d9010ff..91f29b55 100755
--- a/StoneIsland/www/js/lib/_router.js
+++ b/StoneIsland/www/js/lib/_router.js
@@ -39,7 +39,9 @@ var SiteRouter = Router.extend({
'/cart/thanks': 'cart.thanks',
'/cart/error': 'cart.error',
},
-
+
+ terms_routes: ['terms','account_terms','privacy','returns','care','logout'],
+
initialize: function(){
var fn
for (var route in this.routes) {
@@ -75,9 +77,7 @@ var SiteRouter = Router.extend({
default_view: function(name){
var fn = function(){
console.log(name)
- if (app.demand_consent && app.account.consent.check()) {
- return
- }
+ var n = [name]
if (app.view != app.login && app.view != app.signin) {
app.last_view = app.view
}
@@ -85,7 +85,7 @@ var SiteRouter = Router.extend({
app.view.hide()
}
if (name.match(/\./)) {
- var n = name.split(".")
+ n = name.split(".")
console.log(name, n)
app.view = app[n[0]][n[1]]
}
@@ -97,6 +97,19 @@ var SiteRouter = Router.extend({
console.log("view >>", app.view)
app.header.set_back( !! app.view.back )
app.view.show()
+
+ // var isTermsRoute = this.terms_routes.indexOf(name) !== -1
+ // var isCartRoute = n[0] === 'cart'
+ // if ( (isCartRoute || app.demand_consent && !isTermsRoute) && app.account.consent.check()) {
+ // console.log('showed consent modal')
+ // return
+ // }
+
+ var isTermsRoute = this.terms_routes.indexOf(name) !== -1
+ if (app.demand_consent && !isTermsRoute && app.account.consent.check()) {
+ console.log('showed consent modal')
+ return
+ }
}.bind(this)
return fn
},
diff --git a/StoneIsland/www/js/lib/account/ConsentModal.js b/StoneIsland/www/js/lib/account/ConsentModal.js
index 22f63c53..dfeb4fac 100644
--- a/StoneIsland/www/js/lib/account/ConsentModal.js
+++ b/StoneIsland/www/js/lib/account/ConsentModal.js
@@ -13,11 +13,13 @@ var ConsentModal = View.extend({
this.$form = this.$(".form")
this.$msg = this.$(".msg")
this.$checkbox = this.$("[name=AccountTermsConsent]")
+ this.$consentError = this.$("#consent_error")
},
check: function(){
var status = localStorage.getItem('account_terms.consent')
if (status !== 'true') {
+ app.demand_consent = true
this.show()
return true
} else {
@@ -55,16 +57,17 @@ var ConsentModal = View.extend({
changeConsent: function(){
var state = this.$checkbox.prop("checked")
- // if (state) {
- // this.$el.addClass('consent-yes').removeClass('consent-no')
- // } else {
- // this.$el.addClass('consent-no').removeClass('consent-yes')
- // }
+ if (state) {
+ this.$consentError.removeClass('visible')
+ } else {
+ this.$consentError.addClass('visible')
+ }
},
proceed: function(){
var state = this.$checkbox.prop("checked")
if (!state) {
+ this.$consentError.addClass('visible')
return
}
app.demand_consent = false
diff --git a/StoneIsland/www/js/lib/auth/LogoutView.js b/StoneIsland/www/js/lib/auth/LogoutView.js
index 481dcb8d..89091473 100755
--- a/StoneIsland/www/js/lib/auth/LogoutView.js
+++ b/StoneIsland/www/js/lib/auth/LogoutView.js
@@ -10,6 +10,8 @@ var LogoutView = View.extend({
app.header.set_cart_count(0)
app.footer.hide()
auth.log_out()
+ app.demand_consent = false
+ app.account.consent.hide()
app.account.logged_out()
},