ltsecurityinc安防产品在线商城代码

This commit is contained in:
2026-09-14 17:47:10 +08:00
parent 57d8444c15
commit 6a3c9c5bd8
14539 changed files with 1775310 additions and 0 deletions
@@ -0,0 +1,961 @@
.blur-mode{
-webkit-filter: blur(3px);
filter: blur(3px);
}
.pr-cookie-modal-bottom {
display: none;
position: fixed;
bottom: 0;
z-index: 800 !important;
width: 100%;
box-sizing: border-box;
animation-duration: 1s;
animation-name: slideup;
animation-timing-function: ease-in-out;
}
.pr-cookie-modal.show-without-overlay {
display: block;
}
.pr-cookie-modal-bottom .modal-inner-wrap {
max-width: 100%;
padding: 15px;
padding-top: 35px;
background: rgba(0, 33, 68, 0.89);
}
.pr-cookie-title {
margin: 0;
font-weight: 700;
line-height: 1.1;
font-size: 1.9rem;
}
.pr-cookie-modal-bottom .pr-cookie-notice-text {
color: #e6e6e6;
}
.pr-cookie-notice-text p {
margin-bottom: 0;
font-size: 14px;
line-height: 1.43;
}
.pr-cookie-notice-text p a {
color: inherit;
text-decoration: underline;
white-space: nowrap;
}
.pr-cookie-notice-actions {
display: flex;
flex-direction: column;
margin-top: 15px;
}
.pr-cookie-notice-actions .pr-cookie-notice-btn {
min-height: 40px;
margin: 5px 0;
padding: 7px 15px;
font-size: 1.4rem;
line-height: 1.6rem;
box-shadow: none;
}
.pr-cookie-notice-actions .pr-cookie-notice-btn.setting-link {
padding: 0;
border: none;
text-decoration: underline;
background-color: transparent;
}
button.pr-cookie-close-modal {
position: absolute;
top: 10px;
right: 10px;
width: 32px;
height: 25px;
background-color: transparent;
border: none;
box-shadow: none;
opacity: 0.3;
}
.pr-cookie-close-modal::before,
.pr-cookie-close-modal::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) rotate(45deg);
width: 15px;
height: 3px;
background-color: #e6e6e6;
border-radius: 1px;
}
.pr-cookie-close-modal::after {
transform: translate(-50%, -50%) rotate(-45deg);
}
.pr-cookie-modal button.pr-cookie-setting-btn.setting-link {
background-color: transparent;
box-shadow: none;
color: #fff;
}
.pr-cookie-modal button.pr-cookie-setting-btn.setting-link:hover {
background-color: transparent;
color: #dbdbdb;
}
.modal-slide.pr-cookie-left-bar {
right: 44px;
left: 0;
max-width: 400px;
}
.pr-cookie-left-bar .modal-title {
margin-bottom: 0;
font-size: 2.2rem;
line-height: 1.1;
font-weight: 600;
color: #333;
}
.pr-cookie-left-bar .pr-cookie-description {
margin-top: 10px;
}
.pr-cookie-left-bar .pr-cookie-description p {
margin: 0;
font-weight: 400;
line-height: 1.4;
font-size: 1.3rem;
color: #333;
}
.pr-cookie-category-descrip {
font-weight: 400;
font-size: 1.3rem;
line-height: 1.4;
color: #5C6670;
margin-bottom: 2rem;
}
.pr-cookie-left-bar .modal-content {
position: relative;
display: flex;
min-height: 100%;
box-sizing: border-box;
padding: 35px 18px;
}
.modal-slide.pr-cookie-left-bar .modal-inner-wrap {
transform: translateX(-100%);
}
.modal-slide.pr-cookie-left-bar._show .modal-inner-wrap {
transform: translateX(0);
}
.pr-cookie-left-bar .pr-actions-buttons {
display: flex;
justify-content: center;
padding-top: 20px;
padding-bottom: 30px;
border-bottom: 1px solid #ccc;
}
.pr-cookie-left-bar .pr-actions-buttons .action {
min-width: 150px;
min-height: 46px;
margin-right: 20px;
box-shadow: none;
}
.pr-cookie-left-bar .pr-actions-buttons .action:last-child {
margin-right: 0;
}
.modal-slide.pr-cookie-left-bar .page-main-actions {
margin-bottom: 0;
}
#pr-cookie-setting-bar {
display: flex;
flex-direction: column;
width: 100%;
}
#pr-cookie-setting-bar .pr-cookie-manage-title {
margin-top: 30px;
margin-bottom: 0;
font-weight: 700;
line-height: 1.1;
font-size: 1.9rem;
}
#pr-cookie-setting-bar .message-system-list {
margin-bottom: 35px;
padding-left: 0;
list-style: none;
}
.pr-cookie-option {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 30px;
margin-bottom: 10px;
}
#pr-cookie-setting-bar .option-label {
margin-right: 10px;
font-size: 1.4rem;
line-height: 1.1;
}
#pr-cookie-setting-bar .option-status {
font-size: 1.4rem;
color: #3f9001;
white-space: nowrap;
}
.pr-cookie-option .switch-area {
position: relative;
display: block;
width: 45px;
height: 25px;
box-sizing: border-box;
cursor: pointer;
border: 1px solid #ddd;
background-color: #f2f1f1;
border-radius: 20px;
transition: 0.3s;
}
.pr-cookie-option .switch-label {
position: relative;
}
.pr-cookie-option .switch-label input {
position: absolute;
clip: rect(0 0 0 0);
width: 1px;
height: 1px;
margin: -1px;
}
.pr-cookie-option .switch-label input[disabled] + .switch-area{
opacity: .5;
cursor: not-allowed;
}
.pr-cookie-option .switch-label .switch-nob {
content: "";
position: absolute;
top: 1px;
left: 2px;
width: 21px;
height: 21px;
background-color: #7d7d7d;
border-radius: 50%;
transition: 0.3s;
}
.pr-cookie-option .switch-label input:checked + .switch-area {
background-color: #6aa84f;
border-color: #3f9125;
}
.pr-cookie-option .switch-label input:checked + .switch-area .switch-nob {
transform: translate(calc(100% - 2px));
background-color: #fff;
}
.pr-cookie-left-bar .confirm {
align-self: flex-start;
margin-top: auto;
min-width: 170px;
height: 46px;
}
.pr-cookie-left-bar .pr-cookie-details {
margin-top: 8px;
padding: 0;
font-weight: 400;
font-size: 1.2rem;
line-height: 1.6rem;
background-color: transparent;
border: none;
box-shadow: none;
color: #386dc3;
}
.pr-cookie-left-bar .pr-cookie-details:hover {
text-decoration: underline;
}
.pr-cookie-view-top {
display: flex;
justify-content: space-between;
align-items: center;
}
.pr-cookie-group {
margin-top: 5px;
margin-bottom: 15px;
font-size: 1.2rem;
padding: 15px;
background-color: #f8f8f8;
border-radius: 5px;
}
.pr-cookie-group-row {
display: flex;
padding-bottom: 5px;
}
.pr-cookie-property {
flex-shrink: 0;
display: block;
min-width: 95px;
margin-right: 15px;
}
.pr-cookie-property-value {
overflow: hidden;
text-overflow: ellipsis;
}
.pr-cookie-details-info {
border-bottom: 1px solid #ccc;
}
.pr-cookie-details-info summary {
position: relative;
padding: 8px 0;
padding-right: 30px;
cursor: pointer;
}
.pr-cookie-details-info summary::-webkit-details-marker {
display: none;
}
.pr-cookie-group-title {
margin: 0;
font-size: 1.8rem;
line-height: 1.1;
font-weight: 400;
color: #386dc3;
}
.pr-cookie-view .pr-cookie-view-title {
margin: 0;
padding-top: 15px;
font-weight: 700;
line-height: 1.1;
font-size: 1.6rem;
color: #333;
}
.pr-cookie-view-top .pr-cookie-view-back {
position: relative;
padding: 7px 15px;
color: #333;
border: none;
background-color: transparent;
box-shadow: none;
font-size: 1.4rem;
line-height: 1.6rem;
box-sizing: border-box;
}
.pr-cookie-view-top .pr-cookie-view-back::before {
content: "";
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%) rotate(-45deg);
width: 5px;
height: 5px;
border: 1px solid #000;
border-right: none;
border-bottom: none;
}
.pr-cookie-view-top .pr-cookie-view-back::after {
content: "";
position: absolute;
top: 50%;
left: 1px;
transform: translatey(-50%);
width: 10px;
height: 1px;
background-color: #000;
}
.pr-cookie-view-top .pr-cookie-view-back:hover::before {
border-color: #386dc3;
}
.pr-cookie-view-top .pr-cookie-view-back:hover::after {
background-color: #386dc3;
}
.pr-cookie-details-modal .pr-cookie-details-info .pr-cookie-details-title,
.pr-cookie-details-info summary span {
position: relative;
display: inline-block;
margin-top: 5px;
padding-right: 14px;
font-size: 1.1rem;
font-weight: 600;
color: #386dc3;
}
.pr-cookie-details-info summary span::after {
content: "";
position: absolute;
top: 50%;
right: 0;
transform: translatey(-50%);
border-left: 7px solid #636363;
border-top: 4px solid transparent;
border-bottom: 4px solid transparent;
transition: 0.2s;
}
.pr-cookie-details-modal .pr-cookie-details-info[open] .pr-cookie-details-title:after,
.pr-cookie-details-modal .first-details[open=true] .pr-cookie-details:after,
.pr-cookie-details-info[open] summary span::after {
transform: translatey(-50%) rotate(90deg);
}
.pr-cookie-details-info[open] .pr-cookie-group {
animation: slidedown 0.3s;
}
.pr-cookie-view-top strong {
font-size: 1.4rem;
line-height: 1.1;
font-weight: 700;
color: #333;
}
.pr-cookie-left-bar .pr-cookie-close {
position: absolute;
top: 5px;
right: 5px;
width: 32px;
height: 32px;
background-size: 10px;
background-position: center;
background-repeat: no-repeat;
background-color: transparent;
border: none;
box-shadow: none;
transition: 0.3s;
}
.pr-cookie-left-bar .pr-cookie-close::before,
.pr-cookie-left-bar .pr-cookie-close::after,
.pr-cookie-details-modal .pr-cookie-close::before,
.pr-cookie-details-modal .pr-cookie-close::after,
.pr-cookie-modal .pr-cookie-close::before,
.pr-cookie-modal .pr-cookie-close::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) rotate(45deg);
transform-origin: center;
width: 12px;
height: 2px;
background-color: #494949;
border-radius: 30%;
}
.pr-cookie-modal .pr-cookie-close::before,
.pr-cookie-modal .pr-cookie-close::after{
background-color: #818181;
}
.pr-cookie-details-modal .pr-cookie-close::before,
.pr-cookie-details-modal .pr-cookie-close::after,
.pr-cookie-modal .pr-cookie-close .pr-cookie-close::before,
.pr-cookie-modal .pr-cookie-close .pr-cookie-close::after {
width: 15px;
height:3px;
border-radius: 2px;
}
.pr-cookie-details-modal .pr-cookie-close:hover,
.pr-cookie-modal .pr-cookie-close:hover
{
opacity: .7;
}
.pr-cookie-left-bar .pr-cookie-close::after,
.pr-cookie-details-modal .pr-cookie-close::after,
.pr-cookie-modal .pr-cookie-close::after{
transform: translate(-50%, -50%) rotate(-45deg);
}
.pr-cookie-left-bar .pr-cookie-close:hover {
opacity: 0.7;
}
.pr-cookie-setting-bar-wrap {
display: flex;
flex-direction: column;
min-height: 100%;
}
.pr-cookie-view .pr-cookie-details-title {
margin: 0;
font-size: 1.3rem;
font-weight: 700;
}
.pr-cookie-view-wrap {
height: 65px;
}
.pr-cookies-list {
height: calc(100vh - 225px);
overflow-y: auto;
margin: 0 -18px;
padding: 0 18px;
margin-top: 20px;
}
/* START --- pr-cookie-modal-wall pr-cookie-modal-popup --- */
.pr-cookie-modal.modal-popup .modal-inner-wrap{
position: absolute;
top: auto;
bottom: 0;
left: 0;
right: 0;
width: 100%;
padding: 25px 0;
margin: 0;
}
.pr-cookie-modal.modal-popup .pr-cookie-notice-wrap{
display: block;
}
.pr-cookie-modal.modal-popup .pr-cookie-notice-text,
.pr-cookie-modal-popup .pr-cookie-notice-text {
margin: 0 0 25px;
color: inherit;
}
.pr-cookie-modal.modal-popup .pr-cookie-notice-actions{
justify-content: space-around;
}
.pr-cookie-modal.modal-popup .pr-cookie-notice-actions .pr-cookie-notice-btn:last-child{
order: 0;
}
@media (min-width: 650px){
.pr-cookie-modal.modal-popup .modal-inner-wrap{
right: auto;
bottom: auto;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
max-width: 600px;
padding: 0 0 3rem;
}
}
@media (max-width: 480px){
.pr-cookie-modal.modal-popup .pr-cookie-notice-actions .pr-cookie-notice-btn{
margin-bottom: 15px;
}
.pr-cookie-modal.modal-popup .pr-cookie-notice-actions .pr-cookie-notice-btn:last-child{
margin-bottom: 0;
}
}
/* END --- pr-cookie-modal-wall pr-cookie-modal-popup --- */
@media (max-width: 375px) {
.modal-slide.pr-cookie-left-bar {
width: 100%;
}
.pr-cookie-left-bar .pr-actions-buttons .action {
min-width: 130px;
}
}
@media (min-width: 480px) {
.pr-cookie-notice-actions {
flex-direction: row;
justify-content: center;
}
.pr-cookie-notice-actions .pr-cookie-notice-btn {
margin-bottom: 0;
}
.pr-cookie-notice-actions .pr-cookie-notice-btn:last-child {
order: -1;
}
.pr-cookie-notice-actions .pr-cookie-notice-btn {
margin: 0 7.5px;
}
}
@media (min-width: 768px) {
.pr-cookie-modal-bottom .modal-inner-wrap{
padding-top: 15px;
padding-right: 50px;
}
.pr-cookie-notice-wrap {
display: flex;
justify-content: center;
align-items: center;
}
.pr-cookie-notice-actions {
flex-shrink: 0;
}
.pr-cookie-notice-text {
max-width: 850px;
margin-right: 25px;
}
.pr-cookie-notice-actions .pr-cookie-notice-btn {
margin-right: 10px;
}
.pr-cookie-notice-actions .pr-cookie-notice-btn:last-child {
margin-right: 0;
}
.pr-cookie-notice-text p {
font-size: 12px;
}
.pr-cookie-notice-actions .pr-cookie-notice-btn:last-child {
margin-right: 10px;
}
.pr-cookie-notice-actions {
margin-top: 0;
}
button.pr-cookie-close-modal {
top: 50%;
transform: translateY(-50%);
}
}
@keyframes slideup {
from {
opacity: 0;
transform: translatey(100%);
}
to {
opacity: 1;
transform: translatey(0);
}
}
@keyframes slidedown {
from {
opacity: 0;
transform: translatey(-30px);
}
to {
opacity: 1;
transform: translatey(0);
}
}
/************************************** ACCORDION_POPUP ********************************************/
.pr-cookie-details-modal{
top: 0;
left: 0;
right: 0;
bottom: 0;
position: fixed;
}
.pr-cookie-details-modal.modal-popup .modal-inner-wrap{
width: 100%;
height: 100%;
position: absolute;
padding: 3rem 1rem;
overflow: hidden;
z-index: 1;
border-radius: 5px;
border: 1px solid #232323;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
margin: 0;
}
.pr-cookie-details-modal .modal-inner-wrap .modal-content{
max-height: 100%;
overflow: auto;
padding: 0 1rem;
}
.pr-cookie-details-modal .pr-cookie-close,
.pr-cookie-modal .pr-cookie-close{
position: absolute;
top: 0;
right: 0;
background: transparent;
width: 40px;
height: 40px;
box-shadow: none;
border: none;
padding: 15px;
}
.pr-cookie-details-modal .pr-actions-buttons{
display: flex;
justify-content: center;
flex-wrap: wrap;
margin-bottom: 2rem;
padding-bottom: 3rem;
border-bottom: 3px solid #F0F0F0;
}
.pr-cookie-details-modal .pr-actions-buttons button{
margin: 6px;
min-height: 40px;
min-width: 130px;
box-shadow: none;
}
.pr-cookie-details-modal #pr-cookie-setting-bar .pr-cookie-title,
.pr-cookie-details-modal #pr-cookie-setting-bar .pr-cookie-manage-title{
text-align: center;
margin-bottom: 2rem;
margin-top: 0;
font-weight: 600;
font-size: 1.8rem;
}
.pr-cookie-details-modal .pr-cookie-description{
font-weight: 400;
font-size: 12px;
line-height: 16px;
color: #5C6670;
margin-bottom: 3rem;
}
.pr-cookie-details-modal .pr-cookie-description > p{
margin-bottom: 1.5rem;
}
.pr-cookie-details-modal .pr-cookie-description > p:last-of-type{
margin-bottom: 0;
}
.pr-cookie-details-modal #pr-cookie-setting-bar .message-system-list{
margin-bottom: 0;
}
.pr-cookie-details-modal .message-system-list > li{
margin-bottom: 1rem;
}
.pr-cookie-details-modal .message-system-list > li:last-child{
margin-bottom: 0;
}
.pr-cookie-details-modal .accordion-title{
background: #F0F4F7;
}
.pr-cookie-details-modal .accordion-title > .pr-cookie-option{
border-radius: 2px;
padding: 1.4rem;
margin-bottom: 0;
margin-top: 0;
justify-items: flex-start;
position: relative;
color: #2E4257;
}
.pr-cookie-details-modal .accordion-title > .pr-cookie-option:before{
content: "";
background: url("../images/accordionCaret.svg") center no-repeat;
background-size: contain;
width: 6px;
height: 11px;
font-weight: 700;
margin-right: 2rem;
flex-shrink: 0;
transition: all .2s ease;
}
.pr-cookie-details-modal .accordion-title.category-open > .pr-cookie-option:before{
transform: rotate(90deg);
}
.pr-cookie-details-modal .accordion-title > .pr-cookie-option:hover{
cursor: pointer;
}
#pr-cookie-setting-bar .option-label {
margin-right: 1rem;
}
.pr-cookie-details-modal .lvl1{
display: flex;
align-items: center;
margin-bottom: 1.5rem;
}
.pr-cookie-details-modal .first-details .pr-cookie-details{
font-weight: 400;
font-size: 1.1rem;
line-height: 15px;
color: #5F5F5F;
position: relative;
display: block;
flex-shrink: 0;
margin-right: 2rem;
}
.pr-cookie-details_line{
height: 1px;
background: #DEE5EB;
width: 100%;
}
.pr-cookie-details-modal .confirm.primary{
align-self: center;
min-height: 40px;
margin-top: 3.5rem;
}
.pr-cookie-details-modal .option-status,
.pr-cookie-details-modal .pr-cookie-switch{
position: relative;
z-index: 1;
margin-left: auto;
}
.pr-cookie-details-modal .pr-cookie-option .switch-area{
background: #B8C4CC;
border-color: #B8C4CC;
}
.pr-cookie-details-modal .pr-cookie-option .switch-label .switch-nob{
background: #fff;
}
.pr-cookie-details-modal .first-details{
display: none;
}
.pr-cookie-details-modal .category-open .first-details{
display: block;
animation: slidedown 0.3s;
padding: 2rem 2.4rem;
border-top: 1px solid #DEE5EB;;
}
.pr-cookie-details-modal .pr-cookies-list{
height: auto;
width: auto;
overflow:visible;
padding: 0;
margin: 0;
}
.pr-cookie-details-modal .pr-cookie-details-info{
padding: 0 1.5rem;
background: #FFFFFF;
border: 1px solid #DBE5EC;
border-radius: 2px 2px 0 0;
margin-bottom: -1px;
}
.pr-cookie-details-modal .pr-cookie-details-info .pr-cookie-details-title{
padding-left: 0;
padding-right: 10px;
}
.pr-cookie-details-modal .pr-cookie-details-info .pr-cookie-details-title:after{
content: "";
width: 3px;
height: 7px;
background: url("../images/accordionCaret1.svg") center no-repeat;
background-size: contain;
position: absolute;
top: 50%;
right: 0;
transform: translatey(-50%);
transition: 0.2s;
}
@media (min-width: 480px){
.pr-cookie-details-modal.modal-popup .modal-inner-wrap{
padding: 3rem 3rem 4rem 3rem;
height: 626px;
max-height:626px;
}
.pr-cookie-details-modal .modal-inner-wrap{
max-height: 80vh;
max-width: 800px;
}
}
@media (min-width: 768px) {
.pr-cookie-details-modal .pr-actions-buttons button{
margin: 0 6px;
}
.pr-cookie-details-modal .accordion-title > .pr-cookie-option{
padding: 1.4rem 2rem;
}
.pr-cookie-details-modal .accordion-title > .pr-cookie-option:before{
margin-right: 2rem;
}
.pr-cookie-details-modal #pr-cookie-setting-bar .option-label {
padding-left: 2rem;
}
.pr-cookie-details-modal .accordion-title > .pr-cookie-option:after{
content: '';
position: absolute;
left: calc(4rem + 6px);
top: 1rem;
bottom: 1rem;
width: 1px;
background: #DEE5EB;
}
.pr-cookie-details-modal .pr-cookie-option .switch-area {
min-width: 55px;
}
.pr-cookie-details-modal .pr-cookie-option .switch-label input:checked + .switch-area .switch-nob{
left: 100%;
transform: translateX(calc(-100% - 2px));
}
}
@@ -0,0 +1 @@
<svg width="6" height="11" fill="none" stroke="#2E4257" xmlns="http://www.w3.org/2000/svg"><path d="m1 1 4 4.5L1 10" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>

