add body class when cookie consent warning is open

This commit is contained in:
Andrew Rodrigues
2018-10-23 17:23:21 -04:00
parent 82cda248f3
commit e2ecbae06c

View File

@@ -692,6 +692,7 @@ app.cacheBuster = null;
app.parseAndTranslate('partials/cookie-consent', config.cookies, function (html) {
$(document.body).append(html);
$(document.body).addClass('cookie-consent-open');
var warningEl = $('.cookie-consent');
var dismissEl = warningEl.find('button');
@@ -699,6 +700,7 @@ app.cacheBuster = null;
// Save consent cookie and remove warning element
storage.setItem('cookieconsent', '1');
warningEl.remove();
$(document.body).removeClass('cookie-consent-open');
});
});
});