bamboolab_cookies 0.0.4 → 0.0.5
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/lib/bamboolab_cookies.rb +3 -3
- data/lib/js/footer.js +14 -15
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 666df499078b581d9a86d89329802ef6195c3d96
|
|
4
|
+
data.tar.gz: 285428cb67fc910f595cf1297b30ce0ee3fc5eab
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d06e97fe994394a296c29c8f63864cc1483e8c79485d7cfb282dc3812ad2aaa2e946ea0b50d2d3386e21062aeee016d43a669fd416bfc686cfffcf04781e07ac
|
|
7
|
+
data.tar.gz: 09224bbfa5f498fc26233eedd4466846fc5f1fd54dea86b3f03a975b2ff8c524310345b06a3960685d1194e0906f86727916ab802436bfce4fd68cabf9e3b261
|
data/lib/bamboolab_cookies.rb
CHANGED
|
@@ -16,14 +16,14 @@ def bamboolab_cookies(*args)
|
|
|
16
16
|
text = args[0][:text] || "Cookies help us deliver our services. By using our services, you agree to our use of cookies."
|
|
17
17
|
more_text = args[0][:more_text] || "Learn more"
|
|
18
18
|
more_link = args[0][:more_link] || "http://www.aboutcookies.org/"
|
|
19
|
-
else
|
|
19
|
+
else
|
|
20
20
|
button = "OK"
|
|
21
21
|
text = "Cookies help us deliver our services. By using our services, you agree to our use of cookies."
|
|
22
22
|
more_text = "Learn more"
|
|
23
23
|
more_link = "http://www.aboutcookies.org/"
|
|
24
24
|
end
|
|
25
|
-
div ="<script>
|
|
26
|
-
bamboolabCookies({button: \"#{button}\", text: \"#{text}\", more: [ \"#{more_text}\" , \"#{more_link}\"] });
|
|
25
|
+
div ="<script>
|
|
26
|
+
bamboolabCookies({button: \"#{button}\", text: \"#{text}\", more: [ \"#{more_text}\" , \"#{more_link}\"] });
|
|
27
27
|
</script>"
|
|
28
28
|
end
|
|
29
29
|
|
data/lib/js/footer.js
CHANGED
|
@@ -6,34 +6,33 @@ function bamboolabCookies(configs) {
|
|
|
6
6
|
if (!getCookie("bamboo_cookie")) {
|
|
7
7
|
//create main div
|
|
8
8
|
var div = document.createElement("div");
|
|
9
|
-
div.setAttribute('class', '
|
|
9
|
+
div.setAttribute('class', 'cookies__wraper');
|
|
10
10
|
|
|
11
|
-
//create two
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
//create two div tags
|
|
12
|
+
var divInfo = document.createElement("div");
|
|
13
|
+
divInfo.setAttribute('class', 'cookies__info');
|
|
14
|
+
divInfo.innerHTML = configs.text;
|
|
15
15
|
|
|
16
|
-
var
|
|
17
|
-
|
|
16
|
+
var divAction = document.createElement("div");
|
|
17
|
+
divAction.setAttribute('class', 'cookies__action');
|
|
18
18
|
|
|
19
19
|
//crete button
|
|
20
|
-
var button = document.createElement("
|
|
21
|
-
button.setAttribute('class', '
|
|
22
|
-
button.setAttribute('id', 'cookies_button');
|
|
20
|
+
var button = document.createElement("a");
|
|
21
|
+
button.setAttribute('class', 'btn btn--cookies');
|
|
23
22
|
button.textContent = configs.button;
|
|
24
23
|
|
|
25
24
|
//crete link
|
|
26
25
|
var link = document.createElement("a");
|
|
27
|
-
link.setAttribute('class', '
|
|
26
|
+
link.setAttribute('class', 'link link__cookies');
|
|
28
27
|
link.setAttribute('target', '_blank');
|
|
29
28
|
link.href = configs.more[1];
|
|
30
29
|
link.textContent = configs.more[0];
|
|
31
30
|
|
|
32
31
|
//appending
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
div.appendChild(
|
|
36
|
-
div.appendChild(
|
|
32
|
+
divAction.appendChild(button);
|
|
33
|
+
divAction.appendChild(link);
|
|
34
|
+
div.appendChild(divInfo);
|
|
35
|
+
div.appendChild(divAction);
|
|
37
36
|
document.body.appendChild(div);
|
|
38
37
|
|
|
39
38
|
//event and removing
|