After

Width:  |  Height:  |  Size: 188 B

@@ -0,0 +1 @@
<svg width="3" height="7" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m.5 1 2 2.5L.5 6" stroke="#1979C3" stroke-linecap="round" stroke-linejoin="round"/></svg>

After

Width:  |  Height:  |  Size: 171 B

@@ -0,0 +1,10 @@
define([], function () {
'use strict';
/**
* @deprecated since 1.11.0 - no more used
*/
return function (s) {
return s;
};
});
@@ -0,0 +1,10 @@
define([], function () {
'use strict';
/**
* @deprecated since 1.11.0 - no more used
*/
return function (originReturnData) {
return originReturnData;
};
});
@@ -0,0 +1,127 @@
/**
* @package Plumrocket_CookieConsent
* @copyright Copyright (c) 2020 Plumrocket Inc. (https://plumrocket.com)
* @license https://plumrocket.com/license End-user License Agreement
*/
/**
* Finds and executes scripts in a newly added element's body.
* Needed since innerHTML does not run scripts.
*/
define(['prCookieConsentApi', 'domReady!'], function (prCookieConsentApi) {
'use strict';
function BodyScripts()
{
this.execute = function (element, idPrefix) {
var scripts = this.collectScriptsFromChildren(element);
this.executeScripts(scripts, 0, idPrefix);
};
this.executeScripts = function (scripts, i, idPrefix) {
var self = this;
var script = scripts[i];
if (script.parentNode) {
script.parentNode.removeChild(script);
}
this.evalScript(scripts[i], idPrefix + '_' + i, function () {
if (i < scripts.length-1) {
self.executeScripts(scripts, ++i, idPrefix);
}
});
}
this.nodeName = function (elem, name) {
return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
};
this.evalScript = function (elem, id, callback) {
var data = (elem.text || elem.textContent || elem.innerHTML || ''),
head = document.getElementsByTagName('head')[0] ||
document.documentElement;
var script = document.createElement('script');
script.type = "text/javascript";
if (id !== '') {
script.setAttribute('id', id);
}
if (elem.src !== '') {
script.src = elem.src;
head.appendChild(script);
// Then bind the event to the callback function.
// There are several events for cross browser compatibility.
script.onreadystatechange = callback;
script.onload = callback;
} else {
try {
// doesn't work on ie...
script.appendChild(document.createTextNode(data));
} catch (e) {
// IE has funky script nodes
script.text = data;
}
head.appendChild(script);
callback();
}
};
this.collectScriptsFromChildren = function (node) {
var scripts = [],
children_nodes = node.childNodes,
child,
i;
if (children_nodes === undefined) {
return;
}
for (i = 0; i<children_nodes.length; i++) {
child = children_nodes[i];
if (this.nodeName(child, 'script') &&
(!child.type || child.type.toLowerCase() === 'text/javascript')
) {
scripts.push(child);
} else {
var newScripts = this.collectScriptsFromChildren(child);
for (var j = 0; j < newScripts.length; j++) {
scripts.push(newScripts[j]);
}
}
}
return scripts;
};
/**
* Active <script type="pr_cookie_category/..."> scripts.
*
* Allowed types are:
* - pr_cookie_category/all
* - pr_cookie_category/{{category_name}}
*
* @param {HTMLScriptElement} notActiveScript
*/
this.activatePrCookieCategoryScript = function (notActiveScript) {
var cookieCategory = notActiveScript.type.replace('pr_cookie_category/', '');
var isScriptAllowed = ('all' === cookieCategory)
? prCookieConsentApi.isAllCategoriesAllowed()
: prCookieConsentApi.isAllowedCategory(cookieCategory);
if (isScriptAllowed) {
var script = document.createElement('script');
script.type = 'text/javascript';
if (notActiveScript.getAttribute('id')) {
script.setAttribute('id', notActiveScript.getAttribute('id'));
}
if (notActiveScript.src) {
script.src = notActiveScript.src;
} else {
script.text = notActiveScript.text;
}
notActiveScript.replaceWith(script);
}
};
}
return new BodyScripts();
});
@@ -0,0 +1,231 @@
/**
* @package Plumrocket_CookieConsent
* @copyright Copyright (c) 2020 Plumrocket Inc. (https://plumrocket.com)
* @license https://plumrocket.com/license End-user License Agreement
*/
define([
'underscore',
'ko',
'jquery',
'uiComponent',
'prCookieConsentApi',
'uiRegistry',
'Magento_Ui/js/modal/modal',
'text!Plumrocket_CookieConsent/template/notice/modal/modal-bottom.html',
'text!Plumrocket_CookieConsent/template/notice/modal/modal-popup.html',
'mage/translate',
'mage/cookies',
], function (_, ko, $, Component, prCookieConsentApi, uiRegistry, modal, modalBottomTpl, modalPopupTpl) {
'use strict';
var DISPLAY_STYLE_POPUP = 'popup';
var DISPLAY_STYLE_WALL = 'wall';
var DISPLAY_STYLE_BOTTOM = 'bottom';
return Component.extend({
/**
* @type {{
* titleColor: string,
* textColor: string,
* backgroundColor: string,
* overlayBackgroundColor: string,
* overlayBlur: boolean,
* }}
*/
design: {},
initialize: function (config) {
this._super();
this.createModal = _.once(this.createModal);
},
autoOpen: function () {
this.createModal();
if (false === prCookieConsentApi.canManageCookie()) {
return;
}
if (! prCookieConsentApi.isOptIn() && ! this.isDisabled()) {
this.getModal().openModal();
}
this.addStyles(this.design);
this.addChangingStyleOnHover($('.pr-cookie-notice-btn.allow'), this.acceptButtonConfig);
this.addChangingStyleOnHover($('.pr-cookie-notice-btn.decline'), this.declineButtonConfig);
this.addChangingStyleOnHover($('.pr-cookie-setting-btn'), this.settingsButtonConfig);
},
allowAll: function () {
prCookieConsentApi.consent.allowAllCategories();
this.getModal().closeModal();
},
declineAll: function () {
prCookieConsentApi.consent.declineAll();
this.getModal().closeModal();
},
openSettings: function () {
uiRegistry.get('pr-cookie-settings-bar').getModal().openModal();
},
/**
* @return {String}
*/
getDisplayStyle: function () {
return this.displayStyle;
},
createModal: function () {
var self = this;
var options = {
buttons: [],
modalClass: 'pr-cookie-modal pr-cookie-modal-' + this.getDisplayStyle(),
};
switch (this.getDisplayStyle()) {
case DISPLAY_STYLE_BOTTOM:
options = _.extendOwn(options, {
customTpl: modalBottomTpl,
type: 'custom',
overlayClass: 'pr-cookie-overlay',
parentModalClass: '',
modalVisibleClass: 'show-without-overlay',
keyEventHandlers: {
escapeKey: function () {}
}
});
break;
case DISPLAY_STYLE_WALL:
options = _.extendOwn(options, {
popupTpl: modalPopupTpl,
type: 'popup',
clickableOverlay: false,
canClose: false,
title: this.noticeTitle,
keyEventHandlers: {
escapeKey: function () {}
},
opened: function () {
self.design.overlayBlur && self.overlayBlur.enable();
},
closed: function () {
self.design.overlayBlur && self.overlayBlur.disable();
}
});
break;
case DISPLAY_STYLE_POPUP:
options = _.extendOwn(options, {
popupTpl: modalPopupTpl,
type: 'popup',
clickableOverlay: false,
canClose: true,
title: this.noticeTitle,
modalCloseBtnHandler: this.disableNotice.bind(this),
keyEventHandlers: {
escapeKey: this.disableNotice.bind(this)
},
opened: function () {
self.design.overlayBlur && self.overlayBlur.enable();
},
closed: function () {
self.design.overlayBlur && self.overlayBlur.disable();
},
});
break;
}
this.modal = modal(options, document.getElementById('pr-cookie-notice'));
},
getModal: function () {
this.createModal();
return this.modal;
},
/**
* Check if notice was closed by customer this day
*
* @return {boolean}
*/
isDisabled: function () {
return 'close' === $.mage.cookies.get(this.statusCookieName);
},
/**
* Temporally disable notice
* Don't execute on "closed" event because customer might close popup by accepting cookie
*/
disableNotice: function () {
$.mage.cookies.set(this.statusCookieName, 'close', {lifetime: 86400}); // one day
this.getModal().closeModal();
},
/**
* @param {any} $button
* @param {Object} config
* @param {string} config.type
* @param {string} config.text_color
* @param {string} config.text_color_on_hover
* @param {string} config.background_color
* @param {string} config.background_color_on_hover
* @param {string} config.link_color
* @param {string} config.link_color_on_hover
*/
addChangingStyleOnHover: function ($button, config) {
$button.on({
mouseenter: function () {
$(this).css({
'background-color': (config.type === 'link') ? '' : config.background_color_on_hover,
'border-color': (config.type === 'link') ? '' : config.background_color_on_hover,
'color': (config.type === 'link') ? config.link_color_on_hover : config.text_color_on_hover
})
},
mouseleave: function () {
$(this).css({
'background-color': (config.type === 'link') ? '' : config.background_color,
'border-color': (config.type === 'link') ? '' : config.background_color,
'color': (config.type === 'link') ? config.link_color : config.text_color
});
}
});
},
/**
*
* @param {{titleColor, textColor, backgroundColor, overlayBackgroundColor}} design
*/
addStyles: function (design) {
if (design.titleColor) {
$('.pr-cookie-modal .modal-title').css({'color': design.titleColor});
}
if (design.textColor) {
$('.pr-cookie-notice-text').css({'color': design.textColor});
}
var background = document.querySelector('.pr-cookie-modal > .modal-inner-wrap');
if (design.backgroundColor && background) {
background.style.backgroundColor = design.backgroundColor;
}
var overlayBackground = document.querySelector('.pr-cookie-modal + .modals-overlay');
if (design.overlayBackgroundColor && overlayBackground) {
overlayBackground.style.backgroundColor = design.overlayBackgroundColor;
}
},
overlayBlur: {
enable: function () {
document.querySelector('.page-wrapper').classList.add('blur-mode');
},
disable: function () {
document.querySelector('.page-wrapper').classList.remove('blur-mode');
}
}
});
});
@@ -0,0 +1,302 @@
/**
* @package Plumrocket_CookieConsent
* @copyright Copyright (c) 2020 Plumrocket Inc. (https://plumrocket.com)
* @license https://plumrocket.com/license End-user License Agreement
*/
define([
'underscore',
'ko',
'jquery',
'uiComponent',
'prCookieConsentApi',
'uiRegistry',
'Magento_Ui/js/modal/modal',
'text!Plumrocket_CookieConsent/template/settings/modal/modal-slide.html',
'text!Plumrocket_CookieConsent/template/settings/modal/modal-popup.html',
'mage/translate'
], function (_, ko, $, Component, prCookieConsentApi, uiRegistry, modal, modalSlideTpl, modalPopupTpl) {
'use strict';
var DISPLAY_STYLE_ACCORDION_POPUP = 'accordions_popup';
return Component.extend({
acceptButtonLabel: '',
/**
* Contains selected categories to confirm
*/
selectedCategories: [],
initialize: function (config) {
this._super();
this.createModal = _.once(this.createModal);
this.isDetailView = ko.observable(false);
this.currentCategory = ko.observable('');
_.each(this.categories, function (category) {
if (prCookieConsentApi.isAllowedCategory(category.key) || this.isPreChecked(category.key)) {
this.selectedCategories.push(category.key);
}
category.categoryVisible = ko.observable(false);
category.detailVisible = ko.observable(true);
}.bind(this));
this.initOpenCookieSettingsLinks('pr-open-cookie-settings');
prCookieConsentApi.consent.addCallback(this.reset.bind(this));
},
reset: function () {
this.isDetailView(false)
var categories = [];
_.each(this.categories, function (category) {
categories.push(category.key);
category.categoryVisible(false);
category.detailVisible(true);
}.bind(this));
_.each(
document.getElementById('pr-cookie-setting-bar').querySelectorAll('input[type="checkbox"]'),
function (checkbox) {
var categoryKey = checkbox.name;
if (! categories.includes(categoryKey)) {
return;
}
var shouldBeChecked = prCookieConsentApi.isAllowedCategory(categoryKey)
|| this.isPreChecked(categoryKey);
if (Boolean(shouldBeChecked) !== Boolean(checkbox.checked)) {
checkbox.checked = ! checkbox.checked;
}
}.bind(this)
)
},
isAllowed: function (categoryKey) {
return prCookieConsentApi.isAllowedCategory(categoryKey) || this.isPreChecked(categoryKey);
},
isPreChecked: function (categoryKey) {
return ! prCookieConsentApi.isOptIn() && this.getCategoryByKey(categoryKey).is_pre_checked;
},
/**
* Save Choices
*/
confirmChosen: function () {
prCookieConsentApi.consent.set(this.selectedCategories);
this.closeNotice();
this.getModal().closeModal();
},
/**
* Toggle is allowed category in local variable, to save chooses - use "this.confirmChosen"
*
* @param uiClass
* @param {jQuery.Event} jQueryEvent
*/
toggleSelectedCategory: function (uiClass, jQueryEvent) {
/** @type {HTMLInputElement} input */
var input = jQueryEvent.target;
var categoryKey = input.name;
if (input.checked) {
if (! this.selectedCategories.includes(categoryKey)) {
this.selectedCategories.push(categoryKey);
}
} else {
this.selectedCategories = _.without(this.selectedCategories, categoryKey);
}
},
createModal: function () {
var options = {
buttons: [],
};
switch (this.displayStyle) {
case DISPLAY_STYLE_ACCORDION_POPUP:
options = _.extendOwn(options, {
popupTpl: modalPopupTpl,
type: 'popup',
modalClass: 'pr-cookie-details-modal',
canClose: false
});
break;
default:
options = _.extendOwn(options, {
slideTpl: modalSlideTpl,
type: 'slide',
modalClass: 'pr-cookie-left-bar'
});
}
this.modal = modal(options, document.getElementById('pr-cookie-setting-bar'));
this.addChangingStyleOnHover($('#pr-cookie-setting-bar .action.confirm'), this.confirmButtonConfig);
this.addChangingStyleOnHover($('#pr-cookie-setting-bar .action.allow'), this.acceptButtonConfig);
this.addChangingStyleOnHover($('#pr-cookie-setting-bar .action.decline'), this.declineButtonConfig);
},
getModal: function () {
this.createModal();
return this.modal;
},
closeNotice: function () {
uiRegistry.get('pr-cookie-notice').getModal().closeModal();
},
/**
* @param $button
* @param {{type, text_color, text_color_on_hover, background_color, background_color_on_hover}} config
*/
addChangingStyleOnHover: function ($button, config) {
$button.on({
mouseenter: function () {
$(this).css({
'background-color': null !== config.background_color_on_hover ? config.background_color_on_hover : '',
'border-color': null !== config.background_color_on_hover ? config.background_color_on_hover : '',
'color': null !== config.text_color_on_hover ? config.text_color_on_hover : ''
})
},
mouseleave: function () {
$(this).css({
'background-color': null !== config.background_color ? config.background_color : '',
'border-color': null !== config.background_color ? config.background_color : '',
'color': null !== config.text_color ? config.text_color : ''
});
}
});
},
allowAll: function () {
prCookieConsentApi.consent.allowAllCategories();
this.closeNotice();
this.getModal().closeModal();
},
declineAll: function () {
prCookieConsentApi.consent.declineAll();
this.closeNotice();
this.getModal().closeModal();
},
showCookieDetails: function (uiClass, jQueryEvent) {
this.currentCategory(jQueryEvent.target.dataset.categoryKey);
this.isDetailView(true);
},
hideCookieDetails: function () {
this.isDetailView(false);
},
/**
* Get category by key
*
* @param {string} categoryKey
* @return {{}}
*/
getCategoryByKey: function (categoryKey) {
return _.find(this.categories, function (category) {
return category.key === categoryKey;
});
},
/**
* Get category name by key
*
* @param {string} categoryKey
* @return {string}
*/
getCategoryNameByKey: function (categoryKey) {
var category = this.getCategoryByKey(categoryKey);
return category ? category.name : categoryKey;
},
/**
* @param {string} categoryKey
* @return {[]}
*/
getGroupedCookies: function (categoryKey) {
var firstPartyCookies = [];
var thirdPartyCookies = [];
var result = [];
this.cookies.forEach(function (cookie) {
if (cookie.category_key === categoryKey) {
if (cookie.type === 'first') {
firstPartyCookies.push(cookie);
} else {
thirdPartyCookies.push(cookie);
}
}
});
if (firstPartyCookies.length > 0) {
result.push(
{
name: $.mage.__('First party'),
cookies: firstPartyCookies,
checkThirdParty: thirdPartyCookies.length > 0
}
);
}
var groupdThirdPartyCookies = thirdPartyCookies.reduce(function (cookiesByDomain, cookie) {
if (!cookiesByDomain[cookie.domain]) {
cookiesByDomain[cookie.domain] = [];
}
cookiesByDomain[cookie.domain].push(cookie);
return cookiesByDomain;
}, {});
_.each(groupdThirdPartyCookies, function (cookiesWithSameDomain) {
result.push({
name: cookiesWithSameDomain[0].domainLabel,
cookies: cookiesWithSameDomain,
checkThirdParty: thirdPartyCookies.length > 0
});
});
return result;
},
/**
* @param {string} categoryKey
* @return {boolean}
*/
isCategoryHasCookie: function (categoryKey) {
return _.some(this.cookies, function (cookie) {
return cookie.category_key === categoryKey;
});
},
closeModal: function () {
this.getModal().closeModal();
},
/**
* Add event listener to show this component (Settings Panel)
*
* We have added this logic to component to avoid separate js file loading
*
* @param openSettingsClass
*/
initOpenCookieSettingsLinks(openSettingsClass) {
$('body').on('click', function (event) {
if (event.target.classList.contains(openSettingsClass)) {
this.getModal().openModal();
}
}.bind(this));
},
toggleAccordion: function () {
this.categoryVisible(!this.categoryVisible())
},
toggleAccordionCookieDetails: function (data) {
this.detailVisible(!this.detailVisible());
},
});
});
@@ -0,0 +1,37 @@
/**
* @package Plumrocket_CookieConsent
* @copyright Copyright (c) 2022 Plumrocket Inc. (https://plumrocket.com)
* @license https://plumrocket.com/license End-user License Agreement
*/
define([
'jquery',
'prCookieConsentApi'
], function ($, prCookieConsentApi) {
'use strict';
/**
* @param {{
* categoryKey: string
* }} config
*/
return function (config) {
function changeNoCookieDomain()
{
var youtubeNoCookieIframes = $('iframe').filter(function () {
return this.src.indexOf('youtube-nocookie.com') !== -1;
});
youtubeNoCookieIframes.each(function (index, iframe) {
iframe.src = iframe.src.replace('youtube-nocookie.com', 'youtube.com');
});
}
prCookieConsentApi.userScript.execute(
function () {
changeNoCookieDomain(config);
},
config.categoryKey
);
}
});
@@ -0,0 +1,61 @@
<!--
/**
* Plumrocket Inc.
*
* NOTICE OF LICENSE
*
* This source file is subject to the End-user License Agreement
* that is available through the world-wide-web at this URL:
* http://wiki.plumrocket.net/wiki/EULA
* If you are unable to obtain it through the world-wide-web, please
* send an email to support@plumrocket.com so we can send you a copy immediately.
*
* @package Plumrocket_CookieConsent
* @copyright Copyright (c) 2020 Plumrocket Inc. (http://www.plumrocket.com)
* @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
*/
-->
<div id="pr-cookie-notice" afterRender="autoOpen()">
<div class="pr-cookie-notice-wrap">
<div class="pr-cookie-notice-text"
data-bind="html: noticeTextHtml"
></div>
<div class="actions pr-cookie-notice-actions">
<button click="allowAll" id="btn-cookie-allow" class="action allow primary pr-cookie-notice-btn"
data-bind="style: {
color: acceptButtonConfig.text_color,
backgroundColor: acceptButtonConfig.background_color,
borderColor: acceptButtonConfig.background_color
}"
>
<translate args="acceptButtonConfig.label"></translate>
</button>
<button click="declineAll" id="btn-cookie-decline" class="action decline pr-cookie-notice-btn" if="declineButtonConfig.enabled"
data-bind="style: {
color: declineButtonConfig.text_color,
backgroundColor: declineButtonConfig.background_color,
borderColor: declineButtonConfig.background_color
}"
>
<translate args="declineButtonConfig.label"></translate>
</button>
<button click="openSettings" class="action pr-cookie-notice-btn pr-cookie-setting-btn" if="settingsButtonConfig.enabled"
data-bind="css: {
'setting-link': settingsButtonConfig.type == 'link'
},
style: {
color: settingsButtonConfig.type === 'button' ? settingsButtonConfig.text_color : settingsButtonConfig.link_color,
backgroundColor: settingsButtonConfig.type === 'button' ? settingsButtonConfig.background_color : '',
borderColor: settingsButtonConfig.background_color
}"
>
<translate args="settingsButtonConfig.label"></translate>
</button>
</div>
</div>
<!-- ko if: getDisplayStyle() === 'bottom' -->
<button class="pr-cookie-close-modal" data-bind="click: disableNotice" aria-label="Close notice"></button>
<!-- /ko -->
</div>
@@ -0,0 +1,32 @@
<!--
/**
* Plumrocket Inc.
*
* NOTICE OF LICENSE
*
* This source file is subject to the End-user License Agreement
* that is available through the world-wide-web at this URL:
* http://wiki.plumrocket.net/wiki/EULA
* If you are unable to obtain it through the world-wide-web, please
* send an email to support@plumrocket.com so we can send you a copy immediately.
*
* @package Plumrocket_CookieConsent
* @copyright Copyright (c) 2020 Plumrocket Inc. (http://www.plumrocket.com)
* @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
*/
-->
<aside role="dialog"
class="modal-<%- data.type %> <%- data.modalClass %>
<% if(data.innerScroll){ %><%- data.innerScrollClass %><% } %>"
<% if(data.title){ %> aria-labelledby="modal-title-<%- data.id %>"<% } %>
aria-describedby="modal-content-<%- data.id %>"
data-role="modal"
data-type="<%- data.type %>"
tabindex="0">
<div data-role="focusable-start" tabindex="0"></div>
<div class="modal-inner-wrap" data-role="focusable-scope">
<div id="modal-content-<%- data.id %>" class="modal-content" data-role="content"></div>
</div>
<div data-role="focusable-end" tabindex="123"></div>
</aside>
@@ -0,0 +1,71 @@
<!--
/**
* Plumrocket Inc.
*
* NOTICE OF LICENSE
*
* This source file is subject to the End-user License Agreement
* that is available through the world-wide-web at this URL:
* http://wiki.plumrocket.net/wiki/EULA
* If you are unable to obtain it through the world-wide-web, please
* send an email to support@plumrocket.com so we can send you a copy immediately.
*
* @package Plumrocket_CookieConsent
* @copyright Copyright (c) 2020 Plumrocket Inc. (http://www.plumrocket.com)
* @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
*/
-->
<aside role="dialog"
class="modal-<%- data.type %> <%- data.modalClass %>
<% if(data.responsive){ %><%- data.responsiveClass %><% } %>
<% if(data.innerScroll){ %><%- data.innerScrollClass %><% } %>"
<% if(data.title){ %> aria-labelledby="modal-title-<%- data.id %>"<% } %>
aria-describedby="modal-content-<%- data.id %>"
data-role="modal"
data-type="<%- data.type %>"
tabindex="0">
<div data-role="focusable-start" tabindex="0"></div>
<div class="modal-inner-wrap"
data-role="focusable-scope">
<header class="modal-header">
<% if(data.title || data.subTitle){ %>
<h1 id="modal-title-<%- data.id %>" class="modal-title"
data-role="title">
<% if(data.title){ %>
<%= data.title %>
<% } %>
<% if(data.subTitle){ %>
<span class="modal-subtitle"
data-role="subtitle">
<%= data.subTitle %>
</span>
<% } %>
</h1>
<% if(data.canClose){ %>
<button
class="pr-cookie-close"
data-role="closeBtn"
type="button">
</button>
<% } %>
<% } %>
</header>
<div id="modal-content-<%- data.id %>"
class="modal-content"
data-role="content"></div>
<% if(data.buttons.length > 0){ %>
<footer class="modal-footer">
<% _.each(data.buttons, function(button) { %>
<button
class="<%- button.class %>"
type="button"
data-role="action"><span><%= button.text %></span></button>
<% }); %>
</footer>
<% } %>
</div>
<div data-role="focusable-end" tabindex="0"></div>
</aside>
@@ -0,0 +1,184 @@
<!--
/**
* @package Plumrocket_CookieConsent
* @copyright Copyright (c) 2022 Plumrocket Inc. (https://plumrocket.com)
* @license https://plumrocket.com/license End-user License Agreement
*/
-->
<div id="pr-cookie-setting-bar" afterRender="createModal()">
<div class="pr-cookie-setting-bar-wrap">
<button class="pr-cookie-close" click="closeModal" type="button" aria-label="close popup"></button>
<div class="pr-cookie-detail-view">
<h3 class="pr-cookie-title" data-bind="text: overview.title"></h3>
<div class="pr-cookie-description" data-bind="html: overview.text"></div>
<div class="pr-actions-buttons">
<button click="allowAll" class="action allow primary" type="button" data-role="action"
data-bind="style: {
color: acceptButtonConfig.text_color,
backgroundColor: acceptButtonConfig.background_color,
borderColor: acceptButtonConfig.background_color
}, text: acceptButtonConfig.label"
></button>
<button click="declineAll" class="action decline" type="button" data-role="action" if="declineButtonConfig.enabled"
data-bind="style: {
color: declineButtonConfig.text_color,
backgroundColor: declineButtonConfig.background_color,
borderColor: declineButtonConfig.background_color
}, text: declineButtonConfig.label"
></button>
</div>
<h3 class="pr-cookie-manage-title" data-bind="text: consentPreferences.header"></h3>
<ul class="message-system-list">
<li repeat="foreach: categories, item: 'category'">
<div data-bind="css: {'category-open': category().categoryVisible}" class="accordion-title">
<div class="pr-cookie-option" data-bind="click: toggleAccordion.bind(category())">
<strong class="option-label" data-bind="text: category().name"></strong>
<if args="category().is_essential">
<strong class="option-status" data-bind="text: consentPreferences.essential_category_status"></strong>
</if>
<ifnot args="category().is_essential">
<div class="pr-cookie-switch" data-role="switcher"
data-bind="click: function(){return true}, clickBubble: false">
<label class="switch-label" aria-label="Switch">
<input type="checkbox"
data-bind="
attr: {name: category().key},
checked: isAllowed(category().key),
event: {change: toggleSelectedCategory}
">
<div class="switch-area">
<div class="switch-nob"></div>
</div>
</label>
</div>
</ifnot>
</div>
<div class="first-details" data-bind="attr:{'open': category().detailVisible}">
<div class="pr-cookie-category-descrip" data-bind="text: category().description"></div>
<if args="canShowCookieDetails">
<div class="lvl1">
<span class="pr-cookie-details"
data-bind="
text: consentPreferences.cookie_details_link,
attr: {'data-category-key': category().key}"
>
</span>
<span class="pr-cookie-details_line"></span>
</div>
<div class="second-details">
<div if="category().detailVisible()">
<div class="pr-cookie-view">
<div class="pr-cookies-list">
<if args="isCategoryHasCookie(category().key)">
<div class="pr-cookie-item"
repeat="foreach: getGroupedCookies(category().key), item: 'group'">
<if args="$data.checkThirdParty">
<details class="pr-cookie-details-info">
<summary>
<h4 class="pr-cookie-details-title" data-bind="i18n: group().name"></h4>
</summary>
<div class="pr-cookie-group-wrp"
repeat="foreach: group().cookies, item: 'cookie'">
<div class="pr-cookie-group">
<div class="pr-cookie-group-row">
<span class="pr-cookie-property" data-bind="i18n: 'Name'"></span>
<span class="pr-cookie-property-value"
data-bind="text: cookie().name, attr: {title: cookie().name}"></span>
</div>
<div class="pr-cookie-group-row">
<span class="pr-cookie-property"
data-bind="i18n: 'Domain'"></span>
<span class="pr-cookie-property-value"
data-bind="text: cookie().domainLabel, attr: {title: cookie().domainLabel}"></span>
</div>
<div class="pr-cookie-group-row">
<span class="pr-cookie-property"
data-bind="i18n: 'Duration'"></span>
<span class="pr-cookie-property-value"
data-bind="text: cookie().durationLabel"></span>
</div>
<div class="pr-cookie-group-row">
<span class="pr-cookie-property" data-bind="i18n: 'Type'"></span>
<span data-bind="text: cookie().typeLabel"></span>
</div>
<div class="pr-cookie-group-row">
<span class="pr-cookie-property" data-bind="i18n: 'Category'"></span>
<span data-bind="text: getCategoryNameByKey(cookie().category_key)"></span>
</div>
<div class="pr-cookie-group-row">
<span class="pr-cookie-property" data-bind="i18n: 'Description'"></span>
<span data-bind="text: cookie().description"></span>
</div>
</div>
</div>
</details>
</if>
<ifnot args="$data.checkThirdParty">
<details class="pr-cookie-details-info" open>
<summary>
<h4 class="pr-cookie-details-title" data-bind="i18n: group().name"></h4>
</summary>
<div class="pr-cookie-group-wrp"
repeat="foreach: group().cookies, item: 'cookie'">
<div class="pr-cookie-group">
<div class="pr-cookie-group-row">
<span class="pr-cookie-property" data-bind="i18n: 'Name'"></span>
<span class="pr-cookie-property-value"
data-bind="text: cookie().name, attr: {title: cookie().name}"></span>
</div>
<div class="pr-cookie-group-row">
<span class="pr-cookie-property"
data-bind="i18n: 'Domain'"></span>
<span class="pr-cookie-property-value"
data-bind="text: cookie().domainLabel, attr: {title: cookie().domainLabel}"></span>
</div>
<div class="pr-cookie-group-row">
<span class="pr-cookie-property"
data-bind="i18n: 'Duration'"></span>
<span class="pr-cookie-property-value"
data-bind="text: cookie().durationLabel"></span>
</div>
<div class="pr-cookie-group-row">
<span class="pr-cookie-property" data-bind="i18n: 'Type'"></span>
<span data-bind="text: cookie().typeLabel"></span>
</div>
<div class="pr-cookie-group-row">
<span class="pr-cookie-property" data-bind="i18n: 'Category'"></span>
<span data-bind="text: getCategoryNameByKey(cookie().category_key)"></span>
</div>
<div class="pr-cookie-group-row">
<span class="pr-cookie-property" data-bind="i18n: 'Description'"></span>
<span data-bind="text: cookie().description"></span>
</div>
</div>
</div>
</details>
</ifnot>
</div>
</if>
<p ifnot="isCategoryHasCookie(category().key)">
<translate args="'There are no cookies.'"></translate>
</p>
</div>
</div>
</div>
</div>
</if>
</div>
</div>
</li>
</ul>
</div>
<button class="action confirm primary" click="confirmChosen"
data-bind="
style: {
color: confirmButtonConfig.text_color,
backgroundColor: confirmButtonConfig.background_color,
borderColor: confirmButtonConfig.background_color
},
text: confirmButtonConfig.label">
</button>
</div>
</div>
@@ -0,0 +1,154 @@
<!--
/**
* @package Plumrocket_CookieConsent
* @copyright Copyright (c) 2020 Plumrocket Inc. (https://plumrocket.com)
* @license https://plumrocket.com/license End-user License Agreement
*/
-->
<div id="pr-cookie-setting-bar" afterRender="createModal()">
<div class="pr-cookie-setting-bar-wrap">
<button class="pr-cookie-close" click="closeModal" type="button" aria-label="close popup"></button>
<div class="pr-cookie-detail-view" data-bind="visible: ! isDetailView()">
<h3 class="pr-cookie-title" data-bind="text: overview.title"></h3>
<div class="pr-cookie-description" data-bind="html: overview.text"></div>
<div class="pr-actions-buttons">
<button click="allowAll" class="action allow primary" type="button" data-role="action"
data-bind="style: {
color: acceptButtonConfig.text_color,
backgroundColor: acceptButtonConfig.background_color,
borderColor: acceptButtonConfig.background_color
}, text: acceptButtonConfig.label"
></button>
<button click="declineAll" class="action decline" type="button" data-role="action" if="declineButtonConfig.enabled"
data-bind="style: {
color: declineButtonConfig.text_color,
backgroundColor: declineButtonConfig.background_color,
borderColor: declineButtonConfig.background_color
}, text: declineButtonConfig.label"
></button>
</div>
<h3 class="pr-cookie-manage-title" data-bind="text: consentPreferences.header"></h3>
<ul class="message-system-list">
<li repeat="foreach: categories, item: 'category'">
<div class="pr-cookie-option">
<strong class="option-label">
<text args="category().name"></text>
</strong>
<if args="category().is_essential">
<strong class="option-status" data-bind="text: consentPreferences.essential_category_status"></strong>
</if>
<ifnot args="category().is_essential">
<div class="pr-cookie-switch" data-role="switcher">
<label class="switch-label" aria-label="Switch">
<input type="checkbox"
data-bind="
attr: {name: category().key},
checked: isAllowed(category().key),
event: {change: toggleSelectedCategory}
">
<div class="switch-area">
<div class="switch-nob"></div>
</div>
</label>
</div>
</ifnot>
</div>
<div class="pr-cookie-category-descrip">
<text args="category().description"></text>
</div>
<button if="canShowCookieDetails" class="pr-cookie-details"
data-bind="
text: consentPreferences.cookie_details_link,
attr: {'data-category-key': category().key},
click: showCookieDetails"
>
</button>
</li>
</ul>
</div>
<div if="isDetailView()">
<div class="pr-cookie-view">
<div class="pr-cookie-view-wrap">
<div class="pr-cookie-view-top">
<button class="pr-cookie-view-back" data-bind="
i18n: 'Back',
click: hideCookieDetails"
>
</button>
<strong data-bind="text: getCategoryNameByKey(currentCategory())"></strong>
</div>
<h3 class="pr-cookie-view-title" data-bind="i18n: 'Cookies List'"></h3>
</div>
<div class="pr-cookies-list">
<div class="pr-cookie-item" if="isCategoryHasCookie(currentCategory())" repeat="foreach: getGroupedCookies(currentCategory()), item: 'group'">
<details class="pr-cookie-details-info">
<summary>
<h4 class="pr-cookie-details-title" data-bind="i18n: group().name"></h4>
<span class="pr-cookie-group-view" data-bind="i18n: 'View Cookies'"></span>
</summary>
<div class="pr-cookie-group" repeat="foreach: group().cookies, item: 'cookie'">
<div class="pr-cookie-group-row">
<span class="pr-cookie-property" data-bind="i18n: 'Name'"></span>
<span
class="pr-cookie-property-value"
data-bind="
text: cookie().name,
attr: {title: cookie().name}"
>
</span>
</div>
<div class="pr-cookie-group-row">
<span class="pr-cookie-property" data-bind="i18n: 'Domain'"></span>
<span
class="pr-cookie-property-value"
data-bind="
text: cookie().domainLabel,
attr: {title: cookie().domainLabel}"
>
</span>
</div>
<div class="pr-cookie-group-row">
<span class="pr-cookie-property" data-bind="i18n: 'Duration'"></span>
<span
class="pr-cookie-property-value"
data-bind="text: cookie().durationLabel"
>
</span>
</div>
<div class="pr-cookie-group-row">
<span class="pr-cookie-property" data-bind="i18n: 'Type'"></span>
<span data-bind="text: cookie().typeLabel"></span>
</div>
<div class="pr-cookie-group-row">
<span class="pr-cookie-property" data-bind="i18n: 'Category'"></span>
<span data-bind="text: getCategoryNameByKey(cookie().category_key)"></span>
</div>
<div class="pr-cookie-group-row">
<span class="pr-cookie-property" data-bind="i18n: 'Description'"></span>
<span data-bind="text: cookie().description"></span>
</div>
</div>
</details>
</div>
<p ifnot="isCategoryHasCookie(currentCategory())">
<translate args="'There are no cookies.'"></translate>
</p>
</div>
</div>
</div>
<button class="action confirm primary" click="confirmChosen"
data-bind="style: {
color: confirmButtonConfig.text_color,
backgroundColor: confirmButtonConfig.background_color,
borderColor: confirmButtonConfig.background_color
}, text: confirmButtonConfig.label"
></button>
</div>
</div>
@@ -0,0 +1,36 @@
<!--
/**
* @package Plumrocket_CookieConsent
* @copyright Copyright (c) 2022 Plumrocket Inc. (https://plumrocket.com)
* @license https://plumrocket.com/license End-user License Agreement
*/
-->
<aside role="dialog"
class="modal-<%- data.type %> <%- data.modalClass %>
<% if(data.responsive){ %><%- data.responsiveClass %><% } %>
<% if(data.innerScroll){ %><%- data.innerScrollClass %><% } %>"
<% if(data.title){ %> aria-labelledby="modal-title-<%- data.id %>"<% } %>
aria-describedby="modal-content-<%- data.id %>"
data-role="modal"
data-type="<%- data.type %>"
tabindex="0">
<div data-role="focusable-start" tabindex="0"></div>
<div class="modal-inner-wrap"
data-role="focusable-scope">
<div id="modal-content-<%- data.id %>"
class="modal-content"
data-role="content"></div>
<% if(data.buttons.length > 0){ %>
<footer class="modal-footer">
<% _.each(data.buttons, function(button) { %>
<button
class="<%- button.class %>"
type="button"
data-role="action"><span><%= button.text %></span></button>
<% }); %>
</footer>
<% } %>
</div>
<div data-role="focusable-end" tabindex="0"></div>
</aside>
@@ -0,0 +1,33 @@
<!--
/**
* Plumrocket Inc.
*
* NOTICE OF LICENSE
*
* This source file is subject to the End-user License Agreement
* that is available through the world-wide-web at this URL:
* http://wiki.plumrocket.net/wiki/EULA
* If you are unable to obtain it through the world-wide-web, please
* send an email to support@plumrocket.com so we can send you a copy immediately.
*
* @package Plumrocket_CookieConsent
* @copyright Copyright (c) 2020 Plumrocket Inc. (http://www.plumrocket.com)
* @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
*/
-->
<aside role="dialog"
class="modal-<%- data.type %> <%- data.modalClass %>
<% if(data.innerScroll){ %><%- data.innerScrollClass %><% } %>"
<% if(data.title){ %> aria-labelledby="modal-title-<%- data.id %>"<% } %>
aria-describedby="modal-content-<%- data.id %>"
data-role="modal"
data-type="<%- data.type %>"
tabindex="0">
<div data-role="focusable-start" tabindex="0"></div>
<div class="modal-inner-wrap"
data-role="focusable-scope">
<div id="modal-content-<%- data.id %>" class="modal-content" data-role="content"></div>
</div>
<div data-role="focusable-end" tabindex="0"></div>
</aside>