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/www/js/lib/account/ConsentModal.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'StoneIsland/www/js/lib/account/ConsentModal.js') diff --git a/StoneIsland/www/js/lib/account/ConsentModal.js b/StoneIsland/www/js/lib/account/ConsentModal.js index c4fe0b53..22f63c53 100644 --- a/StoneIsland/www/js/lib/account/ConsentModal.js +++ b/StoneIsland/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