From d4bffaddf0a8f065d3ff99a55206d362c5530444 Mon Sep 17 00:00:00 2001 From: Tomasz Rutkowski Date: Tue, 3 Dec 2019 18:24:45 +0100 Subject: [PATCH] ISAICP-5624: Fix double scrollbar on IE --- web/themes/joinup/joinup_theme.info.yml | 2 ++ web/themes/joinup/joinup_theme.libraries.yml | 7 +++++++ web/themes/joinup/js/cookie-extend.js | 13 +++++++++++++ web/themes/joinup/prototype/sass/_mdl-hacks.sass | 3 +++ 4 files changed, 25 insertions(+) create mode 100644 web/themes/joinup/js/cookie-extend.js diff --git a/web/themes/joinup/joinup_theme.info.yml b/web/themes/joinup/joinup_theme.info.yml index 0ac761aaa6..c34430af16 100644 --- a/web/themes/joinup/joinup_theme.info.yml +++ b/web/themes/joinup/joinup_theme.info.yml @@ -11,6 +11,8 @@ libraries: libraries-extend: core/drupal.tableselect: - joinup_theme/tableselect + oe_webtools_cookie_consent/oe_webtools_cookie_consent.cck: + - joinup_theme/cookie-extend stylesheets-remove: - core/themes/stable/css/core/vertical-tabs.css diff --git a/web/themes/joinup/joinup_theme.libraries.yml b/web/themes/joinup/joinup_theme.libraries.yml index f8a0a87e8d..ae3e46c79a 100644 --- a/web/themes/joinup/joinup_theme.libraries.yml +++ b/web/themes/joinup/joinup_theme.libraries.yml @@ -49,3 +49,10 @@ shared_entity: - core/jquery - core/jquery.once - core/drupal + +cookie-extend: + version: VERSION + js: + js/cookie-extend.js: {} + dependencies: + - core/jquery diff --git a/web/themes/joinup/js/cookie-extend.js b/web/themes/joinup/js/cookie-extend.js new file mode 100644 index 0000000000..60f75c4af6 --- /dev/null +++ b/web/themes/joinup/js/cookie-extend.js @@ -0,0 +1,13 @@ +/** + * @file + * Cookie banner extended script. + */ + +(function ($) { + // Add custom class if page has cookie banner. + $(window).bind("load", function() { + if (window.bannerDisplayed) { + $('body').addClass('has-cookie-consent-banner'); + } + }); +})(jQuery); \ No newline at end of file diff --git a/web/themes/joinup/prototype/sass/_mdl-hacks.sass b/web/themes/joinup/prototype/sass/_mdl-hacks.sass index 7b5386c072..a000f5d687 100644 --- a/web/themes/joinup/prototype/sass/_mdl-hacks.sass +++ b/web/themes/joinup/prototype/sass/_mdl-hacks.sass @@ -76,6 +76,9 @@ .section--content flex-grow: 1 flex-shrink: 0 + body.has-cookie-consent-banner + .mdl-layout__container + height: auto .filters .mdl-menu__container