Skip to content
Snippets Groups Projects
Commit ca78b5ab authored by Ken Hawkins's avatar Ken Hawkins
Browse files

Properly invoke DP panner #137

parent afa92cf4
No related branches found
No related tags found
No related merge requests found
...@@ -75,9 +75,12 @@ var dataProtectionSettings = new Object(); ...@@ -75,9 +75,12 @@ var dataProtectionSettings = new Object();
* @param {string} [targetedFrameworkVersion=generic] targeted Framework version; options: 1.1, 1.2, 1.3, compliance * @param {string} [targetedFrameworkVersion=generic] targeted Framework version; options: 1.1, 1.2, 1.3, compliance
*/ */
function ebiFrameworkRunDataProtectionBanner(targetedFrameworkVersion) { function ebiFrameworkRunDataProtectionBanner(targetedFrameworkVersion) {
targetedFrameworkVersion = targetedFrameworkVersion || newDataProtectionNotificationBanner.src.split('legacyRequest=')[1] || 'generic';
try { try {
if (typeof newDataProtectionNotificationBanner !== "undefined") {
targetedFrameworkVersion = targetedFrameworkVersion || newDataProtectionNotificationBanner.src.split('legacyRequest=')[1] || 'generic';
}
// remove any old style cookie banner // remove any old style cookie banner
switch (targetedFrameworkVersion) { switch (targetedFrameworkVersion) {
case '1.1': case '1.1':
...@@ -94,7 +97,7 @@ function ebiFrameworkRunDataProtectionBanner(targetedFrameworkVersion) { ...@@ -94,7 +97,7 @@ function ebiFrameworkRunDataProtectionBanner(targetedFrameworkVersion) {
document.body.style.paddingTop = 0; document.body.style.paddingTop = 0;
break; break;
default: default:
console.warn('You should specify the targetedFrameworkVersion'); console.warn('You should specify the targeted FrameworkVersion');
} }
...@@ -139,4 +142,4 @@ function ebiFrameworkCookieBanner() { ...@@ -139,4 +142,4 @@ function ebiFrameworkCookieBanner() {
} }
// execute // execute
ebiFrameworkRunDataProtectionBanner('1.3'); // ebiFrameworkRunDataProtectionBanner('1.3');
...@@ -16,7 +16,7 @@ function ebiFrameworkInvokeScripts() { ...@@ -16,7 +16,7 @@ function ebiFrameworkInvokeScripts() {
ebiFrameworkUpdateFoot(); ebiFrameworkUpdateFoot();
ebiFrameworkUpdateFooterMeta(); ebiFrameworkUpdateFooterMeta();
ebiFrameworkIncludeAnnouncements(); ebiFrameworkIncludeAnnouncements();
ebiFrameworkRunDataProtectionBanner(); ebiFrameworkRunDataProtectionBanner('1.3');
} }
document.addEventListener("DOMContentLoaded", function(event) { document.addEventListener("DOMContentLoaded", function(event) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment