jumbo-jekyll-theme 5.7.0.7 → 6.0.0.4
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/_config.yml +19 -5
- data/_includes/components/cookie_manager.html +8 -16
- data/_includes/components/github_edit.html +2 -2
- data/_includes/components/head.html +2 -5
- data/_includes/components/jumbotron.html +0 -1
- data/_includes/flow/blocks.html +33 -4
- data/_includes/flow/tabbed_content.html +1 -1
- data/_includes/footer/footer.html +9 -56
- data/_sass/app/overrides.scss +2 -80
- data/_sass/core/cookies.scss +3 -0
- data/_sass/core/footer.scss +13 -21
- data/_sass/core/jumbotron.scss +6 -2
- data/assets/css/main.scss +2 -2
- data/assets/js/app/main.js +104 -70
- data/assets/js/vendor/jquery.ihavecookies.js +47 -39
- data/assets/js/vendor/owl.carousel.js +3767 -3335
- metadata +16 -2
data/assets/css/main.scss
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
---
|
2
2
|
---
|
3
3
|
@charset "UTF-8";
|
4
|
-
// Custom sass and css rules
|
5
|
-
@import "app/custom";
|
6
4
|
//Bootstrap Overrides
|
7
5
|
@import "app/overrides";
|
8
6
|
@import "bootstrap/functions";
|
@@ -12,3 +10,5 @@
|
|
12
10
|
@import 'bootstrap/bootstrap';
|
13
11
|
// Linaro Jekyll Theme Includes
|
14
12
|
@import "core";
|
13
|
+
// Custom sass and css rules
|
14
|
+
@import "app/custom";
|
data/assets/js/app/main.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
$(document).ready(function() {
|
1
|
+
$(document).ready(function () {
|
2
2
|
// Clipboard JS
|
3
3
|
if ($("div.highlight").length > 0) {
|
4
|
-
$("div.highlight").each(function(index) {
|
4
|
+
$("div.highlight").each(function (index) {
|
5
5
|
var uniqueId = "highlight" + index;
|
6
6
|
$(this).attr("id", uniqueId);
|
7
7
|
var copyBtn =
|
@@ -13,10 +13,10 @@ $(document).ready(function() {
|
|
13
13
|
copyBtn +=
|
14
14
|
'<img src="/assets/images/clipboard.svg" width="13" alt="Copy to clipboard"></button>';
|
15
15
|
$(this).append(copyBtn);
|
16
|
-
(function() {
|
16
|
+
(function () {
|
17
17
|
new ClipboardJS("#copyBtn" + index);
|
18
18
|
})();
|
19
|
-
$("#copyBtn" + index).on("click", function() {
|
19
|
+
$("#copyBtn" + index).on("click", function () {
|
20
20
|
$(this)
|
21
21
|
.attr("title", "Copied!")
|
22
22
|
.tooltip("_fixTitle")
|
@@ -40,11 +40,11 @@ $(document).ready(function() {
|
|
40
40
|
lazyLoadEager: 0,
|
41
41
|
loop: false,
|
42
42
|
lazyLoad: true,
|
43
|
-
dots: true
|
43
|
+
dots: true,
|
44
44
|
});
|
45
45
|
}
|
46
46
|
if ($(".owl-carousel.slider_block").length > 0) {
|
47
|
-
$(".owl-carousel.slider_block").each(function(index) {
|
47
|
+
$(".owl-carousel.slider_block").each(function (index) {
|
48
48
|
// Set Default values for the responsive items
|
49
49
|
var xs_items = 1;
|
50
50
|
var sm_items = 2;
|
@@ -91,20 +91,20 @@ $(document).ready(function() {
|
|
91
91
|
responsive: {
|
92
92
|
// breakpoint from 0 up
|
93
93
|
0: {
|
94
|
-
items: xs_items
|
94
|
+
items: xs_items,
|
95
95
|
},
|
96
96
|
// breakpoint from 480 up
|
97
97
|
768: {
|
98
|
-
items: sm_items
|
98
|
+
items: sm_items,
|
99
99
|
},
|
100
100
|
// breakpoint from 768 up
|
101
101
|
992: {
|
102
|
-
items: md_items
|
102
|
+
items: md_items,
|
103
103
|
},
|
104
104
|
1200: {
|
105
|
-
items: lg_items
|
106
|
-
}
|
107
|
-
}
|
105
|
+
items: lg_items,
|
106
|
+
},
|
107
|
+
},
|
108
108
|
});
|
109
109
|
});
|
110
110
|
}
|
@@ -113,7 +113,7 @@ $(document).ready(function() {
|
|
113
113
|
if ($(".double-scroll").length > 0) {
|
114
114
|
$(".double-scroll").doubleScroll({
|
115
115
|
resetOnWindowResize: true,
|
116
|
-
onlyIfScroll: true
|
116
|
+
onlyIfScroll: true,
|
117
117
|
});
|
118
118
|
}
|
119
119
|
// Theme navbar setup
|
@@ -149,15 +149,17 @@ $(document).ready(function() {
|
|
149
149
|
}
|
150
150
|
}
|
151
151
|
navbar();
|
152
|
-
$(window).scroll(function() {
|
152
|
+
$(window).scroll(function () {
|
153
153
|
navbar();
|
154
154
|
});
|
155
155
|
|
156
156
|
// Multi-level dropdowns
|
157
|
-
$(".navbar .dropdown-menu > li:not(.dropdown-item)").on("click", function(
|
157
|
+
$(".navbar .dropdown-menu > li:not(.dropdown-item)").on("click", function (
|
158
|
+
e
|
159
|
+
) {
|
158
160
|
e.stopPropagation();
|
159
161
|
});
|
160
|
-
$(".navbar .dropdown-item").on("click", function(e) {
|
162
|
+
$(".navbar .dropdown-item").on("click", function (e) {
|
161
163
|
var $el = $(this).children(".dropdown-toggle");
|
162
164
|
var $parent = $el.offsetParent(".dropdown-menu");
|
163
165
|
if (!$parent.parent().hasClass("navbar-nav")) {
|
@@ -166,10 +168,7 @@ $(document).ready(function() {
|
|
166
168
|
$el.next().removeClass("show");
|
167
169
|
$el.next().css({ top: -999, left: -999 });
|
168
170
|
} else {
|
169
|
-
$parent
|
170
|
-
.parent()
|
171
|
-
.find(".show")
|
172
|
-
.removeClass("show");
|
171
|
+
$parent.parent().find(".show").removeClass("show");
|
173
172
|
$parent.addClass("show");
|
174
173
|
$el.next().addClass("show");
|
175
174
|
$el
|
@@ -182,13 +181,11 @@ $(document).ready(function() {
|
|
182
181
|
});
|
183
182
|
|
184
183
|
// Reset forms when bootstrap modal closes.
|
185
|
-
$(".modal").on("hidden.bs.modal", function() {
|
186
|
-
$(this)
|
187
|
-
.find("form")[0]
|
188
|
-
.reset();
|
184
|
+
$(".modal").on("hidden.bs.modal", function () {
|
185
|
+
$(this).find("form")[0].reset();
|
189
186
|
});
|
190
187
|
// Stacked Navbar
|
191
|
-
$("#stacked-nav-bar").on("hidden.bs.collapse", function() {
|
188
|
+
$("#stacked-nav-bar").on("hidden.bs.collapse", function () {
|
192
189
|
$(".nav-pills").removeClass("nav-stacked");
|
193
190
|
});
|
194
191
|
// Scrolling sticking on IOS7 (Bug fix)
|
@@ -196,7 +193,7 @@ $(document).ready(function() {
|
|
196
193
|
$("html").addClass("ios7");
|
197
194
|
}
|
198
195
|
// Open External links in a new tab
|
199
|
-
$("a").each(function() {
|
196
|
+
$("a").each(function () {
|
200
197
|
var a = new RegExp("/" + window.location.host + "/");
|
201
198
|
if (!a.test(this.href)) {
|
202
199
|
if ($(this).attr("target") != "_self") {
|
@@ -204,16 +201,29 @@ $(document).ready(function() {
|
|
204
201
|
}
|
205
202
|
}
|
206
203
|
});
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
204
|
+
|
205
|
+
if ($(".nav-tabs").length > 0) {
|
206
|
+
let url = location.href.replace(/\/$/, "");
|
207
|
+
|
208
|
+
if (location.hash) {
|
209
|
+
const hash = url.split("#");
|
210
|
+
$('.nav-tabs a[href="#' + hash[1] + '"]').tab("show");
|
211
|
+
url = location.href.replace(/\/#/, "#");
|
212
|
+
history.replaceState(null, null, url);
|
213
|
+
setTimeout(() => {
|
214
|
+
$(window).scrollTop(0);
|
215
|
+
}, 400);
|
216
|
+
}
|
217
|
+
|
218
|
+
$('a[data-toggle="tab"]').on("click", function () {
|
219
|
+
let newUrl;
|
220
|
+
const hash = $(this).attr("href");
|
221
|
+
newUrl = url.split("#")[0] + hash;
|
222
|
+
history.replaceState(null, null, newUrl);
|
223
|
+
});
|
211
224
|
}
|
212
|
-
// Change hash for page-reload
|
213
|
-
$(".nav-tabs a").on("shown", function(e) {
|
214
|
-
window.location.hash = e.target.hash.replace("#", "#" + prefix);
|
215
|
-
});
|
216
225
|
|
226
|
+
// COOKIES CONFIG
|
217
227
|
// Cookie Consent Setup
|
218
228
|
if ($("meta[name=analytics_code]")) {
|
219
229
|
var privacy_url = $("meta[name=privacy_url]").attr("content");
|
@@ -230,45 +240,62 @@ $(document).ready(function() {
|
|
230
240
|
title: cookies_popup_title,
|
231
241
|
link: privacy_url,
|
232
242
|
moreInfoLabel: "View our Privacy Policy",
|
243
|
+
cookieLink: "/cookies/",
|
244
|
+
cookieLabel: "Manage your cookies",
|
245
|
+
links: [
|
246
|
+
{ url: "/cookies/", text: "Cookies Policy" },
|
247
|
+
{ url: "/privacy", text: "Privacy Policy" },
|
248
|
+
],
|
233
249
|
delay: 1000,
|
234
|
-
acceptBtnLabel: "Accept
|
235
|
-
|
250
|
+
acceptBtnLabel: "Accept All Cookies",
|
251
|
+
analyticsChecked: true,
|
236
252
|
message: cookies_popup_description,
|
237
253
|
cookieTypes: [
|
238
254
|
{
|
239
255
|
type: "Analytics",
|
240
256
|
value: "analytics",
|
241
|
-
|
242
|
-
|
257
|
+
checked: true,
|
258
|
+
description: "Cookies related to site visits, browser types, etc.",
|
259
|
+
},
|
243
260
|
],
|
244
|
-
onAccept: function() {
|
261
|
+
onAccept: function () {
|
245
262
|
init_ga();
|
246
|
-
}
|
263
|
+
},
|
247
264
|
};
|
248
265
|
// Enabled Google Analytics if cookie to allow us to collect is set.
|
249
266
|
function init_ga() {
|
250
267
|
if ($.fn.ihavecookies.preference("analytics")) {
|
251
|
-
(function(i, s, o, g, r, a, m) {
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
})(
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
);
|
270
|
-
ga("create", ga_code, "auto");
|
271
|
-
ga("send", "pageview");
|
268
|
+
// (function (i, s, o, g, r, a, m) {
|
269
|
+
// i["GoogleAnalyticsObject"] = r;
|
270
|
+
// (i[r] =
|
271
|
+
// i[r] ||
|
272
|
+
// function () {
|
273
|
+
// (i[r].q = i[r].q || []).push(arguments);
|
274
|
+
// }),
|
275
|
+
// (i[r].l = 1 * new Date());
|
276
|
+
// (a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]);
|
277
|
+
// a.async = 1;
|
278
|
+
// a.src = g;
|
279
|
+
// m.parentNode.insertBefore(a, m);
|
280
|
+
// })(
|
281
|
+
// window,
|
282
|
+
// document,
|
283
|
+
// "script",
|
284
|
+
// "https://www.google-analytics.com/analytics.js",
|
285
|
+
// "ga"
|
286
|
+
// );
|
287
|
+
// ga("create", ga_code, "auto");
|
288
|
+
// ga("send", "pageview");
|
289
|
+
(function (w, d, s, l, i) {
|
290
|
+
w[l] = w[l] || [];
|
291
|
+
w[l].push({ "gtm.start": new Date().getTime(), event: "gtm.js" });
|
292
|
+
var f = d.getElementsByTagName(s)[0],
|
293
|
+
j = d.createElement(s),
|
294
|
+
dl = l != "dataLayer" ? "&l=" + l : "";
|
295
|
+
j.async = true;
|
296
|
+
j.src = "https://www.googletagmanager.com/gtm.js?id=" + i + dl;
|
297
|
+
f.parentNode.insertBefore(j, f);
|
298
|
+
})(window, document, "script", "dataLayer", ga_code);
|
272
299
|
console.log("Google Analytics started");
|
273
300
|
} else {
|
274
301
|
console.log("Google analytics not started... :(");
|
@@ -281,8 +308,16 @@ $(document).ready(function() {
|
|
281
308
|
var analytics_toggle = $("#analytics_toggle");
|
282
309
|
if ($.fn.ihavecookies.preference("analytics")) {
|
283
310
|
analytics_toggle.addClass("active");
|
311
|
+
options.cookieTypes = [
|
312
|
+
{
|
313
|
+
type: "Analytics",
|
314
|
+
value: "analytics",
|
315
|
+
checked: false,
|
316
|
+
description: "Cookies related to site visits, browser types, etc.",
|
317
|
+
},
|
318
|
+
];
|
284
319
|
}
|
285
|
-
analytics_toggle.on("click", function() {
|
320
|
+
analytics_toggle.on("click", function () {
|
286
321
|
$.removeCookie("_ga");
|
287
322
|
$.removeCookie("_ga", { path: "/" });
|
288
323
|
$.removeCookie("_gid");
|
@@ -293,14 +328,13 @@ $(document).ready(function() {
|
|
293
328
|
$.removeCookie("cookieControlPrefs", { path: "/" });
|
294
329
|
$.removeCookie("cookieControl");
|
295
330
|
$.removeCookie("cookieControl", { path: "/" });
|
296
|
-
options["
|
297
|
-
|
298
|
-
$("body").ihavecookies(options);
|
331
|
+
options["acceptBtnLabel"] = "Update Cookies";
|
332
|
+
$("body").ihavecookies(options, "reinit");
|
299
333
|
});
|
300
334
|
}
|
301
335
|
$("body").ihavecookies(options);
|
302
336
|
}
|
303
|
-
$(function() {
|
337
|
+
$(function () {
|
304
338
|
$('[data-toggle="tooltip"]').tooltip();
|
305
339
|
});
|
306
340
|
|
@@ -308,7 +342,7 @@ $(document).ready(function() {
|
|
308
342
|
var file_path = $("#post_search").data("file-path");
|
309
343
|
|
310
344
|
$("#results-container").hide();
|
311
|
-
$("#search-input").keyup(function() {
|
345
|
+
$("#search-input").keyup(function () {
|
312
346
|
if ($("#search-input").val().length == 0) {
|
313
347
|
$("#results-container").fadeOut("fast");
|
314
348
|
$(".close_search").hide();
|
@@ -317,7 +351,7 @@ $(document).ready(function() {
|
|
317
351
|
$(".close_search").show();
|
318
352
|
}
|
319
353
|
});
|
320
|
-
$(".close_search").click(function(e) {
|
354
|
+
$(".close_search").click(function (e) {
|
321
355
|
e.preventDefault();
|
322
356
|
$("#search-input").val("");
|
323
357
|
$("#results-container").fadeOut("fast");
|
@@ -331,9 +365,9 @@ $(document).ready(function() {
|
|
331
365
|
searchResultTemplate:
|
332
366
|
'<li class="media flex-row"><picture><img class="lazyload mr-3 img-thumbnail suggested_post_thumb search_result_img" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="{image}"></picture><div class="media-body"><a href="{url}"><h5 class="mt-0 mb-1">{title}</h5><em class="suggested_post_date">{date}</em><p>{description}</p></a></div></li>',
|
333
367
|
json: file_path,
|
334
|
-
success: function(data) {
|
368
|
+
success: function (data) {
|
335
369
|
console.log(data);
|
336
|
-
}
|
370
|
+
},
|
337
371
|
});
|
338
372
|
}
|
339
373
|
});
|
@@ -7,7 +7,7 @@
|
|
7
7
|
* http://www.opensource.org/licenses/mit-license.php
|
8
8
|
*
|
9
9
|
*/
|
10
|
-
(function($) {
|
10
|
+
(function ($) {
|
11
11
|
/*
|
12
12
|
|--------------------------------------------------------------------------
|
13
13
|
| Cookie Message
|
@@ -19,7 +19,7 @@
|
|
19
19
|
| @param event - 'reinit' to reopen the cookie message
|
20
20
|
|
|
21
21
|
*/
|
22
|
-
$.fn.ihavecookies = function(options, event) {
|
22
|
+
$.fn.ihavecookies = function (options, event) {
|
23
23
|
var $element = $(this);
|
24
24
|
|
25
25
|
// Set defaults
|
@@ -30,19 +30,19 @@
|
|
30
30
|
type: "Site Preferences",
|
31
31
|
value: "preferences",
|
32
32
|
description:
|
33
|
-
"These are cookies that are related to your site preferences, e.g. remembering your username, site colours, etc."
|
33
|
+
"These are cookies that are related to your site preferences, e.g. remembering your username, site colours, etc.",
|
34
34
|
},
|
35
35
|
{
|
36
36
|
type: "Analytics",
|
37
37
|
value: "analytics",
|
38
|
-
description: "Cookies related to site visits, browser types, etc."
|
38
|
+
description: "Cookies related to site visits, browser types, etc.",
|
39
39
|
},
|
40
40
|
{
|
41
41
|
type: "Marketing",
|
42
42
|
value: "marketing",
|
43
43
|
description:
|
44
|
-
"Cookies related to marketing, e.g. newsletters, social media, etc"
|
45
|
-
}
|
44
|
+
"Cookies related to marketing, e.g. newsletters, social media, etc",
|
45
|
+
},
|
46
46
|
],
|
47
47
|
title: "Cookies & Privacy",
|
48
48
|
message:
|
@@ -58,8 +58,8 @@
|
|
58
58
|
fixedCookieTypeLabel: "Necessary",
|
59
59
|
fixedCookieTypeDesc:
|
60
60
|
"These are cookies that are essential for the website to work correctly.",
|
61
|
-
onAccept: function() {},
|
62
|
-
uncheckBoxes: false
|
61
|
+
onAccept: function () {},
|
62
|
+
uncheckBoxes: false,
|
63
63
|
},
|
64
64
|
options
|
65
65
|
);
|
@@ -80,18 +80,25 @@
|
|
80
80
|
|
81
81
|
// Generate list of cookie type checkboxes
|
82
82
|
preferences = JSON.parse(myCookiePrefs);
|
83
|
-
$.each(settings.cookieTypes, function(index, field) {
|
83
|
+
$.each(settings.cookieTypes, function (index, field) {
|
84
84
|
if (field.type !== "" && field.value !== "") {
|
85
85
|
var cookieTypeDescription = "";
|
86
86
|
if (field.description !== false) {
|
87
87
|
cookieTypeDescription = ' title="' + field.description + '"';
|
88
88
|
}
|
89
|
+
var cookieChecked = "";
|
90
|
+
if (field.checked === true) {
|
91
|
+
cookieChecked = "checked";
|
92
|
+
}
|
89
93
|
cookieTypes +=
|
90
|
-
'<li><input
|
94
|
+
'<li><input type="checkbox" id="gdpr-cookietype-' +
|
91
95
|
field.value +
|
92
96
|
'" name="gdpr[]" value="' +
|
93
97
|
field.value +
|
94
|
-
'" data-auto="off"
|
98
|
+
'" data-auto="off" ' +
|
99
|
+
cookieTypeDescription +
|
100
|
+
cookieChecked +
|
101
|
+
'> <label class="cookieCheckboxLabel" for="gdpr-cookietype-' +
|
95
102
|
field.value +
|
96
103
|
'"' +
|
97
104
|
cookieTypeDescription +
|
@@ -107,11 +114,21 @@
|
|
107
114
|
settings.title +
|
108
115
|
"</h4><p>" +
|
109
116
|
settings.message +
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
117
|
+
"<br/>";
|
118
|
+
|
119
|
+
for (i = 0; i < settings.links.length; i++) {
|
120
|
+
cookieMessage +=
|
121
|
+
'<a href="' +
|
122
|
+
settings.links[i].url +
|
123
|
+
'">' +
|
124
|
+
settings.links[i].text +
|
125
|
+
"</a> ";
|
126
|
+
if (settings.links.length > 1 && i < settings.links.length - 1) {
|
127
|
+
cookieMessage += " - ";
|
128
|
+
}
|
129
|
+
}
|
130
|
+
cookieMessage +=
|
131
|
+
'<div id="gdpr-cookie-types" style="display:none;"><h5>' +
|
115
132
|
settings.cookieTypesTitle +
|
116
133
|
"</h5><ul>" +
|
117
134
|
cookieTypes +
|
@@ -120,34 +137,30 @@
|
|
120
137
|
'</button><button id="gdpr-cookie-advanced" type="button">' +
|
121
138
|
settings.advancedBtnLabel +
|
122
139
|
"</button></p></div>";
|
123
|
-
setTimeout(function() {
|
140
|
+
setTimeout(function () {
|
124
141
|
$($element).append(cookieMessage);
|
125
142
|
$("#gdpr-cookie-message")
|
126
143
|
.hide()
|
127
|
-
.fadeIn("slow", function() {
|
144
|
+
.fadeIn("slow", function () {
|
128
145
|
// If reinit'ing, open the advanced section of message
|
129
146
|
// and re-check all previously selected options.
|
130
147
|
if (event == "reinit") {
|
131
148
|
$("#gdpr-cookie-advanced").trigger("click");
|
132
|
-
// $.each(preferences, function(index, field) {
|
133
|
-
// $("input#gdpr-cookietype-" + field).prop("checked", true);
|
134
|
-
// });
|
135
149
|
}
|
136
150
|
});
|
137
151
|
}, settings.delay);
|
138
|
-
|
152
|
+
// Make sure the analytics checkbox is toggled on init based on settings provided.
|
139
153
|
// When accept button is clicked drop cookie
|
140
|
-
$("body").on("click", "#gdpr-cookie-accept", function() {
|
154
|
+
$("body").on("click", "#gdpr-cookie-accept", function () {
|
141
155
|
// Set cookie
|
142
156
|
dropCookie(true, settings.expires);
|
143
157
|
|
144
158
|
// If 'data-auto' is set to ON, tick all checkboxes because
|
145
159
|
// the user hasn't clicked the customise cookies button
|
146
160
|
$('input[name="gdpr[]"][data-auto="on"]').prop("checked", true);
|
147
|
-
|
148
161
|
// Save users cookie preferences (in a cookie!)
|
149
162
|
var prefs = [];
|
150
|
-
$.each($('input[name="gdpr[]"]').serializeArray(), function(i, field) {
|
163
|
+
$.each($('input[name="gdpr[]"]').serializeArray(), function (i, field) {
|
151
164
|
prefs.push(field.value);
|
152
165
|
});
|
153
166
|
setCookie(
|
@@ -161,14 +174,9 @@
|
|
161
174
|
});
|
162
175
|
|
163
176
|
// Toggle advanced cookie options
|
164
|
-
$("body").on("click", "#gdpr-cookie-advanced", function() {
|
165
|
-
|
166
|
-
|
167
|
-
// select the cookies they want to accept.
|
168
|
-
$('input[name="gdpr[]"]:not(:disabled)')
|
169
|
-
.attr("data-auto", "off")
|
170
|
-
.prop("checked", settings.analyticsChecked);
|
171
|
-
$("#gdpr-cookie-types").slideDown("fast", function() {
|
177
|
+
$("body").on("click", "#gdpr-cookie-advanced", function () {
|
178
|
+
$("#gdpr-cookie-accept").html("Accept Selected Cookies");
|
179
|
+
$("#gdpr-cookie-types").slideDown("fast", function () {
|
172
180
|
$("#gdpr-cookie-advanced").prop("disabled", true);
|
173
181
|
});
|
174
182
|
});
|
@@ -187,13 +195,13 @@
|
|
187
195
|
};
|
188
196
|
|
189
197
|
// Method to get cookie value
|
190
|
-
$.fn.ihavecookies.cookie = function() {
|
198
|
+
$.fn.ihavecookies.cookie = function () {
|
191
199
|
var preferences = getCookie("cookieControlPrefs");
|
192
200
|
return JSON.parse(preferences);
|
193
201
|
};
|
194
202
|
|
195
203
|
// Method to check if user cookie preference exists
|
196
|
-
$.fn.ihavecookies.preference = function(cookieTypeValue) {
|
204
|
+
$.fn.ihavecookies.preference = function (cookieTypeValue) {
|
197
205
|
var control = getCookie("cookieControl");
|
198
206
|
var preferences = getCookie("cookieControlPrefs");
|
199
207
|
preferences = JSON.parse(preferences);
|
@@ -214,9 +222,9 @@
|
|
214
222
|
| Function to drop the cookie with a boolean value of true.
|
215
223
|
|
|
216
224
|
*/
|
217
|
-
var dropCookie = function(value, expiryDays) {
|
225
|
+
var dropCookie = function (value, expiryDays) {
|
218
226
|
setCookie("cookieControl", value, expiryDays);
|
219
|
-
$("#gdpr-cookie-message").fadeOut("fast", function() {
|
227
|
+
$("#gdpr-cookie-message").fadeOut("fast", function () {
|
220
228
|
$(this).remove();
|
221
229
|
});
|
222
230
|
};
|
@@ -229,7 +237,7 @@
|
|
229
237
|
| Sets cookie with 'name' and value of 'value' for 'expiry_days'.
|
230
238
|
|
|
231
239
|
*/
|
232
|
-
var setCookie = function(name, value, expiry_days) {
|
240
|
+
var setCookie = function (name, value, expiry_days) {
|
233
241
|
var d = new Date();
|
234
242
|
d.setTime(d.getTime() + expiry_days * 24 * 60 * 60 * 1000);
|
235
243
|
var expires = "expires=" + d.toUTCString();
|
@@ -245,7 +253,7 @@
|
|
245
253
|
| Gets cookie called 'name'.
|
246
254
|
|
|
247
255
|
*/
|
248
|
-
var getCookie = function(name) {
|
256
|
+
var getCookie = function (name) {
|
249
257
|
var cookie_name = name + "=";
|
250
258
|
var decodedCookie = decodeURIComponent(document.cookie);
|
251
259
|
var ca = decodedCookie.split(";");
|