diff --git a/Gemfile.lock b/Gemfile.lock index e1577b4037a0..e8f6d48e3ece 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -173,8 +173,6 @@ GEM execjs coffee-script-source (1.12.2) concurrent-ruby (1.2.2) - cookies_eu (1.7.8) - js_cookie_rails (~> 2.2.0) crass (1.0.6) daemons (1.4.1) dalli (3.2.6) @@ -295,8 +293,6 @@ GEM actionpack (>= 3.1) railties (>= 3.1) sassc - js_cookie_rails (2.2.0) - railties (>= 3.1) json (2.6.3) jwt (2.7.1) kaminari (1.2.2) @@ -715,7 +711,6 @@ DEPENDENCIES caxlsx_rails (~> 0.6.3) ckeditor (~> 4.3.0) cocoon (~> 1.2.15) - cookies_eu daemons (~> 1.4.1) dalli (~> 3.2.6) delayed_job_active_record (~> 4.1.7) diff --git a/Gemfile_custom b/Gemfile_custom index 0e5dabf8e687..86bc60cd38ed 100644 --- a/Gemfile_custom +++ b/Gemfile_custom @@ -26,5 +26,4 @@ # Add your custom gem dependencies here gem "ruby-ntlm" -gem "cookies_eu" gem "capistrano-systemd-multiservice", "~> 0.1.0.beta13", require: false diff --git a/app/assets/javascripts/custom.js b/app/assets/javascripts/custom.js index 88ae5c9a4686..1e4c97167dce 100644 --- a/app/assets/javascripts/custom.js +++ b/app/assets/javascripts/custom.js @@ -4,13 +4,11 @@ // * Spanish: https://github.com/consuldemocracy/consuldemocracy/blob/master/CUSTOMIZE_ES.md#javascript // // -//= require cookies_eu var initialize_modules = function() { "use strict"; App.GoogleSearch.initialize(); - App.ConsentBanner.initialize(); }; $(document).on("turbolinks:load", initialize_modules); diff --git a/app/assets/javascripts/custom/consent_banner.js b/app/assets/javascripts/custom/consent_banner.js deleted file mode 100644 index 53e166e3f6b6..000000000000 --- a/app/assets/javascripts/custom/consent_banner.js +++ /dev/null @@ -1,28 +0,0 @@ -(function() { - "use strict"; - App.ConsentBanner = { - trackConsent: function(google_tag_manager_id) { - document.addEventListener("cookies-eu-acknowledged", function() { - $.ajax({ - url: "https://www.googletagmanager.com/gtag/js?id=" + google_tag_manager_id, - dataType: "script", - success: function() { - window.dataLayer = window.dataLayer || []; - function gtag() { - window.dataLayer.push(arguments); - } - gtag("js", new Date()); - gtag("consent", { "analytics_storage": "allowed" }); - gtag("config", google_tag_manager_id); - } - }); - }); - }, - initialize: function() { - var google_tag_manager_id = $(".cookies-eu").data("google-tag-manager-id"); - if (google_tag_manager_id) { - App.ConsentBanner.trackConsent(google_tag_manager_id); - } - } - }; -}).call(this); diff --git a/app/assets/stylesheets/custom.scss b/app/assets/stylesheets/custom.scss index 5208717cd822..584069f4c10f 100644 --- a/app/assets/stylesheets/custom.scss +++ b/app/assets/stylesheets/custom.scss @@ -1,6 +1,5 @@ // Override and add customized styles in this file. // -@import "cookies_eu"; @import "font-awesome/icons"; // Registration and user account page @@ -334,11 +333,6 @@ } } -// COOKIES BANNER -.cookies-eu-ok { - background-color: $secondary !important; -} - // PAGES .page-title { border-bottom: 4px solid $secondary; diff --git a/app/components/custom/layout/consent_banner_component.html.erb b/app/components/custom/layout/consent_banner_component.html.erb deleted file mode 100644 index a0b14547fea2..000000000000 --- a/app/components/custom/layout/consent_banner_component.html.erb +++ /dev/null @@ -1,18 +0,0 @@ -<% if cookies.kind_of? ActionDispatch::Cookies::CookieJar %> - <% if cookies && cookies["cookie_eu_consented"] != "true" %> -
- <% end %> -<% else %> - <% raise Exception.new "'cookies' is a reserved Rails class, please rename your method" %> -<% end %> diff --git a/app/components/custom/layout/consent_banner_component.rb b/app/components/custom/layout/consent_banner_component.rb deleted file mode 100644 index ff7b3abf85c3..000000000000 --- a/app/components/custom/layout/consent_banner_component.rb +++ /dev/null @@ -1,3 +0,0 @@ -class Layout::ConsentBannerComponent < ApplicationComponent - delegate :cookies, to: :helpers -end diff --git a/app/views/custom/layouts/application.html.erb b/app/views/custom/layouts/application.html.erb index 0a562d43dc97..1a2aa0256757 100644 --- a/app/views/custom/layouts/application.html.erb +++ b/app/views/custom/layouts/application.html.erb @@ -15,8 +15,6 @@ <%= raw setting["html.per_page_code_body"] %> - <%= render Layout::ConsentBannerComponent.new %> -