cookies_eu 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/app/assets/javascripts/cookies_eu.js +32 -8
- data/app/views/cookies_eu/_consent_banner.html.erb +2 -2
- data/cookies_eu.gemspec +1 -2
- data/lib/cookies_eu.rb +1 -2
- data/lib/cookies_eu/version.rb +1 -1
- metadata +4 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9eb8ea61a5d83ff08e56a2fd8cfc45d8dcdec26
|
4
|
+
data.tar.gz: 4299639bda4160c9019629868b795b9da09ac80c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad92ea03ae2119b46f340ca780e9fc0d284d45ad897519d602ee42cbc1f154c08980b38701f7f165127df0d2dacfdf6abac4d3be111604f8b1205889a8654037
|
7
|
+
data.tar.gz: 26655fea0d70c2422223c0b36fc14a57b2a3adf596bb078b45b2167b83de5652b7afd885cc26179f3bd9d753ca0c58eb09b0c023b1a8de455eb0f2345e6b7a82
|
data/README.md
CHANGED
@@ -18,7 +18,7 @@ Gem to add cookie consent to rails application
|
|
18
18
|
* Italian
|
19
19
|
* Norwegian
|
20
20
|
* Polish
|
21
|
-
*
|
21
|
+
* Portuguese
|
22
22
|
* Romanian
|
23
23
|
* Russian
|
24
24
|
* Slovenian
|
@@ -73,7 +73,7 @@ You can add a target parameter to the link to open in a new tab
|
|
73
73
|
= render 'cookies_eu/consent_banner', link: '/cookies', target: '_blank'
|
74
74
|
```
|
75
75
|
|
76
|
-
If you
|
76
|
+
If you wish to customize the style of the div the classes are:
|
77
77
|
|
78
78
|
```javascript
|
79
79
|
.cookies-eu // main div
|
@@ -137,7 +137,7 @@ To enable cookies on our website, follow the steps below.
|
|
137
137
|
|
138
138
|
1. Click "Tools" at the top of your browser and select "Settings".
|
139
139
|
2. Click "Show advanced settings", scroll down to the section "Privacy" and click "Content Settings."
|
140
|
-
3. Select "Allow local data to be set". To only
|
140
|
+
3. Select "Allow local data to be set". To only accept first-party cookies, check the box next to "Block all third-party cookies without exception"
|
141
141
|
|
142
142
|
##### Microsoft Internet Explorer 6.0, 7.0, 8.0, 9.0
|
143
143
|
|
@@ -1,9 +1,33 @@
|
|
1
|
-
//= require
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
//= require js.cookie
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
document.addEventListener('DOMContentLoaded', function() {
|
5
|
+
|
6
|
+
var cookiesEu = {
|
7
|
+
init: function() {
|
8
|
+
var cookiesEuOKButton = document.querySelector('.js-cookies-eu-ok');
|
9
|
+
|
10
|
+
if (cookiesEuOKButton) {
|
11
|
+
this.addListener(cookiesEuOKButton);
|
12
|
+
}
|
13
|
+
},
|
14
|
+
|
15
|
+
addListener: function(target) {
|
16
|
+
// Support for IE < 9
|
17
|
+
if (target.attachEvent) {
|
18
|
+
target.attachEvent('onclick', this.setCookie);
|
19
|
+
} else {
|
20
|
+
target.addEventListener('click', this.setCookie, false);
|
21
|
+
}
|
22
|
+
},
|
23
|
+
|
24
|
+
setCookie: function() {
|
25
|
+
Cookies.set('cookie_eu_consented', true, { path: '/', expires: 365 });
|
26
|
+
|
27
|
+
document.querySelector('.js-cookies-eu').remove();
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
cookiesEu.init();
|
32
|
+
|
9
33
|
});
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<% if cookies['cookie_eu_consented'] != 'true' %>
|
2
|
-
<div class="cookies-eu">
|
2
|
+
<div class="cookies-eu js-cookies-eu">
|
3
3
|
<span class="cookies-eu-content-holder"><%= t('cookies_eu.cookies_text') %></span>
|
4
4
|
<span class="cookies-eu-button-holder">
|
5
|
-
<button class="cookies-eu-ok"> <%= t('cookies_eu.ok') %> </button>
|
5
|
+
<button class="cookies-eu-ok js-cookies-eu-ok"> <%= t('cookies_eu.ok') %> </button>
|
6
6
|
<% if defined?(link).present? %>
|
7
7
|
<a href="<%= link %>" class="cookies-eu-link" target="<%= defined?(target).present? ? target : '' %>"> <%= t('cookies_eu.learn_more') %> </a>
|
8
8
|
<% end %>
|
data/cookies_eu.gemspec
CHANGED
@@ -18,8 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "
|
22
|
-
spec.add_dependency "jquery-cookie-rails"
|
21
|
+
spec.add_dependency "js_cookie_rails"
|
23
22
|
spec.add_development_dependency "bundler", "~> 1.3"
|
24
23
|
spec.add_development_dependency "rake"
|
25
24
|
end
|
data/lib/cookies_eu.rb
CHANGED
data/lib/cookies_eu/version.rb
CHANGED
metadata
CHANGED
@@ -1,31 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cookies_eu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stjepan Hadjic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: jquery-cookie-rails
|
14
|
+
name: js_cookie_rails
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
30
16
|
requirements:
|
31
17
|
- - ">="
|
@@ -125,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
111
|
version: '0'
|
126
112
|
requirements: []
|
127
113
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.4
|
114
|
+
rubygems_version: 2.6.4
|
129
115
|
signing_key:
|
130
116
|
specification_version: 4
|
131
117
|
summary: Displays a cookie consent. If you dont disable cokkies in settings, we assume
|