From 590a9772063bd0774c6ad4c099447472294deecd Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 15 Aug 2018 12:58:05 +0200 Subject: consent modal stuff --- StoneIsland/platforms/ios/www/css/account.css | 15 ++++---- StoneIsland/platforms/ios/www/index.html | 41 ++++++++++++++-------- StoneIsland/platforms/ios/www/js/lib/_router.js | 15 ++++---- .../ios/www/js/lib/account/ConsentModal.js | 6 ++++ 4 files changed, 51 insertions(+), 26 deletions(-) (limited to 'StoneIsland/platforms/ios/www') diff --git a/StoneIsland/platforms/ios/www/css/account.css b/StoneIsland/platforms/ios/www/css/account.css index 973f3d2c..32c7df79 100755 --- a/StoneIsland/platforms/ios/www/css/account.css +++ b/StoneIsland/platforms/ios/www/css/account.css @@ -442,12 +442,15 @@ input.switch:checked + label:after { } .privacy-msg { - left: 50%; - display: inline-block; - position: relative; - transform: translateX(-50%); - padding-top: 15px; - padding-bottom: 80px; + left: 50%; + display: inline-block; + position: relative; + transform: translateX(-50%); + padding-top: 15px; + padding-bottom: 80px; +} +.privacy-msg a { + color: black; } .select-wrapper { diff --git a/StoneIsland/platforms/ios/www/index.html b/StoneIsland/platforms/ios/www/index.html index 8837b9a3..e8816830 100755 --- a/StoneIsland/platforms/ios/www/index.html +++ b/StoneIsland/platforms/ios/www/index.html @@ -67,7 +67,7 @@ @@ -77,7 +77,7 @@ MAIN MENU
- + LOGOUT MAIN MENU @@ -429,7 +429,7 @@
@@ -438,23 +438,25 @@
- +
- Consult our PRIVACY POLICY for further information. + Personal data will be electronically processed by SPORTSWEAR COMPANY and YOOX NET-A-PORTER GROUP in order to complete your request. Please note that you are responsible for third party data that you disclose to SPORTSWEAR COMPANY and YOOX NET-A-PORTER GROUP. +
+ Consult our PRIVACY POLICY for further information.
@@ -465,7 +467,7 @@
-

PROFILE

+

MY PROFILE

@@ -500,15 +502,26 @@
- + + +
+ +
+
+
+
- Consult our PRIVACY POLICY for further information. + Personal data will be electronically processed by SPORTSWEAR COMPANY and YOOX NET-A-PORTER GROUP in order to complete your request. Please note that you are responsible for third party data that you disclose to SPORTSWEAR COMPANY and YOOX NET-A-PORTER GROUP. +
+ Consult our PRIVACY POLICY for further information.
@@ -521,7 +534,7 @@
-

SHIPPING

+

ADDRESS BOOK

@@ -545,7 +558,7 @@
-

PAYMENT

+

MY CARD

@@ -600,7 +613,7 @@
-

ORDERS

+

MY ORDERS

You have no orders.
diff --git a/StoneIsland/platforms/ios/www/js/lib/_router.js b/StoneIsland/platforms/ios/www/js/lib/_router.js index 723bb944..bd13c126 100755 --- a/StoneIsland/platforms/ios/www/js/lib/_router.js +++ b/StoneIsland/platforms/ios/www/js/lib/_router.js @@ -42,12 +42,12 @@ var SiteRouter = Router.extend({ initialize: function(){ var fn - for (var route in this.routes) { - fn = this.routes[route] - if (! this[fn]) { - this[fn] = this.default_view(fn) - } - } + for (var route in this.routes) { + fn = this.routes[route] + if (! this[fn]) { + this[fn] = this.default_view(fn) + } + } }, initial_route: null, @@ -75,6 +75,9 @@ var SiteRouter = Router.extend({ default_view: function(name){ var fn = function(){ console.log(name) + if (app.demand_consent && app.consent.check()) { + return + } if (app.view != app.login && app.view != app.signin) { app.last_view = app.view } diff --git a/StoneIsland/platforms/ios/www/js/lib/account/ConsentModal.js b/StoneIsland/platforms/ios/www/js/lib/account/ConsentModal.js index c4fe0b53..22f63c53 100644 --- a/StoneIsland/platforms/ios/www/js/lib/account/ConsentModal.js +++ b/StoneIsland/platforms/ios/www/js/lib/account/ConsentModal.js @@ -19,12 +19,16 @@ var ConsentModal = View.extend({ var status = localStorage.getItem('account_terms.consent') if (status !== 'true') { this.show() + return true } else { this.hide() + app.demand_consent = false + return false } }, show: function(){ + app.demand_consent = true this.$el.show() setTimeout(function(){ this.$el.addClass('visible') @@ -63,11 +67,13 @@ var ConsentModal = View.extend({ if (!state) { return } + app.demand_consent = false this.hide() localStorage.setItem('account_terms.consent', 'true') }, logout: function(){ + app.demand_consent = false this.hide() localStorage.setItem('account_terms.consent', 'false') app.router.go("account/logout") -- cgit v1.2.3-70-g09d2