Skip to content

Commit 1fa4cf7

Browse files
Merge pull request #14 from TecArt/issue#11
Issue#11
2 parents c7294cd + b151437 commit 1fa4cf7

5 files changed

+18
-10
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# v0.1.8
2+
## 2/2023
3+
1. [](#improved)
4+
* make script text label required in blueprint
5+
* fix bug that removes active scripts with disable toggler
6+
17
# v0.1.7
28
## 3/2022
39
1. [](#new)

assets/js/tecart-cookie-manager.js

+9-8
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class TecartCookieBanner{
3737
// Button settings
3838
let buttonSettings = '';
3939
if(this.getCookieBannerContent(this.cookieBannerData).buttonSettingsActive == 'activated'){
40-
buttonSettings = '<a aria-label="settings" role="button" tabIndex="0" class="button cc-btn cc-setting tcb-settings-btn '+this.getCookieBannerContent(this.cookieBannerData).buttonSettingsLayout+'" id="tcb-settings">'+this.getCookieBannerContent(this.cookieBannerData).settings+'</a>';
40+
buttonSettings = '<a aria-label="settings" role="button" tabIndex="0" class="button cc-btn cc-setting tcb-settings-btn '+this.getCookieBannerContent(this.cookieBannerData).buttonSettingsLayout+'" id="tcb-settings">'+this.getCookieBannerContent(this.cookieBannerData).settings+'</a>';
4141
}
4242

4343
// Button deny
@@ -444,7 +444,7 @@ class TecartCookieBanner{
444444

445445
/**
446446
* add script tags to DOM
447-
*/
447+
*/
448448
addScriptTagToDOM(codePos, codeItem) {
449449

450450
//add script to head tag
@@ -470,7 +470,7 @@ class TecartCookieBanner{
470470

471471
/**
472472
* remove tags with given data-title
473-
*/
473+
*/
474474
removeCodeTagByTitle(dataTitle) {
475475

476476
if(dataTitle !== ''){
@@ -577,9 +577,9 @@ class TecartCookieBanner{
577577
let cat_toggler = '';
578578
if (json_data[i].category_cookies === 'activated') {
579579
cat_toggler = '<label class="tcb-switch tcb-categories-switch">' +
580-
'<input type="checkbox" '+activated+' id="cat_'+catTitleEncoded+'" value="'+catTitleEncoded+'" name="tcbCookieCategories" />' +
581-
'<span class="tcb-slider tcb-round"></span>' +
582-
'</label>';
580+
'<input type="checkbox" '+activated+' id="cat_'+catTitleEncoded+'" value="'+catTitleEncoded+'" name="tcbCookieCategories" />' +
581+
'<span class="tcb-slider tcb-round"></span>' +
582+
'</label>';
583583
}
584584

585585
//set checked tab
@@ -702,7 +702,7 @@ class TecartCookieBanner{
702702
this.cookieConsentScriptsArray = new Map();
703703

704704
//get selected scripts
705-
selectedScripts = Array.from(document.querySelectorAll('input[name=tcbCookieScripts]'))
705+
selectedScripts = Array.from(document.querySelectorAll('input[name=tcbCookieScripts], input[name=tcbDisabledCookieScripts]'))
706706
.filter((checkbox) => checkbox.checked)
707707
.map((checkbox) => checkbox.value);
708708

@@ -712,6 +712,7 @@ class TecartCookieBanner{
712712
this.cookieConsentScriptsArray.set(selectedScripts[i],{allowed:true});
713713
}
714714
}
715+
715716
//get selected categories
716717
selectedCats = Array.from(document.querySelectorAll('input[name=tcbCookieCategories]'))
717718
.filter((checkbox) => checkbox.checked)
@@ -747,7 +748,7 @@ class TecartCookieBanner{
747748

748749
/**
749750
* checkboxes selected
750-
*/
751+
*/
751752
onScrollIncludes() {
752753

753754
if(this.cookieConsentScrolled !== 'scrolled'){

assets/js/tecart-cookie-manager.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

blueprints.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: TecArt Cookie Manager
2-
version: 0.1.7
2+
version: 0.1.8
33
description: "TecArt cookie banner manager provides a cookie banner plugin with complete cookie management in admin and extended frontend views. The plugin is based on the popular **[CookieConsent](https://cookieconsent.osano.com/) JS-library** by Osano."
44
icon: shield
55
author:

blueprints/cookie-manager-scripts.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ form:
2525
rows: 5
2626
label: PLUGIN_TECART_COOKIE_MANAGER.SCRIPT_TEXT
2727
validate:
28+
required: true
2829
type: textarea
2930
.script_category:
3031
type: select

0 commit comments

Comments
 (0)