cookies_eu 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +17 -3
- data/app/assets/javascripts/cookies_eu.js +1 -1
- data/app/views/cookies_eu/_consent_banner.html.erb +1 -1
- data/config/locales/cs.yml +5 -0
- data/config/locales/da.yml +5 -0
- data/config/locales/hu.yml +5 -0
- data/config/locales/pt.yml +5 -0
- data/config/locales/ro.yml +5 -0
- data/lib/cookies_eu/version.rb +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 532453c74b2fda31b9d2db252049f44cb98e22c7
|
|
4
|
+
data.tar.gz: 77fb800810995ec03ea35eb6e517c35e74ff5561
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc63aa42d741d3c1c8de68ba9a9e23a5146bf4a4132258eff44aa097c11426fd65ccb4782c2d41a162e6304767da74a3787f5dec953211f8a802a4f267864cd9
|
|
7
|
+
data.tar.gz: 7b2399e03d5845c29448437caf4f6bbe8b0fea5221aca1c651ea2c871c87b71bf7d484538c289b2d6dd7a5d2335b3c6b2c8bb9e71fdc451efa5b076ccd8dc42e
|
data/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
[](https://badge.fury.io/rb/cookies_eu)
|
|
2
|
+
|
|
1
3
|
# CookiesEu
|
|
2
4
|
|
|
3
5
|
Gem to add cookie consent to rails application
|
|
@@ -5,14 +7,19 @@ Gem to add cookie consent to rails application
|
|
|
5
7
|
## Supported languages
|
|
6
8
|
|
|
7
9
|
* Croatian
|
|
10
|
+
* Czech
|
|
11
|
+
* Danish
|
|
8
12
|
* Dutch
|
|
9
13
|
* English
|
|
10
14
|
* Estonian
|
|
11
15
|
* French
|
|
12
16
|
* German
|
|
17
|
+
* Hungarian
|
|
13
18
|
* Italian
|
|
14
19
|
* Norwegian
|
|
15
20
|
* Polish
|
|
21
|
+
* Portugese
|
|
22
|
+
* Romanian
|
|
16
23
|
* Russian
|
|
17
24
|
* Slovenian
|
|
18
25
|
* Spanish
|
|
@@ -60,13 +67,20 @@ You can add a link parameter to link to your cookies explanation page (you have
|
|
|
60
67
|
= render 'cookies_eu/consent_banner', link: '/cookies'
|
|
61
68
|
```
|
|
62
69
|
|
|
70
|
+
You can add a target parameter to the link to open in a new tab
|
|
71
|
+
|
|
72
|
+
```ruby
|
|
73
|
+
= render 'cookies_eu/consent_banner', link: '/cookies', target: '_blank'
|
|
74
|
+
```
|
|
63
75
|
|
|
64
76
|
If you whish to customize the style of the div the classes are:
|
|
65
77
|
|
|
66
78
|
```javascript
|
|
67
|
-
.
|
|
68
|
-
.
|
|
69
|
-
.
|
|
79
|
+
.cookies-eu // main div
|
|
80
|
+
.cookies-eu-content-holder // content holder
|
|
81
|
+
.cookies-eu-button-holder // button holder
|
|
82
|
+
.cookies-eu-ok // button
|
|
83
|
+
.cookies-eu-link // link
|
|
70
84
|
```
|
|
71
85
|
|
|
72
86
|
## Turbolinks NOT supported
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
$(document).ready( function(){
|
|
4
4
|
$('.cookies-eu-ok').click(function(e){
|
|
5
5
|
e.preventDefault();
|
|
6
|
-
$.cookie('cookie_eu_consented',
|
|
6
|
+
$.cookie('cookie_eu_consented', true, { path: '/', expires: 365 });
|
|
7
7
|
$('.cookies-eu').remove();
|
|
8
8
|
});
|
|
9
9
|
});
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<span class="cookies-eu-button-holder">
|
|
5
5
|
<button class="cookies-eu-ok"> <%= t('cookies_eu.ok') %> </button>
|
|
6
6
|
<% if defined?(link).present? %>
|
|
7
|
-
<a href="<%= link %>" class="cookies-eu-link"> <%= t('cookies_eu.learn_more') %> </a>
|
|
7
|
+
<a href="<%= link %>" class="cookies-eu-link" target="<%= defined?(target).present? ? target : '' %>"> <%= t('cookies_eu.learn_more') %> </a>
|
|
8
8
|
<% end %>
|
|
9
9
|
</span>
|
|
10
10
|
</div>
|
data/lib/cookies_eu/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cookies_eu
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.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:
|
|
11
|
+
date: 2016-02-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jquery-rails
|
|
@@ -82,16 +82,21 @@ files:
|
|
|
82
82
|
- app/assets/stylesheets/cookies_eu.scss
|
|
83
83
|
- app/views/cookies_eu/_consent_banner.html.erb
|
|
84
84
|
- app/views/cookies_eu/cookies_info.html.haml
|
|
85
|
+
- config/locales/cs.yml
|
|
86
|
+
- config/locales/da.yml
|
|
85
87
|
- config/locales/de.yml
|
|
86
88
|
- config/locales/ee.yml
|
|
87
89
|
- config/locales/en.yml
|
|
88
90
|
- config/locales/es.yml
|
|
89
91
|
- config/locales/fr.yml
|
|
90
92
|
- config/locales/hr.yml
|
|
93
|
+
- config/locales/hu.yml
|
|
91
94
|
- config/locales/it.yml
|
|
92
95
|
- config/locales/nl.yml
|
|
93
96
|
- config/locales/no.yml
|
|
94
97
|
- config/locales/pl.yml
|
|
98
|
+
- config/locales/pt.yml
|
|
99
|
+
- config/locales/ro.yml
|
|
95
100
|
- config/locales/ru.yml
|
|
96
101
|
- config/locales/sl.yml
|
|
97
102
|
- config/locales/sv.yml
|