From 58eb0a78f6c0e717278a2ac2e00ef2afa2cbea2b Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 3 Oct 2018 03:08:25 +0200 Subject: do everything we can to force lockout --- StoneIsland/www/js/lib/account/ConsentModal.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (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 dfeb4fac..c9235498 100644 --- a/StoneIsland/www/js/lib/account/ConsentModal.js +++ b/StoneIsland/www/js/lib/account/ConsentModal.js @@ -18,11 +18,14 @@ var ConsentModal = View.extend({ check: function(){ var status = localStorage.getItem('account_terms.consent') + console.log('account_terms.consent', status) if (status !== 'true') { + console.log('we demand consent!') app.demand_consent = true this.show() return true } else { + console.log('already received consent!') this.hide() app.demand_consent = false return false @@ -35,8 +38,10 @@ var ConsentModal = View.extend({ setTimeout(function(){ this.$el.addClass('visible') }.bind(this), 20) - app.curtain.show() - app.curtain.classList.add('opaque') + app.curtain.show('opaque') + setTimeout(function(){ + app.curtain.show('opaque') + }, 300) }, hide: function(){ @@ -44,7 +49,7 @@ var ConsentModal = View.extend({ this.$el.removeClass('visible') setTimeout(function(){ this.$el.hide() - app.curtain.classList.remove('opaque') + app.curtain.$el.removeClass('opaque') }.bind(this), 300) }, -- cgit v1.2.3-70-g09d2