ltsecurityinc安防产品在线商城代码
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
-->
|
||||
|
||||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
|
||||
<body>
|
||||
<referenceContainer name="content">
|
||||
<uiComponent name="pr_cookie_category_form"/>
|
||||
<referenceContainer name="page.main.actions">
|
||||
<block class="Magento\Backend\Block\Store\Switcher" name="pr.cookie.store.switcher" template="Magento_Backend::store/switcher.phtml"/>
|
||||
</referenceContainer>
|
||||
</referenceContainer>
|
||||
</body>
|
||||
</page>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
-->
|
||||
|
||||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
|
||||
<body>
|
||||
<referenceContainer name="content">
|
||||
<uiComponent name="pr_cookie_category_listing"/>
|
||||
</referenceContainer>
|
||||
</body>
|
||||
</page>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
-->
|
||||
|
||||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
|
||||
<body>
|
||||
<referenceContainer name="content">
|
||||
<uiComponent name="pr_cookie_consent_log_listing"/>
|
||||
</referenceContainer>
|
||||
</body>
|
||||
</page>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
-->
|
||||
|
||||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
|
||||
<head>
|
||||
<css src="Plumrocket_CookieConsent::css/cookie-item.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<referenceContainer name="content">
|
||||
<uiComponent name="pr_cookie_item_form"/>
|
||||
<referenceContainer name="page.main.actions">
|
||||
<block class="Magento\Backend\Block\Store\Switcher" name="pr.cookie.store.switcher" template="Magento_Backend::store/switcher.phtml"/>
|
||||
</referenceContainer>
|
||||
</referenceContainer>
|
||||
</body>
|
||||
</page>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
-->
|
||||
|
||||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
|
||||
<body>
|
||||
<referenceContainer name="content">
|
||||
<uiComponent name="pr_cookie_item_listing"/>
|
||||
</referenceContainer>
|
||||
</body>
|
||||
</page>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
-->
|
||||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
|
||||
<update handle="pr_system_config_element_notice"/>
|
||||
<head>
|
||||
<script src="Plumrocket_CookieConsent::js/system_config_edit.js" />
|
||||
<css src="Plumrocket_CookieConsent::css/system_config_edit.css" />
|
||||
<css src="Plumrocket_CookieConsent::css/chosen.css" />
|
||||
<css src="Plumrocket_ExtendedAdminUi::css/lib/pickr/monolith.min.css"/>
|
||||
<css src="Plumrocket_ExtendedAdminUi::css/image-radio-buttons.css"/>
|
||||
</head>
|
||||
</page>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Plumrocket_CookieConsent
|
||||
* @copyright Copyright (c) 2025 Plumrocket Inc. (https://plumrocket.com)
|
||||
* @license https://plumrocket.com/license End-user License Agreement
|
||||
*/
|
||||
|
||||
/** @var \Plumrocket\CookieConsent\Block\Adminhtml\System\Config\Form\UpgradeToProVersionNotice $block */
|
||||
?>
|
||||
|
||||
<div class="pr-cookie-notice-intro">
|
||||
<?= $block->escapeHtml($block->getNoticeIntro()) ?>
|
||||
</div>
|
||||
|
||||
<div class="pr-cookie-notice-body">
|
||||
<a href="https://plumrocket.com/customer/account/login" target="_blank" class="pr-button pr-update-to-pro-btn">Upgrade to Cookie Consent Pro</a>
|
||||
|
||||
<div class="pr-cookie-notice-details">
|
||||
<details class="pr-cookie-notice-accordion">
|
||||
<summary>
|
||||
<span class="pr-cookie-notice-accordion-title">
|
||||
Pay only the difference — here’s how
|
||||
</span>
|
||||
</summary>
|
||||
<div class="pr-cookie-notice-accordion-body">
|
||||
<p>You don’t need to buy the full version again – pay only the difference!</p>
|
||||
<ol>
|
||||
<li>Click the “Upgrade” button above and log in to your Plumrocket account.</li>
|
||||
<li>In your list of purchased extensions, find the Cookie Consent Extension.</li>
|
||||
<li>Click "Upgrade to Cookie Consent Pro."
|
||||
|
||||
<!-- tooltip -->
|
||||
<div class="admin__field-tooltip">
|
||||
<span class="admin__field-tooltip-action" data-toggle="tooltip" tabindex="0" title="Pro Features"></span>
|
||||
<div class="admin__field-tooltip-content">
|
||||
<img src="<?= $block->escapeUrl($block->getViewFileUrl('Plumrocket_CookieConsent::images/pro_features.png')) ?>"
|
||||
alt="<?= $block->escapeHtml(__('Pro Features')) ?>"
|
||||
width="577" height="354">
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
<p>Your discount will be applied automatically – no coupon code needed.</p>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,106 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
-->
|
||||
|
||||
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="js_config" xsi:type="array">
|
||||
<item name="provider" xsi:type="string">pr_cookie_category_form.pr_cookie_category_form_data_source</item>
|
||||
<item name="deps" xsi:type="string">pr_cookie_category_form.pr_cookie_category_form_data_source</item>
|
||||
</item>
|
||||
<item name="label" xsi:type="string" translate="true">Cookie Category</item>
|
||||
<item name="template" xsi:type="string">templates/form/collapsible</item>
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="dataScope" xsi:type="string">data</item>
|
||||
<item name="namespace" xsi:type="string">pr_cookie_category_form</item>
|
||||
</item>
|
||||
</argument>
|
||||
<settings>
|
||||
<buttons>
|
||||
<button name="save" class="Plumrocket\CookieConsent\Block\Adminhtml\Cookie\Category\Edit\Button\Save"/>
|
||||
<button name="delete" class="Plumrocket\CookieConsent\Block\Adminhtml\Cookie\Category\Edit\Button\Delete"/>
|
||||
<button name="back" class="Plumrocket\CookieConsent\Block\Adminhtml\Cookie\Category\Edit\Button\Back"/>
|
||||
</buttons>
|
||||
</settings>
|
||||
<dataSource name="pr_cookie_category_form_data_source">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="js_config" xsi:type="array">
|
||||
<item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
|
||||
</item>
|
||||
</argument>
|
||||
<argument name="dataProvider" xsi:type="configurableObject">
|
||||
<argument name="class" xsi:type="string">
|
||||
Plumrocket\CookieConsent\Ui\DataProvider\Cookie\Category\Form\DataProvider
|
||||
</argument>
|
||||
<argument name="name" xsi:type="string">pr_cookie_category_form_data_source</argument>
|
||||
<argument name="primaryFieldName" xsi:type="string">entity_id</argument>
|
||||
<argument name="requestFieldName" xsi:type="string">id</argument>
|
||||
</argument>
|
||||
</dataSource>
|
||||
<fieldset name="general">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="label" xsi:type="string"/>
|
||||
</item>
|
||||
</argument>
|
||||
|
||||
<field name="entity_id" sortOrder="0" formElement="input">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="visible" xsi:type="boolean">false</item>
|
||||
<item name="dataType" xsi:type="string">text</item>
|
||||
<item name="source" xsi:type="string">cookie_category</item>
|
||||
<item name="dataScope" xsi:type="string">entity_id</item>
|
||||
</item>
|
||||
</argument>
|
||||
</field>
|
||||
|
||||
<field name="key" formElement="input">
|
||||
<settings>
|
||||
<tooltip>
|
||||
<link>https://plumrocket.com/docs/magento-cookie-consent/v1/devguide/block-js-code</link>
|
||||
<description>See our Developer's Guide</description>
|
||||
</tooltip>
|
||||
</settings>
|
||||
</field>
|
||||
|
||||
<field name="description">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="rows" xsi:type="number">8</item>
|
||||
</item>
|
||||
</argument>
|
||||
</field>
|
||||
|
||||
<field name="head_scripts">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="rows" xsi:type="number">4</item>
|
||||
</item>
|
||||
</argument>
|
||||
</field>
|
||||
|
||||
<field name="footer_miscellaneous_html">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="rows" xsi:type="number">6</item>
|
||||
</item>
|
||||
</argument>
|
||||
</field>
|
||||
</fieldset>
|
||||
</form>
|
||||
@@ -0,0 +1,149 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
-->
|
||||
|
||||
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="js_config" xsi:type="array">
|
||||
<item name="provider" xsi:type="string">pr_cookie_category_listing.pr_cookie_category_listing_data_source</item>
|
||||
<item name="deps" xsi:type="string">pr_cookie_category_listing.pr_cookie_category_listing_data_source</item>
|
||||
</item>
|
||||
<item name="spinner" xsi:type="string">pr_cookie_category_listing_columns</item>
|
||||
<item name="acl" xsi:type="string">Plumrocket_CookieConsent::cookie_categories</item>
|
||||
<item name="buttons" xsi:type="array">
|
||||
<item name="add" xsi:type="array">
|
||||
<item name="name" xsi:type="string">add</item>
|
||||
<item name="label" xsi:type="string" translate="true">Add New Cookie Category</item>
|
||||
<item name="class" xsi:type="string">primary</item>
|
||||
<item name="url" xsi:type="string">*/*/new</item>
|
||||
</item>
|
||||
</item>
|
||||
</argument>
|
||||
<dataSource name="pr_cookie_category_listing_data_source">
|
||||
<argument name="dataProvider" xsi:type="configurableObject">
|
||||
<argument name="class" xsi:type="string">Plumrocket\CookieConsent\Ui\DataProvider\Cookie\Category\Listing\DataProvider</argument>
|
||||
<argument name="name" xsi:type="string">pr_cookie_category_listing_data_source</argument>
|
||||
<argument name="primaryFieldName" xsi:type="string">entity_id</argument>
|
||||
<argument name="requestFieldName" xsi:type="string">id</argument>
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
|
||||
<item name="update_url" xsi:type="url" path="mui/index/render"/>
|
||||
<item name="storageConfig" xsi:type="array">
|
||||
<item name="indexField" xsi:type="string">entity_id</item>
|
||||
</item>
|
||||
</item>
|
||||
</argument>
|
||||
</argument>
|
||||
</dataSource>
|
||||
<listingToolbar name="listing_top">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="sticky" xsi:type="boolean">false</item>
|
||||
</item>
|
||||
</argument>
|
||||
<bookmark name="bookmarks"/>
|
||||
<columnsControls name="columns_controls"/>
|
||||
<filters name="listing_filters">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="templates" xsi:type="array">
|
||||
<item name="filters" xsi:type="array">
|
||||
<item name="select" xsi:type="array">
|
||||
<item name="component" xsi:type="string">Magento_Ui/js/form/element/ui-select</item>
|
||||
<item name="template" xsi:type="string">ui/grid/filters/elements/ui-select</item>
|
||||
</item>
|
||||
</item>
|
||||
</item>
|
||||
</item>
|
||||
</argument>
|
||||
</filters>
|
||||
<paging name="listing_paging"/>
|
||||
</listingToolbar>
|
||||
<columns name="pr_cookie_category_listing_columns" class="Magento\Ui\Component\Listing\Columns">
|
||||
<selectionsColumn name="ids">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="resizeEnabled" xsi:type="boolean">false</item>
|
||||
<item name="resizeDefaultWidth" xsi:type="string">55</item>
|
||||
<item name="indexField" xsi:type="string">entity_id</item>
|
||||
</item>
|
||||
</argument>
|
||||
</selectionsColumn>
|
||||
|
||||
<column name="entity_id" sortOrder="10">
|
||||
<settings>
|
||||
<filter>textRange</filter>
|
||||
<label translate="true">ID</label>
|
||||
</settings>
|
||||
</column>
|
||||
|
||||
<column name="name" sortOrder="20">
|
||||
<settings>
|
||||
<addField>true</addField>
|
||||
<filter>text</filter>
|
||||
<label translate="true">Name</label>
|
||||
</settings>
|
||||
</column>
|
||||
|
||||
<column name="description" sortOrder="30">
|
||||
<settings>
|
||||
<addField>true</addField>
|
||||
<filter>text</filter>
|
||||
<label translate="true">Description</label>
|
||||
</settings>
|
||||
</column>
|
||||
|
||||
<column name="key" sortOrder="40">
|
||||
<settings>
|
||||
<addField>true</addField>
|
||||
<filter>text</filter>
|
||||
<label translate="true">Key</label>
|
||||
</settings>
|
||||
</column>
|
||||
|
||||
<column name="status" component="Magento_Ui/js/grid/columns/select" sortOrder="50">
|
||||
<settings>
|
||||
<options class="Plumrocket\CookieConsent\Model\Config\Source\CategoryStatus"/>
|
||||
<filter>select</filter>
|
||||
<dataType>select</dataType>
|
||||
<label translate="true">Status</label>
|
||||
</settings>
|
||||
</column>
|
||||
|
||||
<column name="is_essential" component="Magento_Ui/js/grid/columns/select" sortOrder="60">
|
||||
<settings>
|
||||
<options class="Magento\Config\Model\Config\Source\Yesno"/>
|
||||
<filter>select</filter>
|
||||
<dataType>select</dataType>
|
||||
<label translate="true">Is Essential</label>
|
||||
</settings>
|
||||
</column>
|
||||
|
||||
<actionsColumn name="actions" class="Plumrocket\CookieConsent\Ui\Component\Listing\Columns\Actions" sortOrder="100">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="editUrlPath" xsi:type="string">pr_cookie/category/edit</item>
|
||||
</item>
|
||||
</argument>
|
||||
<settings>
|
||||
<indexField>id</indexField>
|
||||
</settings>
|
||||
</actionsColumn>
|
||||
</columns>
|
||||
</listing>
|
||||
@@ -0,0 +1,148 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
-->
|
||||
|
||||
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="js_config" xsi:type="array">
|
||||
<item name="provider" xsi:type="string">pr_cookie_consent_log_listing.pr_cookie_consent_log_listing_data_source</item>
|
||||
<item name="deps" xsi:type="string">pr_cookie_consent_log_listing.pr_cookie_consent_log_listing_data_source</item>
|
||||
</item>
|
||||
<item name="spinner" xsi:type="string">pr_cookie_consent_log_listing_columns</item>
|
||||
<item name="acl" xsi:type="string">Plumrocket_CookieConsent::consent_log</item>
|
||||
</argument>
|
||||
<dataSource name="pr_cookie_consent_log_listing_data_source">
|
||||
<argument name="dataProvider" xsi:type="configurableObject">
|
||||
<argument name="class" xsi:type="string">Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider</argument>
|
||||
<argument name="name" xsi:type="string">pr_cookie_consent_log_listing_data_source</argument>
|
||||
<argument name="primaryFieldName" xsi:type="string">consent_id</argument>
|
||||
<argument name="requestFieldName" xsi:type="string">id</argument>
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
|
||||
<item name="update_url" xsi:type="url" path="mui/index/render"/>
|
||||
<item name="storageConfig" xsi:type="array">
|
||||
<item name="indexField" xsi:type="string">consent_id</item>
|
||||
</item>
|
||||
</item>
|
||||
</argument>
|
||||
</argument>
|
||||
</dataSource>
|
||||
<listingToolbar name="listing_top">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="sticky" xsi:type="boolean">false</item>
|
||||
</item>
|
||||
</argument>
|
||||
<bookmark name="bookmarks"/>
|
||||
<columnsControls name="columns_controls"/>
|
||||
<filters name="listing_filters">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="templates" xsi:type="array">
|
||||
<item name="filters" xsi:type="array">
|
||||
<item name="select" xsi:type="array">
|
||||
<item name="component" xsi:type="string">Magento_Ui/js/form/element/ui-select</item>
|
||||
<item name="template" xsi:type="string">ui/grid/filters/elements/ui-select</item>
|
||||
</item>
|
||||
</item>
|
||||
</item>
|
||||
</item>
|
||||
</argument>
|
||||
</filters>
|
||||
<paging name="listing_paging"/>
|
||||
</listingToolbar>
|
||||
<columns name="pr_cookie_consent_log_listing_columns" class="Magento\Ui\Component\Listing\Columns">
|
||||
<column name="consent_id" sortOrder="10">
|
||||
<settings>
|
||||
<filter>textRange</filter>
|
||||
<label translate="true">ID</label>
|
||||
</settings>
|
||||
</column>
|
||||
<column name="customer_id" sortOrder="20">
|
||||
<settings>
|
||||
<filter>text</filter>
|
||||
<label translate="true">Customer Id</label>
|
||||
</settings>
|
||||
</column>
|
||||
<column name="customer_name" class="Plumrocket\CookieConsent\Ui\Component\Listing\Columns\Link">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="filter" xsi:type="string">text</item>
|
||||
<item name="label" xsi:type="string" translate="true">Customer Name</item>
|
||||
<item name="visible" xsi:type="boolean">true</item>
|
||||
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
|
||||
<item name="href" xsi:type="array">
|
||||
<item name="path" xsi:type="string">customer/index/edit</item>
|
||||
<item name="identifier" xsi:type="string">id</item>
|
||||
<item name="source" xsi:type="string">customer_id</item>
|
||||
</item>
|
||||
<item name="title" xsi:type="array">
|
||||
<item name="source" xsi:type="string">customer_name</item>
|
||||
<item name="require" xsi:type="string">customer_exist</item>
|
||||
</item>
|
||||
</item>
|
||||
</argument>
|
||||
</column>
|
||||
<column name="merge_email">
|
||||
<settings>
|
||||
<filter>text</filter>
|
||||
<label translate="true">Email</label>
|
||||
</settings>
|
||||
</column>
|
||||
<column name="website">
|
||||
<settings>
|
||||
<filter>text</filter>
|
||||
<label translate="true">Website</label>
|
||||
</settings>
|
||||
</column>
|
||||
<column name="settings" class="Plumrocket\CookieConsent\Ui\Component\Listing\Columns\Settings">
|
||||
<settings>
|
||||
<label translate="true">Settings</label>
|
||||
<bodyTmpl>ui/grid/cells/html</bodyTmpl>
|
||||
<sortable>false</sortable>
|
||||
</settings>
|
||||
</column>
|
||||
<column name="created_at" class="Magento\Ui\Component\Listing\Columns\Date" component="Magento_Ui/js/grid/columns/date">
|
||||
<settings>
|
||||
<filter>dateRange</filter>
|
||||
<dataType>date</dataType>
|
||||
<sorting>desc</sorting>
|
||||
<label translate="true">Date of Consent</label>
|
||||
</settings>
|
||||
</column>
|
||||
<column name="url">
|
||||
<settings>
|
||||
<filter>text</filter>
|
||||
<label translate="true">Url</label>
|
||||
</settings>
|
||||
</column>
|
||||
<column name="ip_address">
|
||||
<settings>
|
||||
<filter>text</filter>
|
||||
<label translate="true">IP Address</label>
|
||||
</settings>
|
||||
</column>
|
||||
<column name="user_agent">
|
||||
<settings>
|
||||
<filter>text</filter>
|
||||
<label translate="true">User Agent</label>
|
||||
</settings>
|
||||
</column>
|
||||
</columns>
|
||||
</listing>
|
||||
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
-->
|
||||
|
||||
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="js_config" xsi:type="array">
|
||||
<item name="provider" xsi:type="string">pr_cookie_item_form.pr_cookie_item_form_data_source</item>
|
||||
<item name="deps" xsi:type="string">pr_cookie_item_form.pr_cookie_item_form_data_source</item>
|
||||
</item>
|
||||
<item name="label" xsi:type="string" translate="true">Cookie Category</item>
|
||||
<item name="template" xsi:type="string">templates/form/collapsible</item>
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="dataScope" xsi:type="string">data</item>
|
||||
<item name="namespace" xsi:type="string">pr_cookie_item_form</item>
|
||||
</item>
|
||||
</argument>
|
||||
<settings>
|
||||
<buttons>
|
||||
<button name="save" class="Plumrocket\CookieConsent\Block\Adminhtml\Cookie\Item\Edit\Button\Save"/>
|
||||
<button name="delete" class="Plumrocket\CookieConsent\Block\Adminhtml\Cookie\Item\Edit\Button\Delete"/>
|
||||
<button name="back" class="Plumrocket\CookieConsent\Block\Adminhtml\Cookie\Item\Edit\Button\Back"/>
|
||||
</buttons>
|
||||
</settings>
|
||||
<dataSource name="pr_cookie_item_form_data_source">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="js_config" xsi:type="array">
|
||||
<item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
|
||||
</item>
|
||||
</argument>
|
||||
<argument name="dataProvider" xsi:type="configurableObject">
|
||||
<argument name="class" xsi:type="string">Plumrocket\CookieConsent\Ui\DataProvider\Cookie\Item\Form\DataProvider</argument>
|
||||
<argument name="name" xsi:type="string">pr_cookie_item_form_data_source</argument>
|
||||
<argument name="primaryFieldName" xsi:type="string">entity_id</argument>
|
||||
<argument name="requestFieldName" xsi:type="string">id</argument>
|
||||
</argument>
|
||||
</dataSource>
|
||||
<fieldset name="general">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="label" xsi:type="string"/>
|
||||
</item>
|
||||
</argument>
|
||||
|
||||
<field name="entity_id" sortOrder="0" formElement="input">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="visible" xsi:type="boolean">false</item>
|
||||
<item name="dataType" xsi:type="string">text</item>
|
||||
<item name="source" xsi:type="string">cookie_item</item>
|
||||
<item name="dataScope" xsi:type="string">entity_id</item>
|
||||
</item>
|
||||
</argument>
|
||||
</field>
|
||||
|
||||
<field name="type" component="Plumrocket_CookieConsent/js/form/element/cookie-type-depended-select"/>
|
||||
|
||||
<container name="duration_group" component="Magento_Ui/js/form/components/group">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="type" xsi:type="string">group</item>
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="additionalClasses" xsi:type="string">admin__control-grouped</item>
|
||||
<item name="breakLine" xsi:type="boolean">false</item>
|
||||
</item>
|
||||
</argument>
|
||||
<field name="duration">
|
||||
<settings>
|
||||
<additionalClasses>
|
||||
<class name="admin__field-small">true</class>
|
||||
</additionalClasses>
|
||||
</settings>
|
||||
</field>
|
||||
<field name="duration-period" formElement="select">
|
||||
<settings>
|
||||
<additionalClasses>
|
||||
<class name="admin__field-small">true</class>
|
||||
</additionalClasses>
|
||||
</settings>
|
||||
<formElements>
|
||||
<select>
|
||||
<settings>
|
||||
<options class="Plumrocket\CookieConsent\Model\Cookie\Attribute\DurationDecorator"/>
|
||||
</settings>
|
||||
</select>
|
||||
</formElements>
|
||||
</field>
|
||||
</container>
|
||||
</fieldset>
|
||||
</form>
|
||||
@@ -0,0 +1,160 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
-->
|
||||
|
||||
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="js_config" xsi:type="array">
|
||||
<item name="provider" xsi:type="string">pr_cookie_item_listing.pr_cookie_item_listing_data_source</item>
|
||||
<item name="deps" xsi:type="string">pr_cookie_item_listing.pr_cookie_item_listing_data_source</item>
|
||||
</item>
|
||||
<item name="spinner" xsi:type="string">pr_cookie_item_listing_columns</item>
|
||||
<item name="acl" xsi:type="string">Plumrocket_CookieConsent::cookies</item>
|
||||
<item name="buttons" xsi:type="array">
|
||||
<item name="add" xsi:type="array">
|
||||
<item name="name" xsi:type="string">add</item>
|
||||
<item name="label" xsi:type="string" translate="true">Add Cookie</item>
|
||||
<item name="class" xsi:type="string">primary</item>
|
||||
<item name="url" xsi:type="string">*/*/new</item>
|
||||
</item>
|
||||
</item>
|
||||
</argument>
|
||||
<dataSource name="pr_cookie_item_listing_data_source">
|
||||
<argument name="dataProvider" xsi:type="configurableObject">
|
||||
<argument name="class" xsi:type="string">Plumrocket\CookieConsent\Ui\DataProvider\Cookie\Item\Listing\DataProvider</argument>
|
||||
<argument name="name" xsi:type="string">pr_cookie_item_listing_data_source</argument>
|
||||
<argument name="primaryFieldName" xsi:type="string">entity_id</argument>
|
||||
<argument name="requestFieldName" xsi:type="string">id</argument>
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
|
||||
<item name="update_url" xsi:type="url" path="mui/index/render"/>
|
||||
<item name="storageConfig" xsi:type="array">
|
||||
<item name="indexField" xsi:type="string">entity_id</item>
|
||||
</item>
|
||||
</item>
|
||||
</argument>
|
||||
</argument>
|
||||
</dataSource>
|
||||
<listingToolbar name="listing_top">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="sticky" xsi:type="boolean">false</item>
|
||||
</item>
|
||||
</argument>
|
||||
<bookmark name="bookmarks"/>
|
||||
<columnsControls name="columns_controls"/>
|
||||
<filters name="listing_filters">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="templates" xsi:type="array">
|
||||
<item name="filters" xsi:type="array">
|
||||
<item name="select" xsi:type="array">
|
||||
<item name="component" xsi:type="string">Magento_Ui/js/form/element/ui-select</item>
|
||||
<item name="template" xsi:type="string">ui/grid/filters/elements/ui-select</item>
|
||||
</item>
|
||||
</item>
|
||||
</item>
|
||||
</item>
|
||||
</argument>
|
||||
</filters>
|
||||
<massaction name="listing_massaction">
|
||||
<action name="delete">
|
||||
<settings>
|
||||
<confirm>
|
||||
<message translate="true">Are you sure you want to delete selected cookies?</message>
|
||||
<title translate="true">Delete cookies</title>
|
||||
</confirm>
|
||||
<url path="*/*/massDelete"/>
|
||||
<type>delete</type>
|
||||
<label translate="true">Delete</label>
|
||||
</settings>
|
||||
</action>
|
||||
</massaction>
|
||||
<paging name="listing_paging"/>
|
||||
</listingToolbar>
|
||||
<columns name="pr_cookie_item_listing_columns" class="Magento\Ui\Component\Listing\Columns">
|
||||
<selectionsColumn name="ids">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="resizeEnabled" xsi:type="boolean">false</item>
|
||||
<item name="resizeDefaultWidth" xsi:type="string">55</item>
|
||||
<item name="indexField" xsi:type="string">entity_id</item>
|
||||
</item>
|
||||
</argument>
|
||||
</selectionsColumn>
|
||||
|
||||
<column name="entity_id" sortOrder="10">
|
||||
<settings>
|
||||
<filter>textRange</filter>
|
||||
<label translate="true">ID</label>
|
||||
</settings>
|
||||
</column>
|
||||
|
||||
<column name="name" sortOrder="20">
|
||||
<settings>
|
||||
<addField>true</addField>
|
||||
<filter>text</filter>
|
||||
<label translate="true">Name</label>
|
||||
</settings>
|
||||
</column>
|
||||
|
||||
<column name="domain_label" sortOrder="30">
|
||||
<settings>
|
||||
<addField>true</addField>
|
||||
<label translate="true">Domain</label>
|
||||
</settings>
|
||||
</column>
|
||||
|
||||
<column name="duration" class="Plumrocket\CookieConsent\Ui\Component\Listing\Columns\Duration" sortOrder="40">
|
||||
<settings>
|
||||
<addField>true</addField>
|
||||
<label translate="true">Duration</label>
|
||||
</settings>
|
||||
</column>
|
||||
|
||||
<column name="type" component="Magento_Ui/js/grid/columns/select" sortOrder="50">
|
||||
<settings>
|
||||
<options class="Plumrocket\CookieConsent\Model\Cookie\Attribute\Source\Type"/>
|
||||
<filter>select</filter>
|
||||
<dataType>select</dataType>
|
||||
<label translate="true">Type</label>
|
||||
</settings>
|
||||
</column>
|
||||
|
||||
<column name="category_key" component="Magento_Ui/js/grid/columns/select" sortOrder="60">
|
||||
<settings>
|
||||
<options class="Plumrocket\CookieConsent\Model\Cookie\Attribute\Source\CategoryKey"/>
|
||||
<filter>select</filter>
|
||||
<dataType>select</dataType>
|
||||
<label translate="true">Category</label>
|
||||
</settings>
|
||||
</column>
|
||||
|
||||
<actionsColumn name="actions" class="Plumrocket\CookieConsent\Ui\Component\Listing\Columns\Actions" sortOrder="100">
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="config" xsi:type="array">
|
||||
<item name="editUrlPath" xsi:type="string">pr_cookie/item/edit</item>
|
||||
</item>
|
||||
</argument>
|
||||
<settings>
|
||||
<indexField>id</indexField>
|
||||
</settings>
|
||||
</actionsColumn>
|
||||
</columns>
|
||||
</listing>
|
||||
@@ -0,0 +1,467 @@
|
||||
/*!
|
||||
Chosen, a Select Box Enhancer for jQuery and Prototype
|
||||
by Patrick Filler for Harvest, http://getharvest.com
|
||||
|
||||
Version 1.8.7
|
||||
Full source at https://github.com/harvesthq/chosen
|
||||
Copyright (c) 2011-2018 Harvest http://getharvest.com
|
||||
|
||||
MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
|
||||
This file is generated by `grunt build`, do not edit it by hand.
|
||||
*/
|
||||
.chosen-container {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
font-size: 13px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none
|
||||
}
|
||||
|
||||
.chosen-container * {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box
|
||||
}
|
||||
|
||||
.chosen-container .chosen-drop {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
z-index: 1010;
|
||||
width: 100%;
|
||||
-webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
||||
clip: rect(0, 0, 0, 0);
|
||||
-webkit-clip-path: inset(100% 100%);
|
||||
clip-path: inset(100% 100%);
|
||||
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #007bdb;
|
||||
border-radius: 1px;
|
||||
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
|
||||
color: #41362f;
|
||||
font-weight: 400;
|
||||
left: 0;
|
||||
list-style: none;
|
||||
margin: 2px 0 0;
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.chosen-container.chosen-with-drop .chosen-drop {
|
||||
clip: auto;
|
||||
-webkit-clip-path: none;
|
||||
clip-path: none
|
||||
}
|
||||
|
||||
.chosen-container a {
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
.chosen-container .chosen-single .group-name, .chosen-container .search-choice .group-name {
|
||||
margin-right: 4px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-weight: 400;
|
||||
color: #999
|
||||
}
|
||||
|
||||
.chosen-container .chosen-single .group-name:after, .chosen-container .search-choice .group-name:after {
|
||||
content: ":";
|
||||
padding-left: 2px;
|
||||
vertical-align: top
|
||||
}
|
||||
|
||||
.chosen-container-single .chosen-single {
|
||||
position: relative;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
padding: 0 0 0 8px;
|
||||
height: 25px;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 5px;
|
||||
background-color: #fff;
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #fff), color-stop(50%, #f6f6f6), color-stop(52%, #eee), to(#f4f4f4));
|
||||
background: linear-gradient(#fff 20%, #f6f6f6 50%, #eee 52%, #f4f4f4 100%);
|
||||
background-clip: padding-box;
|
||||
-webkit-box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, .1);
|
||||
box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, .1);
|
||||
color: #444;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
line-height: 24px
|
||||
}
|
||||
|
||||
.chosen-container-single .chosen-default {
|
||||
color: #999
|
||||
}
|
||||
|
||||
.chosen-container-single .chosen-single span {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
margin-right: 26px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap
|
||||
}
|
||||
|
||||
.chosen-container-single .chosen-single-with-deselect span {
|
||||
margin-right: 38px
|
||||
}
|
||||
|
||||
.chosen-container-single .chosen-single abbr {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
right: 26px;
|
||||
display: block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background: url(../images/chosen-sprite.png) -42px 1px no-repeat;
|
||||
font-size: 1px
|
||||
}
|
||||
|
||||
.chosen-container-single .chosen-single abbr:hover {
|
||||
background-position: -42px -10px
|
||||
}
|
||||
|
||||
.chosen-container-single.chosen-disabled .chosen-single abbr:hover {
|
||||
background-position: -42px -10px
|
||||
}
|
||||
|
||||
.chosen-container-single .chosen-single div {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
display: block;
|
||||
width: 18px;
|
||||
height: 100%
|
||||
}
|
||||
|
||||
.chosen-container-single .chosen-single div b {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url(../images/chosen-sprite.png) no-repeat 0 2px
|
||||
}
|
||||
|
||||
.chosen-container-single .chosen-search {
|
||||
position: relative;
|
||||
z-index: 1010;
|
||||
margin: 0;
|
||||
padding: 3px 4px;
|
||||
white-space: nowrap
|
||||
}
|
||||
|
||||
.chosen-container-single .chosen-search input[type=text] {
|
||||
margin: 1px 0;
|
||||
padding: 4px 20px 4px 5px;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
outline: 0;
|
||||
border: 1px solid #aaa;
|
||||
background: url(../images/chosen-sprite.png) no-repeat 100% -20px;
|
||||
font-size: 1em;
|
||||
font-family: sans-serif;
|
||||
line-height: normal;
|
||||
border-radius: 0
|
||||
}
|
||||
|
||||
.chosen-container-single .chosen-drop {
|
||||
margin-top: -1px;
|
||||
border-radius: 0 0 4px 4px;
|
||||
background-clip: padding-box
|
||||
}
|
||||
|
||||
.chosen-container-single.chosen-container-single-nosearch .chosen-search {
|
||||
position: absolute;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
-webkit-clip-path: inset(100% 100%);
|
||||
clip-path: inset(100% 100%)
|
||||
}
|
||||
|
||||
.chosen-container .chosen-results {
|
||||
color: #444;
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
margin: 0 4px 4px 0;
|
||||
padding: 0 0 0 4px;
|
||||
max-height: 240px;
|
||||
-webkit-overflow-scrolling: touch
|
||||
}
|
||||
|
||||
.chosen-container .chosen-results li {
|
||||
display: none;
|
||||
margin: 0;
|
||||
padding: 5px 6px;
|
||||
list-style: none;
|
||||
line-height: 15px;
|
||||
word-wrap: break-word;
|
||||
-webkit-touch-callout: none
|
||||
}
|
||||
|
||||
.chosen-container .chosen-results li.active-result {
|
||||
display: list-item;
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
.chosen-container .chosen-results li.disabled-result {
|
||||
display: list-item;
|
||||
color: #ccc;
|
||||
cursor: default
|
||||
}
|
||||
|
||||
.chosen-container .chosen-results li.highlighted {
|
||||
background-image: linear-gradient(#e3e3e3 20%, #e3e3e3 90%);
|
||||
background-color: #e3e3e3;
|
||||
}
|
||||
|
||||
.chosen-container .chosen-results li.no-results {
|
||||
color: #777;
|
||||
display: list-item;
|
||||
background: #f4f4f4
|
||||
}
|
||||
|
||||
.chosen-container .chosen-results li.group-result {
|
||||
display: list-item;
|
||||
font-weight: 700;
|
||||
cursor: default
|
||||
}
|
||||
|
||||
.chosen-container .chosen-results li {
|
||||
padding: .6875em 1em;
|
||||
}
|
||||
|
||||
.chosen-container .chosen-results li em {
|
||||
font-style: normal;
|
||||
text-decoration: underline
|
||||
}
|
||||
|
||||
.chosen-container-multi .chosen-choices {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
border: 1px solid #aaa;
|
||||
background-color: #fff;
|
||||
cursor: text
|
||||
}
|
||||
|
||||
.chosen-container-multi .chosen-choices li {
|
||||
float: left;
|
||||
list-style: none
|
||||
}
|
||||
|
||||
.chosen-container-multi .chosen-choices li.search-field {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
white-space: nowrap
|
||||
}
|
||||
|
||||
.chosen-container-multi .chosen-choices li.search-field input[type=text] {
|
||||
margin: 1px 0;
|
||||
height: 25px;
|
||||
outline: 0;
|
||||
border: 0 !important;
|
||||
background: 0 0 !important;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
color: #999;
|
||||
font-size: 100%;
|
||||
font-family: sans-serif;
|
||||
line-height: normal;
|
||||
border-radius: 0;
|
||||
width: 25px
|
||||
}
|
||||
|
||||
.chosen-container-multi .chosen-choices li.search-choice,
|
||||
.chosen-container-multi .chosen-choices li.search-choice-disabled {
|
||||
background-color: #f5f5f5;
|
||||
border: 1px solid #a79d95;
|
||||
border-radius: 1px;
|
||||
display: inline-block;
|
||||
font-size: 1.2rem;
|
||||
margin: 0.3rem;
|
||||
padding: 0.3rem 2.4rem 0.4rem 1rem;
|
||||
position: relative;
|
||||
transition: border-color 0.1s linear;
|
||||
}
|
||||
|
||||
.chosen-container-multi .chosen-choices li.search-choice span {
|
||||
word-wrap: break-word
|
||||
}
|
||||
|
||||
.chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
|
||||
bottom: 0;
|
||||
font-size: .5em;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 2rem;
|
||||
display: inline-block;
|
||||
padding: 0.6rem 1em 0.6rem;
|
||||
text-align: center;
|
||||
vertical-align: baseline;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-family: 'Admin Icons', sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
speak: none;
|
||||
color: #514943;
|
||||
text-decoration: none;
|
||||
|
||||
}
|
||||
.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:before {
|
||||
content: '\e62f';
|
||||
transition: color 0.1s linear;
|
||||
}
|
||||
|
||||
.chosen-container-multi .chosen-choices li.search-choice-disabled {
|
||||
padding-right: 1rem;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.chosen-container-multi .chosen-choices li.search-choice-focus {
|
||||
background: #d4d4d4
|
||||
}
|
||||
|
||||
.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
|
||||
background-position: -42px -10px
|
||||
}
|
||||
|
||||
.chosen-container-multi .chosen-results {
|
||||
margin: 0;
|
||||
padding: 0
|
||||
}
|
||||
|
||||
.chosen-container-multi .chosen-drop .result-selected {
|
||||
display: list-item;
|
||||
background-color: #e0f6fe;
|
||||
cursor: default
|
||||
}
|
||||
|
||||
.chosen-container-active .chosen-single {
|
||||
border-color: #007bdb;
|
||||
}
|
||||
|
||||
.chosen-container-active.chosen-with-drop .chosen-single {
|
||||
border: 1px solid #aaa;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.chosen-container-active.chosen-with-drop .chosen-single div {
|
||||
border-left: none;
|
||||
background: 0 0
|
||||
}
|
||||
|
||||
.chosen-container-active.chosen-with-drop .chosen-single div b {
|
||||
background-position: -18px 2px
|
||||
}
|
||||
|
||||
.chosen-container-active .chosen-choices {
|
||||
border-color: #007bdb;
|
||||
}
|
||||
|
||||
.chosen-container-active .chosen-choices li.search-field input[type=text] {
|
||||
color: #222 !important
|
||||
}
|
||||
|
||||
.chosen-disabled {
|
||||
opacity: .5 !important;
|
||||
cursor: default
|
||||
}
|
||||
|
||||
.chosen-disabled .chosen-single {
|
||||
cursor: default
|
||||
}
|
||||
|
||||
.chosen-disabled .chosen-choices .search-choice .search-choice-close {
|
||||
cursor: default
|
||||
}
|
||||
|
||||
.chosen-rtl {
|
||||
text-align: right
|
||||
}
|
||||
|
||||
.chosen-rtl .chosen-single {
|
||||
overflow: visible;
|
||||
padding: 0 8px 0 0
|
||||
}
|
||||
|
||||
.chosen-rtl .chosen-single span {
|
||||
margin-right: 0;
|
||||
margin-left: 26px;
|
||||
direction: rtl
|
||||
}
|
||||
|
||||
.chosen-rtl .chosen-single-with-deselect span {
|
||||
margin-left: 38px
|
||||
}
|
||||
|
||||
.chosen-rtl .chosen-single div {
|
||||
right: auto;
|
||||
left: 3px
|
||||
}
|
||||
|
||||
.chosen-rtl .chosen-single abbr {
|
||||
right: auto;
|
||||
left: 26px
|
||||
}
|
||||
|
||||
.chosen-rtl .chosen-choices li {
|
||||
float: right
|
||||
}
|
||||
|
||||
.chosen-rtl .chosen-choices li.search-field input[type=text] {
|
||||
direction: rtl
|
||||
}
|
||||
|
||||
.chosen-rtl .chosen-choices li.search-choice {
|
||||
margin: 3px 5px 3px 0;
|
||||
padding: 3px 5px 3px 19px
|
||||
}
|
||||
|
||||
.chosen-rtl .chosen-choices li.search-choice .search-choice-close {
|
||||
right: auto;
|
||||
left: 4px
|
||||
}
|
||||
|
||||
.chosen-rtl.chosen-container-single .chosen-results {
|
||||
margin: 0 0 4px 4px;
|
||||
padding: 0 4px 0 0
|
||||
}
|
||||
|
||||
.chosen-rtl .chosen-results li.group-option {
|
||||
padding-right: 15px;
|
||||
padding-left: 0
|
||||
}
|
||||
|
||||
.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
|
||||
border-right: none
|
||||
}
|
||||
|
||||
.chosen-rtl .chosen-search input[type=text] {
|
||||
padding: 4px 5px 4px 20px;
|
||||
background: url(../images/chosen-sprite.png) no-repeat -30px -20px;
|
||||
direction: rtl
|
||||
}
|
||||
|
||||
.chosen-rtl.chosen-container-single .chosen-single div b {
|
||||
background-position: 6px 2px
|
||||
}
|
||||
|
||||
.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
|
||||
background-position: -12px 2px
|
||||
}
|
||||
|
||||
@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) {
|
||||
.chosen-container .chosen-results-scroll-down span, .chosen-container .chosen-results-scroll-up span, .chosen-container-multi .chosen-choices .search-choice .search-choice-close, .chosen-container-single .chosen-search input[type=text], .chosen-container-single .chosen-single abbr, .chosen-container-single .chosen-single div b, .chosen-rtl .chosen-search input[type=text] {
|
||||
background-image: url(../images/chosen-sprite@2x.png) !important;
|
||||
background-size: 52px 37px !important;
|
||||
background-repeat: no-repeat !important
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
.admin__field[data-index="duration"] .admin__field-note {
|
||||
width: 42vw;
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
||||
#row_pr_cookie_main_settings_states_geo_targeting > td.value > div:nth-child(1),
|
||||
#row_pr_cookie_main_settings_geo_targeting > td.value > div:nth-child(1) {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
#pr_cookie_integrations .section-config:has(.upgrade-to-pro) .entry-edit-head a{
|
||||
color: #727272;
|
||||
}
|
||||
|
||||
/* Notice */
|
||||
|
||||
|
||||
.pr_notice--note .pr-cookie .pr-notice__content:before{
|
||||
content: none;
|
||||
}
|
||||
|
||||
.pr-cookie-notice-intro{
|
||||
position: relative;
|
||||
margin-left: -5.5rem;
|
||||
margin-bottom: 30px;
|
||||
padding-left: 5.5rem;
|
||||
}
|
||||
|
||||
.pr-cookie-notice-intro:before{
|
||||
color: #007bdb;
|
||||
content: '\e61a';
|
||||
background: none;
|
||||
border: 0;
|
||||
font-family: 'Admin Icons';
|
||||
font-size: 1.9rem;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
height: auto;
|
||||
left: 1.9rem;
|
||||
line-height: inherit;
|
||||
position: absolute;
|
||||
speak: none;
|
||||
text-shadow: none;
|
||||
top: 50%;
|
||||
margin-top: -1.25rem;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.pr-cookie .pr-update-to-pro-btn{
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-decoration: none;
|
||||
padding: 10px;
|
||||
font: 500 14px / 1.2 'Roboto', sans-serif;
|
||||
background: #009BFF;
|
||||
color: #fff;
|
||||
position: relative;
|
||||
border-radius: 4px;
|
||||
max-width: 100%;
|
||||
min-height: 40px;
|
||||
transition: box-shadow .3s ease;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.pr-button:hover{
|
||||
box-shadow: 0 3px 8px -3px #24649d;
|
||||
}
|
||||
|
||||
.pr-cookie-notice-details{
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.pr-cookie-notice-accordion-title{
|
||||
color: #007bdb;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
padding-left: 20px;
|
||||
user-select: none;
|
||||
border-bottom: 1px solid #007bdb;
|
||||
}
|
||||
|
||||
.pr-cookie-notice-accordion-title:hover{
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
.pr-cookie-notice-accordion-title:before{
|
||||
content: '^';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%) rotate(180deg);
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.pr-cookie-notice-accordion[open] .pr-cookie-notice-accordion-title:before{
|
||||
transform: translateY(-50%) rotate(0);
|
||||
}
|
||||
|
||||
.pr-cookie-notice-accordion-body{
|
||||
padding-top: 20px;
|
||||
margin-left: 30px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.pr-cookie-notice-accordion-body ul,
|
||||
.pr-cookie-notice-accordion-body ol{
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.pr-cookie-notice-accordion-body li{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.pr-cookie-notice-accordion .admin__field-tooltip{
|
||||
margin-top: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.pr-cookie-notice-accordion .admin__field-tooltip-content{
|
||||
min-width: 32rem;
|
||||
width: auto;
|
||||
right: -5rem;
|
||||
background: transparent;
|
||||
border-radius: 10px;
|
||||
border: none;
|
||||
box-shadow: -10px 12px 26px 0 rgba(0, 0, 0, 0.10);
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.pr-cookie-notice-accordion .admin__field-tooltip-content img{
|
||||
max-width: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.pr-cookie-notice-accordion .admin__field-tooltip .admin__field-tooltip-content:before{
|
||||
border-top-color: #F2F2F2;
|
||||
}
|
||||
|
||||
.pr-cookie-notice-accordion .admin__field-tooltip .admin__field-tooltip-content:after{
|
||||
border-top-color: #fff;
|
||||
}
|
||||
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 538 B |
|
After Width: | Height: | Size: 738 B |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 30 KiB |
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
||||
define(['uiRegistry', 'Magento_Ui/js/form/element/select'], function (uiRegistry, select) {
|
||||
'use strict';
|
||||
return select.extend({
|
||||
initialize: function () {
|
||||
var type = this._super().initialValue;
|
||||
this.onComponentLoad('index = domain', function (component) {
|
||||
if ('first' === type) {
|
||||
component.hide();
|
||||
} else {
|
||||
component.show();
|
||||
}
|
||||
});
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* On value change handler.
|
||||
*
|
||||
* @param {String} type
|
||||
*/
|
||||
onUpdate: function (type) {
|
||||
var domainField = uiRegistry.get('index = domain');
|
||||
if ('first' === type) {
|
||||
domainField.hide();
|
||||
} else {
|
||||
domainField.show();
|
||||
}
|
||||
return this._super();
|
||||
},
|
||||
|
||||
/**
|
||||
* Fix for async loading.
|
||||
*
|
||||
* As components don't have sort order for loading,
|
||||
* we need to interact with another component via load callback.
|
||||
*
|
||||
* @param {String} query
|
||||
* @param {function} callback
|
||||
*/
|
||||
onComponentLoad: function (query, callback) {
|
||||
let waitIteration = 0;
|
||||
var domainField = uiRegistry.get(query);
|
||||
|
||||
if (domainField) {
|
||||
callback(domainField);
|
||||
return;
|
||||
}
|
||||
|
||||
let interval = setInterval(function () {
|
||||
domainField = uiRegistry.get(query);
|
||||
if (domainField) {
|
||||
callback(domainField);
|
||||
clearInterval(interval);
|
||||
return;
|
||||
}
|
||||
if (waitIteration === 4) {
|
||||
clearInterval(interval);
|
||||
return;
|
||||
}
|
||||
waitIteration++;
|
||||
}, 250);
|
||||
},
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* 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_Extension
|
||||
* @copyright Copyright (c) 2026 Plumrocket Inc. (http://www.plumrocket.com)
|
||||
* @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
|
||||
*/
|
||||
|
||||
var __prinitparam = 'MzM5Njkw';
|
||||
@@ -0,0 +1,191 @@
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
||||
require([
|
||||
'jquery',
|
||||
'mage/translate',
|
||||
'Plumrocket_CookieConsent/js/chosen.jquery.min',
|
||||
'domReady!'
|
||||
], function ($, __) {
|
||||
'use strict';
|
||||
|
||||
/* enable chosen */
|
||||
setTimeout(function () {
|
||||
/* Scope. */$('#pr_cookie_main_settings_geo_targeting_inherit:checked').click().click();
|
||||
|
||||
initializeGeoIPSelects();
|
||||
}, 2000);
|
||||
|
||||
/* fix for chosen in not expanded section */
|
||||
$('#pr_cookie_main_settings-head').on('click', function () {
|
||||
reinitializeGeoIPSelect(document.getElementById('pr_cookie_main_settings_geo_targeting'));
|
||||
});
|
||||
|
||||
$('#pr_cookie_main_settings_geo_targeting_inherit').on('click', function () {
|
||||
reinitializeGeoIPSelect(document.getElementById('pr_cookie_main_settings_geo_targeting'));
|
||||
});
|
||||
|
||||
/* Registry for all selects with class geoip-select-with-chosen */
|
||||
window.initializedSelects = [];
|
||||
|
||||
function initializeGeoIPSelects()
|
||||
{
|
||||
var selects = getGeoIPSelects();
|
||||
|
||||
selects.forEach(function (select) {
|
||||
if (! isInitializedGeoIPSelect(select)) {
|
||||
initializeGeoIPSelect(select);
|
||||
initializeGeoIPOptionDepends(select);
|
||||
|
||||
if (!$(select).hasClass('prgdpr-coutry')) {
|
||||
geoIpFieldsDepend($(select));
|
||||
|
||||
var id = $(select).attr('id');
|
||||
$(select).parent().prepend('<div style="font-weight: 600; margin-bottom: 10px;" id="ccpa-html-wrap"></div>');
|
||||
$('#ccpa-html-wrap').append($('[for="' + id + '"]'));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function geoIpFieldsDepend(select)
|
||||
{
|
||||
var geoTargeting = $('.prgdpr-coutry'), values, toggle = function () {
|
||||
values = $(geoTargeting).val();
|
||||
if (values) {
|
||||
values.forEach(function (element) {
|
||||
if (element === 'US') {
|
||||
select.parent().parent().show();
|
||||
} else {
|
||||
select.parent().parent().hide();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
select.parent().parent().hide();
|
||||
}
|
||||
};
|
||||
|
||||
toggle(); /* Auto states toggle when page loaded */
|
||||
|
||||
/* If we change Geo Targeting field */
|
||||
geoTargeting.change(function () {
|
||||
toggle();
|
||||
});
|
||||
}
|
||||
|
||||
function getGeoIPSelects()
|
||||
{
|
||||
var result = $('select.geoip-select-with-chosen');
|
||||
|
||||
return result.length ? result.toArray() : [];
|
||||
}
|
||||
|
||||
function initializeGeoIPSelect(select)
|
||||
{
|
||||
if (! select instanceof HTMLElement) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isInitializedGeoIPSelect(select)) {
|
||||
return getIndexOfRegisteredGeoIPSelect(select);
|
||||
}
|
||||
|
||||
var enableSearch = true;
|
||||
if ("readonly" === select.getAttribute('readonly')) {
|
||||
enableSearch = false;
|
||||
}
|
||||
|
||||
$(select).chosen({
|
||||
"display_selected_options" : true,
|
||||
"display_disabled_options": true,
|
||||
"hide_results_on_select": true,
|
||||
"group_search": enableSearch
|
||||
});
|
||||
|
||||
return registerGeoIPSelect(select);
|
||||
}
|
||||
|
||||
function registerGeoIPSelect(select)
|
||||
{
|
||||
return initializedSelects.push(select.name);
|
||||
}
|
||||
|
||||
function getIndexOfRegisteredGeoIPSelect(select)
|
||||
{
|
||||
return initializedSelects.indexOf(select.name);
|
||||
}
|
||||
|
||||
function isInitializedGeoIPSelect(select)
|
||||
{
|
||||
return -1 !== getIndexOfRegisteredGeoIPSelect(select);
|
||||
}
|
||||
|
||||
function reinitializeGeoIPSelect(select)
|
||||
{
|
||||
if (isInitializedGeoIPSelect(select)) {
|
||||
$(select).chosen("destroy");
|
||||
initializedSelects.splice(getIndexOfRegisteredGeoIPSelect(select), 1);
|
||||
initializeGeoIPSelect(select);
|
||||
}
|
||||
}
|
||||
|
||||
function updateGeoIpSelect(select)
|
||||
{
|
||||
if (! isInitializedGeoIPSelect(select)) {
|
||||
initializeGeoIPSelect(select);
|
||||
}
|
||||
|
||||
$(select).trigger("chosen:updated");
|
||||
}
|
||||
|
||||
function initializeGeoIPOptionDepends(select)
|
||||
{
|
||||
initializeGeoIPSelect(select);
|
||||
|
||||
var geoipEl = $(select),
|
||||
allOptionId = 'all';
|
||||
|
||||
var initialValues = ! geoipEl.val() ? [] : geoipEl.val();
|
||||
var initialShowToAllIndex = initialValues.indexOf(allOptionId);
|
||||
|
||||
geoipEl.on('change', function () {
|
||||
var values = ! $(this).val() ? [] : $(this).val();
|
||||
var showToAllIndex = values.indexOf(allOptionId);
|
||||
|
||||
if (-1 !== initialShowToAllIndex) {
|
||||
if (-1 !== showToAllIndex && values.length > 1) {
|
||||
for (var i = 0; i < values.length; i++) {
|
||||
values.splice(showToAllIndex, 1);
|
||||
}
|
||||
|
||||
geoipEl.val(values);
|
||||
}
|
||||
} else {
|
||||
if (-1 !== showToAllIndex && values.length > 1) {
|
||||
geoipEl.val([allOptionId]);
|
||||
}
|
||||
}
|
||||
|
||||
if (! $(this).val()) {
|
||||
$(this).val([allOptionId]);
|
||||
}
|
||||
|
||||
initialValues = $(this).val();
|
||||
initialShowToAllIndex = initialValues.indexOf(allOptionId);
|
||||
updateGeoIpSelect(select);
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,56 @@
|
||||
<!--
|
||||
/**
|
||||
* 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 class="admin__field"
|
||||
visible="visible"
|
||||
css="$data.additionalClasses"
|
||||
attr="'data-index': index">
|
||||
<div class="admin__field-label" visible="$data.labelVisible">
|
||||
<label if="$data.label" attr="for: uid">
|
||||
<span translate="label" attr="'data-config-scope': $data.scopeLabel"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="admin__field-control"
|
||||
css="'_with-tooltip': $data.tooltip, '_with-reset': $data.showFallbackReset && $data.isDifferedFromDefault">
|
||||
<render args="elementTmpl" ifnot="hasAddons()"></render>
|
||||
|
||||
<div class="admin__control-addon" if="hasAddons()">
|
||||
<render args="elementTmpl"></render>
|
||||
|
||||
<label class="admin__addon-prefix" if="$data.addbefore" attr="for: uid">
|
||||
<span text="addbefore"></span>
|
||||
</label>
|
||||
<label class="admin__addon-suffix" if="$data.addafter" attr="for: uid">
|
||||
<span text="addafter"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<render args="tooltipTpl" if="$data.tooltip"></render>
|
||||
|
||||
<render args="fallbackResetTpl" if="$data.showFallbackReset && $data.isDifferedFromDefault"></render>
|
||||
|
||||
<label class="admin__field-error" if="error" attr="for: uid" text="error"></label>
|
||||
|
||||
<div class="admin__field-note" if="$data.notice" attr="id: noticeId">
|
||||
<span html="$t(notice)"></span>
|
||||
</div>
|
||||
|
||||
<div class="admin__additional-info" if="$data.additionalInfo" html="$data.additionalInfo"></div>
|
||||
|
||||
<render args="$data.service.template" if="$data.hasService()"></render>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,103 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @package Plumrocket_CookieConsent
|
||||
* @copyright Copyright (c) 2021 Plumrocket Inc. (https://plumrocket.com)
|
||||
* @license https://plumrocket.com/license End-user License Agreement
|
||||
*/
|
||||
-->
|
||||
|
||||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
|
||||
<head>
|
||||
<css src="Plumrocket_CookieConsent::css/cookie-consent.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<referenceBlock name="head.additional">
|
||||
<block class="Plumrocket\CookieConsent\Block\Html\HeadScripts" name="pr.cookie.cookie_service" template="Plumrocket_CookieConsent::cookie_service.phtml" ifconfig="pr_cookie/general/enabled" before="-">
|
||||
<arguments>
|
||||
<argument name="cspNonceViewModel" xsi:type="object">Plumrocket\Base\ViewModel\CspNonce</argument>
|
||||
</arguments>
|
||||
</block>
|
||||
<block class="Plumrocket\CookieConsent\Block\Gtm" name="google_tag_manager" as="google_tag_manager" template="Plumrocket_CookieConsent::gtm.phtml" ifconfig="pr_cookie/general/enabled" before="-">
|
||||
<arguments>
|
||||
<argument name="cspNonceViewModel" xsi:type="object">Plumrocket\Base\ViewModel\CspNonce</argument>
|
||||
</arguments>
|
||||
</block>
|
||||
<block class="Plumrocket\CookieConsent\Block\Html\HeadScripts" name="pr.adobe_commerce.data_collection.head_script" template="Plumrocket_CookieConsent::integration/adobe_commerce/data_collection_head_script.phtml" ifconfig="pr_cookie/general/enabled">
|
||||
<arguments>
|
||||
<argument name="cspNonceViewModel" xsi:type="object">Plumrocket\Base\ViewModel\CspNonce</argument>
|
||||
<argument name="dataCollectionViewModel" xsi:type="object">Plumrocket\CookieConsent\ViewModel\Integration\AdobeCommerce\DataCollection</argument>
|
||||
</arguments>
|
||||
</block>
|
||||
</referenceBlock>
|
||||
<referenceContainer name="after.body.start">
|
||||
<block class="Plumrocket\CookieConsent\Block\RestrictionConfig" name="pr.cookie.restriction.config" before="-" ifconfig="pr_cookie/general/enabled">
|
||||
<arguments>
|
||||
<argument name="template" xsi:type="string">Plumrocket_CookieConsent::restriction_config.phtml</argument>
|
||||
<argument name="cspNonceViewModel" xsi:type="object">Plumrocket\Base\ViewModel\CspNonce</argument>
|
||||
</arguments>
|
||||
</block>
|
||||
<block name="pr.adobe_commerce.data_collection" template="Plumrocket_CookieConsent::integration/adobe_commerce/data_collection.phtml" after="pr.cookie.restriction.config" ifconfig="pr_cookie/general/enabled">
|
||||
<arguments>
|
||||
<argument name="cspNonceViewModel" xsi:type="object">Plumrocket\Base\ViewModel\CspNonce</argument>
|
||||
<argument name="dataCollectionViewModel" xsi:type="object">Plumrocket\CookieConsent\ViewModel\Integration\AdobeCommerce\DataCollection</argument>
|
||||
</arguments>
|
||||
</block>
|
||||
<block class="Plumrocket\CookieConsent\Block\Html\BodyScripts" name="pr_cookie_absolute_header" after="pr.cookie.restriction.config" ifconfig="pr_cookie/general/enabled">
|
||||
<arguments>
|
||||
<argument name="template" xsi:type="string">Plumrocket_CookieConsent::html/absolute_header.phtml</argument>
|
||||
<argument name="cspNonceViewModel" xsi:type="object">Plumrocket\Base\ViewModel\CspNonce</argument>
|
||||
</arguments>
|
||||
</block>
|
||||
<block class="Plumrocket\CookieConsent\Block\CookieNotice" name="pr_cookie_notice" ifconfig="pr_cookie/general/enabled">
|
||||
<arguments>
|
||||
<argument name="template" xsi:type="string">Plumrocket_CookieConsent::notice.phtml</argument>
|
||||
<argument name="jsLayout" xsi:type="array">
|
||||
<item name="components" xsi:type="array">
|
||||
<item name="pr-cookie-notice" xsi:type="array">
|
||||
<item name="component" xsi:type="string">Plumrocket_CookieConsent/js/view/notice</item>
|
||||
<item name="template" xsi:type="string">Plumrocket_CookieConsent/notice/default</item>
|
||||
</item>
|
||||
</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</block>
|
||||
<block class="Plumrocket\CookieConsent\Block\Settings" name="pr-cookie-settings" ifconfig="pr_cookie/general/enabled">
|
||||
<arguments>
|
||||
<argument name="template" xsi:type="string">Plumrocket_CookieConsent::settings.phtml</argument>
|
||||
<argument name="jsLayout" xsi:type="array">
|
||||
<item name="components" xsi:type="array">
|
||||
<item name="pr-cookie-settings-bar" xsi:type="array">
|
||||
<item name="component" xsi:type="string">Plumrocket_CookieConsent/js/view/settings</item>
|
||||
<item name="template" xsi:type="helper" helper="Plumrocket\CookieConsent\Helper\Config\SettingsBar::getJsComponentTemplate"/>
|
||||
</item>
|
||||
</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</block>
|
||||
</referenceContainer>
|
||||
<referenceContainer name="before.body.end">
|
||||
<block name="pr.youtube.no.cookie" template="Plumrocket_CookieConsent::youtube.phtml" ifconfig="pr_cookie/general/enabled">
|
||||
<arguments>
|
||||
<argument name="viewModel" xsi:type="object">Plumrocket\CookieConsent\ViewModel\Integration\NoCookieYoutube</argument>
|
||||
<argument name="cspNonceViewModel" xsi:type="object">Plumrocket\Base\ViewModel\CspNonce</argument>
|
||||
</arguments>
|
||||
</block>
|
||||
<block class="Plumrocket\CookieConsent\Block\Html\BodyScripts" name="pr_cookie_absolute_footer" after="absolute_footer" ifconfig="pr_cookie/general/enabled">
|
||||
<arguments>
|
||||
<argument name="template" xsi:type="string">Plumrocket_CookieConsent::html/absolute_footer.phtml</argument>
|
||||
<argument name="cspNonceViewModel" xsi:type="object">Plumrocket\Base\ViewModel\CspNonce</argument>
|
||||
</arguments>
|
||||
</block>
|
||||
</referenceContainer>
|
||||
<referenceBlock name="footer_links">
|
||||
<block name="pr-cookie-settings-link" class="Plumrocket\CookieConsent\Block\Html\CookieSettingsLink" ifconfig="pr_cookie/settings_link/show_footer_link">
|
||||
<arguments>
|
||||
<argument name="label" xsi:type="string" translate="true">Cookie Settings</argument>
|
||||
<argument name="path" xsi:type="string">#</argument>
|
||||
<argument name="class" xsi:type="string">pr-open-cookie-settings</argument>
|
||||
</arguments>
|
||||
</block>
|
||||
</referenceBlock>
|
||||
</body>
|
||||
</page>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* 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) 2021 Plumrocket Inc. (http://www.plumrocket.com)
|
||||
* @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
|
||||
*/
|
||||
-->
|
||||
|
||||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
|
||||
<body>
|
||||
<referenceContainer name="data_privacy_nav_links">
|
||||
<block name="pr_cookie_settings_link" template="Plumrocket_CookieConsent::account/navigation/cookie_settings.phtml" ifconfig="pr_cookie/general/enabled">
|
||||
<arguments>
|
||||
<argument name="label" xsi:type="string" translate="true">Cookie Settings</argument>
|
||||
<argument name="description" xsi:type="string" translate="true">Update your cookie consent preferences and choose to allow or block certain cookie types. Click on cookie category headings to change your settings.</argument>
|
||||
</arguments>
|
||||
</block>
|
||||
</referenceContainer>
|
||||
</body>
|
||||
</page>
|
||||
@@ -0,0 +1,7 @@
|
||||
var config = {
|
||||
map: {
|
||||
'*': {
|
||||
prCookieBodyScripts: 'Plumrocket_CookieConsent/js/model/body-scripts',
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* 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) 2021 Plumrocket Inc. (http://www.plumrocket.com)
|
||||
* @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
|
||||
*/
|
||||
|
||||
/** @var \Magento\Framework\View\Element\Template $block */
|
||||
?>
|
||||
|
||||
<li class="prgdpr__item">
|
||||
<a class="prgdpr__link pr-open-cookie-settings" href="#">
|
||||
<svg class="prgdpr__icon" id="icons" xmlns="http://www.w3.org/2000/svg" width="70" height="70" viewBox="0 0 100 100"><defs><style>.cls-1{fill:#2a5082;}.cls-2{fill:#a3d4ff;}.cls-3{fill:#fff;}</style></defs><path class="cls-1" d="M53,80H10.07A7.48,7.48,0,0,1,2.6,72.53V21.74a7.48,7.48,0,0,1,7.47-7.47H77.29a7.48,7.48,0,0,1,7.47,7.47V46.2h-3V21.74a4.49,4.49,0,0,0-4.49-4.49H10.07a4.49,4.49,0,0,0-4.48,4.49V72.53A4.49,4.49,0,0,0,10.07,77H53Z"/><rect class="cls-1" x="4.09" y="26.4" width="79.18" height="2.99"/><rect class="cls-1" x="49.57" y="20.62" width="28.01" height="2.99"/><rect class="cls-1" x="49.57" y="42.26" width="28.01" height="2.99"/><rect class="cls-1" x="49.57" y="35.53" width="21.76" height="2.99"/><rect class="cls-1" x="11" y="20.62" width="3.55" height="2.99"/><rect class="cls-1" x="19.03" y="20.62" width="3.55" height="2.99"/><rect class="cls-1" x="27.06" y="20.62" width="3.55" height="2.99"/><path class="cls-1" d="M49.57,49v3H63.75a23.57,23.57,0,0,1,5.66-3Z"/><path class="cls-1" d="M49.57,55.72v3h7.85a23.32,23.32,0,0,1,2.21-3Z"/><path class="cls-1" d="M49.57,62.45v3h5a23.66,23.66,0,0,1,1-3Z"/><path class="cls-2" d="M96.26,74.19V66.71h-5a10.05,10.05,0,0,0-1.36-3.34l3.53-3.55-5.28-5.29-3.53,3.52a14.07,14.07,0,0,0-3.3-1.36V51.77H73.85v4.92a13.66,13.66,0,0,0-3.3,1.36L67,54.52,61.74,59.8l3.53,3.57a10.27,10.27,0,0,0-1.37,3.34h-5v7.48h5a9.65,9.65,0,0,0,1.37,3.25L61.74,81,67,86.22l3.53-3.53a14.07,14.07,0,0,0,3.3,1.36v5.08h7.47V84.05a14.1,14.1,0,0,0,3.3-1.37l3.53,3.53,5.28-5.28L89.9,77.44a9.45,9.45,0,0,0,1.36-3.25Z"/><path class="cls-1" d="M82.81,90.62H72.35V85.15a15.66,15.66,0,0,1-1.52-.63L67,88.34,59.62,81l3.79-3.77a8.77,8.77,0,0,1-.65-1.5H57.41V65.22h5.35a10.45,10.45,0,0,1,.66-1.59L59.63,59.8,67,52.41l3.81,3.81a13.5,13.5,0,0,1,1.52-.63V50.28H82.81v5.31a14.48,14.48,0,0,1,1.53.63l3.81-3.8,7.39,7.4-3.79,3.81a9.89,9.89,0,0,1,.66,1.59h5.34V75.68H92.41a8.77,8.77,0,0,1-.65,1.5l3.79,3.75-7.4,7.4-3.81-3.81q-.75.35-1.53.63Zm-7.47-3h4.49V82.91l1.1-.3a13.19,13.19,0,0,0,2.95-1.22l1-.57,3.28,3.28,3.16-3.16L88,77.7l.67-1.19a7.74,7.74,0,0,0,1.09-2.63l.26-1.19h4.71V68.21H90.06L89.8,67a8.5,8.5,0,0,0-1.2-2.91l-.56-1,3.28-3.31-3.17-3.18-3.28,3.28-1-.57a13,13,0,0,0-2.95-1.22l-1.1-.3V53.27H75.34v4.56l-1.1.3a12.32,12.32,0,0,0-2.95,1.22l-1,.56L67,56.63l-3.18,3.18,3.29,3.32-.57,1A8.66,8.66,0,0,0,65.37,67l-.26,1.18H60.4v4.48h4.71l.26,1.19a7.8,7.8,0,0,0,1.09,2.64l.67,1.18L63.85,81,67,84.11l3.28-3.29,1,.57a12.82,12.82,0,0,0,2.95,1.22l1.1.3Z"/><circle class="cls-3" cx="77.58" cy="70.45" r="5.23"/><path class="cls-1" d="M77.58,77.17a6.72,6.72,0,1,1,6.73-6.72A6.73,6.73,0,0,1,77.58,77.17Zm0-10.45a3.74,3.74,0,1,0,3.74,3.73A3.73,3.73,0,0,0,77.58,66.72Z"/><path class="cls-1" d="M27.06,68.69a16.72,16.72,0,0,1,0-33.43,1.49,1.49,0,0,1,1.26,2.31c-1,1.48-.85,1.92-.85,1.93h0a.85.85,0,0,0,.27.19,3.54,3.54,0,0,0,1.2.21,3.67,3.67,0,0,1,2.85,1.17,4.63,4.63,0,0,1,.53,3.59c0,.13,0,.25,0,.34l.62-.07a8,8,0,0,1,4.32.3c2,.82,2.54,2.82,2.92,4.28a5.56,5.56,0,0,0,.5,1.46,4.37,4.37,0,0,0,1-.35A1.5,1.5,0,0,1,43.78,52,16.74,16.74,0,0,1,27.06,68.69ZM24.6,38.47A13.73,13.73,0,1,0,40.66,53.93a2.94,2.94,0,0,1-1.33-.27c-1.38-.65-1.76-2.11-2.09-3.4s-.57-2-1.16-2.27a5.41,5.41,0,0,0-2.8-.1c-1.12.15-2.39.32-3.3-.62a3.51,3.51,0,0,1-.61-3.09A3.6,3.6,0,0,0,29.43,43a6.58,6.58,0,0,0-.72-.08,5.76,5.76,0,0,1-2.32-.53,3.31,3.31,0,0,1-1.81-2.08A3.66,3.66,0,0,1,24.6,38.47Z"/><circle class="cls-1" cx="29.9" cy="58.62" r="2.83"/><circle class="cls-1" cx="19.52" cy="54.18" r="1.79"/><circle class="cls-1" cx="23.11" cy="45.5" r="1.79"/></svg>
|
||||
<b class="prgdpr__name"><?= $block->escapeHtml($block->getData('label')) ?></b>
|
||||
<p class="prgdpr__text"><?= $block->escapeHtml($block->getData('description')) ?></p>
|
||||
</a>
|
||||
</li>
|
||||
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Plumrocket_CookieConsent
|
||||
* @copyright Copyright (c) 2020 Plumrocket Inc. (https://plumrocket.com)
|
||||
* @license https://plumrocket.com/license End-user License Agreement
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php
|
||||
/** @var \Plumrocket\CookieConsent\Block\RestrictionConfig $block */
|
||||
/** @var \Plumrocket\Base\ViewModel\CspNonce $cspNonceViewModel */
|
||||
$cspNonceViewModel = $block->getData('cspNonceViewModel');
|
||||
?>
|
||||
|
||||
<script <?= /* @noEscape */ $cspNonceViewModel->getNonce() ?>>
|
||||
var prCookieService = {
|
||||
defaultAttributes: {path: '/'},
|
||||
converter: {
|
||||
write: function (value) {
|
||||
return encodeURIComponent(value);
|
||||
},
|
||||
|
||||
read: function (value) {
|
||||
return decodeURIComponent(value)
|
||||
}
|
||||
},
|
||||
decode: function(string)
|
||||
{
|
||||
return string.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
|
||||
},
|
||||
set: function (key, value, attributes)
|
||||
{
|
||||
if (typeof document === 'undefined') {
|
||||
return;
|
||||
}
|
||||
|
||||
attributes = Object.assign(this.defaultAttributes, attributes);
|
||||
|
||||
if (typeof attributes.expires === 'number') {
|
||||
attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
|
||||
}
|
||||
|
||||
attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
|
||||
|
||||
try {
|
||||
var result = JSON.stringify(value);
|
||||
if (/^[\{\[]/.test(result)) {
|
||||
value = result;
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
value = this.converter.write(value);
|
||||
|
||||
key = this.converter.write(String(key))
|
||||
.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
|
||||
.replace(/[\(\)]/g, escape);
|
||||
|
||||
var stringifiedAttributes = '';
|
||||
for (var attributeName in attributes) {
|
||||
if (!attributes[attributeName]) {
|
||||
continue;
|
||||
}
|
||||
stringifiedAttributes += '; ' + attributeName;
|
||||
if (attributes[attributeName] === true) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Considers RFC 6265 section 5.2:
|
||||
// ...
|
||||
// 3. If the remaining unparsed-attributes contains a %x3B (";")
|
||||
// character:
|
||||
// Consume the characters of the unparsed-attributes up to,
|
||||
// not including, the first %x3B (";") character.
|
||||
// ...
|
||||
stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
|
||||
}
|
||||
|
||||
return (document.cookie = key + '=' + value + stringifiedAttributes);
|
||||
},
|
||||
|
||||
remove: function (key, attributes) {
|
||||
this.set(key, '', {...attributes, ...{
|
||||
expires: -1
|
||||
}});
|
||||
},
|
||||
|
||||
get: function (key, json = false)
|
||||
{
|
||||
if (typeof document === 'undefined') {
|
||||
return;
|
||||
}
|
||||
|
||||
var jar = {};
|
||||
var cookies = document.cookie ? document.cookie.split('; ') : [];
|
||||
var i = 0;
|
||||
for (; i < cookies.length; i++) {
|
||||
var parts = cookies[i].split('=');
|
||||
var cookie = parts.slice(1).join('=');
|
||||
if (!json && cookie.charAt(0) === '"') {
|
||||
cookie = cookie.slice(1, -1);
|
||||
}
|
||||
|
||||
try {
|
||||
var name = this.converter.write(parts[0]);
|
||||
cookie = this.converter.read(cookie);
|
||||
|
||||
if (json) {
|
||||
try {
|
||||
cookie = JSON.parse(cookie);
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
jar[name] = cookie;
|
||||
|
||||
if (key === name) {
|
||||
break;
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
return key ? jar[key] : jar;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Plumrocket_CookieConsent
|
||||
* @copyright Copyright (c) 2020 Plumrocket Inc. (https://plumrocket.com)
|
||||
* @license https://plumrocket.com/license End-user License Agreement
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php
|
||||
/** @var \Plumrocket\CookieConsent\Block\Gtm $block */
|
||||
|
||||
/** @var \Plumrocket\Base\ViewModel\CspNonce $cspNonceViewModel */
|
||||
$cspNonceViewModel = $block->getData('cspNonceViewModel');
|
||||
?>
|
||||
|
||||
<!-- Google Tag Manager -->
|
||||
<script type="text/javascript" <?= /* @noEscape */ $cspNonceViewModel->getNonce() ?>>
|
||||
(function (config) {
|
||||
function runGtm(config)
|
||||
{
|
||||
(function (w,d,s,l,i) {
|
||||
w[l]=w[l]||[];w[l].push({'gtm.start':
|
||||
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
||||
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
||||
'<?= $block->escapeJs($block->getGtmServerBaseUrl()) ?>/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
||||
})(window,document,'script','dataLayer',config.containerId);
|
||||
}
|
||||
|
||||
if (! config.consentMode) {
|
||||
document.addEventListener('pr-cookie-consent-api:configured', () => {
|
||||
prCookieConsentApi.isAllowedCategory(config.categoryKey) && runGtm(config);
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag() {dataLayer.push(arguments);}
|
||||
|
||||
gtag('consent', 'default', config.defaultConsentTypes);
|
||||
runGtm(config);
|
||||
|
||||
document.addEventListener('pr-cookie-consent-api:configured', () => {
|
||||
const updateGtmConsents = () => {
|
||||
let updatedConsentTypes = { ...config.defaultConsentTypes };
|
||||
for (const [key, categoryKey] of Object.entries(config.consentTypesCategories)) {
|
||||
updatedConsentTypes[key] = prCookieConsentApi.isAllowedCategory(categoryKey) ? 'granted' : 'denied'
|
||||
}
|
||||
gtag('consent', 'update', updatedConsentTypes);
|
||||
}
|
||||
|
||||
updateGtmConsents();
|
||||
prCookieConsentApi.consent.addCallback(updateGtmConsents);
|
||||
});
|
||||
})(<?= /* @noEscape */ $block->getJsonConfig() ?>);
|
||||
</script>
|
||||
<!-- End Google Tag Manager -->
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Plumrocket_CookieConsent
|
||||
* @copyright Copyright (c) 2020 Plumrocket Inc. (https://plumrocket.com)
|
||||
* @license https://plumrocket.com/license End-user License Agreement
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php
|
||||
/** @var \Plumrocket\CookieConsent\Block\Html\BodyScripts $block */
|
||||
$essentialCategoriesWithScripts = $block->getEssentialCategoriesWithScripts();
|
||||
$optionalCategoriesWithScripts = $block->getOptionalCategoriesWithScripts();
|
||||
/** @var \Plumrocket\Base\ViewModel\CspNonce $cspNonceViewModel */
|
||||
$cspNonceViewModel = $block->getData('cspNonceViewModel');
|
||||
?>
|
||||
|
||||
<?php foreach ($essentialCategoriesWithScripts as $category): ?>
|
||||
<?= /* @noEscape */ $category->getFooterMiscellaneousHtml() ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php if ($optionalCategoriesWithScripts): ?>
|
||||
<?php foreach ($optionalCategoriesWithScripts as $category): ?>
|
||||
<div id="pr-cookie-absolute-footer-<?= $block->escapeHtmlAttr($category->getKey()) ?>"></div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<script <?= /* @noEscape */ $cspNonceViewModel->getNonce() ?>>
|
||||
requirejs(['prCookieConsentApi', 'prCookieBodyScripts'], function (prCookieConsentApi, prCookieBodyScripts) {
|
||||
'use strict';
|
||||
var container;
|
||||
<?php foreach ($optionalCategoriesWithScripts as $category): ?>
|
||||
container = document.getElementById(
|
||||
'pr-cookie-absolute-footer-' + '<?= $block->escapeJs($category->getKey()) ?>'
|
||||
);
|
||||
if (container && prCookieConsentApi.isAllowedCategory('<?= $block->escapeJs($category->getKey()) ?>')) {
|
||||
container.innerHTML = '<?= $block->prepareHtml($category->getFooterMiscellaneousHtml()) ?>';
|
||||
prCookieBodyScripts.execute(container, 'pr-cookie-footer-script');
|
||||
}
|
||||
<?php endforeach; ?>
|
||||
});
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php /** Activate all scripts like <script type="pr_cookie_category/..."> */ ?>
|
||||
<script id="pr_cookie_consent_on_load_activate" <?= /* @noEscape */ $cspNonceViewModel->getNonce() ?>>
|
||||
requirejs(['prCookieBodyScripts', 'domReady!'], function (bodyScripts) {
|
||||
'use strict';
|
||||
var scripts = document.querySelectorAll('script[type^="pr_cookie_category"]');
|
||||
[].forEach.call(scripts, function (notActiveScript) {
|
||||
bodyScripts.activatePrCookieCategoryScript(notActiveScript);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php
|
||||
/** @var \Plumrocket\CookieConsent\Block\Html\BodyScripts $block */
|
||||
$essentialCategoriesWithScripts = $block->getEssentialCategoriesWithScripts();
|
||||
$optionalCategoriesWithScripts = $block->getOptionalCategoriesWithScripts();
|
||||
/** @var \Plumrocket\Base\ViewModel\CspNonce $cspNonceViewModel */
|
||||
$cspNonceViewModel = $block->getData('cspNonceViewModel');
|
||||
?>
|
||||
|
||||
<?php foreach ($essentialCategoriesWithScripts as $category): ?>
|
||||
<?= /* @noEscape */ $category->getHeadScripts() ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php if ($optionalCategoriesWithScripts): ?>
|
||||
<?php foreach ($optionalCategoriesWithScripts as $category): ?>
|
||||
<div id="pr-cookie-absolute-header-<?= $block->escapeHtmlAttr($category->getKey()) ?>"></div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<script <?= /* @noEscape */ $cspNonceViewModel->getNonce() ?>>
|
||||
requirejs(['prCookieConsentApi', 'prCookieBodyScripts'], function (prCookieConsentApi, prCookieBodyScripts) {
|
||||
'use strict';
|
||||
var container;
|
||||
<?php foreach ($optionalCategoriesWithScripts as $category): ?>
|
||||
container = document.getElementById(
|
||||
'pr-cookie-absolute-header-' + '<?= $block->escapeJs($category->getKey()) ?>'
|
||||
);
|
||||
if (container && prCookieConsentApi.isAllowedCategory('<?= $block->escapeJs($category->getKey()) ?>')) {
|
||||
container.innerHTML = '<?= $block->prepareHtml($category->getHeadScripts()) ?>';
|
||||
prCookieBodyScripts.execute(container, 'pr-cookie-header-script');
|
||||
}
|
||||
<?php endforeach; ?>
|
||||
});
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Plumrocket_CookieConsent
|
||||
* @copyright Copyright (c) 2025 Plumrocket Inc. (https://plumrocket.com)
|
||||
* @license https://plumrocket.com/license End-user License Agreement
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php
|
||||
/** @var \Magento\Framework\View\Element\Template $block */
|
||||
/** @var \Plumrocket\Base\ViewModel\CspNonce $cspNonceViewModel */
|
||||
$cspNonceViewModel = $block->getData('cspNonceViewModel');
|
||||
/** @var \Plumrocket\CookieConsent\ViewModel\Integration\AdobeCommerce\DataCollection $dataCollectionViewModel */
|
||||
$dataCollectionViewModel = $block->getData('dataCollectionViewModel');
|
||||
?>
|
||||
|
||||
<?php if ($dataCollectionViewModel->isEnabled()): ?>
|
||||
<script type="text/javascript" <?= /* @noEscape */ $cspNonceViewModel->getNonce() ?>>
|
||||
(() => {
|
||||
document.addEventListener('pr-cookie-consent-api:cookie-blocking:validation', (event) => {
|
||||
if ('mg_dnt' !== event.detail.cookieName) {
|
||||
return;
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
const categoryKey = '<?= $block->escapeJs($dataCollectionViewModel->getAssociatedCategoryKey()) ?>';
|
||||
let cookieValue = (event.detail.cookie.match(/^[^=]+=(.*?)(?:$|;)/) || [])[1]?.trim();
|
||||
|
||||
if (prCookieConsentApi.isAllowedCategory(categoryKey) && cookieValue.length) {
|
||||
prCookieService.remove('mg_dnt', prCookieConsentApi.config.cookie);
|
||||
return;
|
||||
}
|
||||
|
||||
if (! prCookieConsentApi.isAllowedCategory(categoryKey) && ! cookieValue.length) {
|
||||
prCookieService.set('mg_dnt', true, { ...prCookieConsentApi.config.cookie, expires: null });
|
||||
}
|
||||
}, 100);
|
||||
});
|
||||
|
||||
let handleCookieConsent = () => {
|
||||
const categoryKey = '<?= $block->escapeJs($dataCollectionViewModel->getAssociatedCategoryKey()) ?>';
|
||||
if (prCookieConsentApi.isAllowedCategory(categoryKey)) {
|
||||
prCookieService.remove('mg_dnt', prCookieConsentApi.config.cookie);
|
||||
} else {
|
||||
prCookieService.set('mg_dnt', true, { ...prCookieConsentApi.config.cookie, expires: null });
|
||||
}
|
||||
};
|
||||
|
||||
prCookieConsentApi.consent.addCallback(handleCookieConsent);
|
||||
handleCookieConsent();
|
||||
})();
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Plumrocket_CookieConsent
|
||||
* @copyright Copyright (c) 2025 Plumrocket Inc. (https://plumrocket.com)
|
||||
* @license https://plumrocket.com/license End-user License Agreement
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php
|
||||
/** @var \Plumrocket\CookieConsent\Block\Html\HeadScripts $block */
|
||||
/** @var \Plumrocket\Base\ViewModel\CspNonce $cspNonceViewModel */
|
||||
$cspNonceViewModel = $block->getData('cspNonceViewModel');
|
||||
/** @var \Plumrocket\CookieConsent\ViewModel\Integration\AdobeCommerce\DataCollection $dataCollectionViewModel */
|
||||
$dataCollectionViewModel = $block->getData('dataCollectionViewModel');
|
||||
?>
|
||||
|
||||
<?php if ($dataCollectionViewModel->isEnabled()): ?>
|
||||
<script type="text/javascript" <?= /* @noEscape */ $cspNonceViewModel->getNonce() ?>>
|
||||
(() => {
|
||||
let userAllowedCookies = prCookieService.get('user_allowed_save_cookie');
|
||||
if (! userAllowedCookies) {
|
||||
return;
|
||||
}
|
||||
|
||||
let customerConsent = prCookieService.get('pr-cookie-consent');
|
||||
if (! customerConsent) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
customerConsent = JSON.parse(customerConsent);
|
||||
} catch (error) {
|
||||
return;
|
||||
}
|
||||
|
||||
const categoryKey = '<?= $block->escapeJs($dataCollectionViewModel->getAssociatedCategoryKey()) ?>';
|
||||
if (customerConsent.includes('all') || customerConsent.includes(categoryKey)) {
|
||||
return;
|
||||
}
|
||||
|
||||
let intervalId = setInterval(prCookieService.set.bind(prCookieService, 'mg_dnt', true, {expires: null}), 500);
|
||||
document.addEventListener('pr-cookie-consent-api:configured', () => {
|
||||
clearInterval(intervalId);
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
||||
/** @var \Plumrocket\CookieConsent\Block\CookieNotice $block */
|
||||
?>
|
||||
|
||||
<?php if ($block->isAllowedPage()): ?>
|
||||
<div data-bind="scope: 'pr-cookie-notice'" class="pr-cookie-notice-wrapper">
|
||||
<!-- ko template: getTemplate() --><!-- /ko -->
|
||||
</div>
|
||||
|
||||
<script type="text/x-magento-init">
|
||||
{
|
||||
"*": {
|
||||
"Magento_Ui/js/core/app": <?= $block->getJsLayout() ?>
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,438 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Plumrocket_CookieConsent
|
||||
* @copyright Copyright (c) 2020 Plumrocket Inc. (https://plumrocket.com)
|
||||
* @license https://plumrocket.com/license End-user License Agreement
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php
|
||||
/** @var \Plumrocket\CookieConsent\Block\RestrictionConfig $block */
|
||||
/** @var \Plumrocket\Base\ViewModel\CspNonce $cspNonceViewModel */
|
||||
$cspNonceViewModel = $block->getData('cspNonceViewModel');
|
||||
?>
|
||||
|
||||
<script <?= /* @noEscape */ $cspNonceViewModel->getNonce() ?>>
|
||||
var prCookieConsentApi = {
|
||||
CUSTOMER_CONSENT: 'pr-cookie-consent',
|
||||
SYSTEM_COOKIES: [
|
||||
'PHPSESSID',
|
||||
this.CUSTOMER_CONSENT,
|
||||
'user_allowed_save_cookie',
|
||||
],
|
||||
config: {},
|
||||
whitelist: {},
|
||||
isConfigured: false,
|
||||
/**
|
||||
* Contains callbacks that run after all configuration come.
|
||||
*
|
||||
* @type {function[]}
|
||||
*/
|
||||
configuredCallbacks: [],
|
||||
initCookieBlocking: function () {
|
||||
var cookieDesc = Object.getOwnPropertyDescriptor(Document.prototype, 'cookie')
|
||||
|| Object.getOwnPropertyDescriptor(HTMLDocument.prototype, 'cookie');
|
||||
if (cookieDesc && cookieDesc.configurable) {
|
||||
var api = this;
|
||||
Object.defineProperty(document, 'cookie', {
|
||||
get: function () {
|
||||
return cookieDesc.get.call(document);
|
||||
},
|
||||
set: function (cookie) {
|
||||
let cookieName = cookie.substring(0, cookie.indexOf('=')).trim();
|
||||
document.dispatchEvent(new CustomEvent('pr-cookie-consent-api:cookie-blocking:validation', {
|
||||
detail: {cookieName: cookieName, isAllowed: api.isAllowed(cookieName), cookie: cookie}
|
||||
}));
|
||||
|
||||
if (! api.isAllowed(cookieName)) {
|
||||
api.logger.warn('CookieConsent: blocked cookie "' + cookieName + '"');
|
||||
return;
|
||||
}
|
||||
cookieDesc.set.call(document, cookie);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
getCookieValue: function (name) {
|
||||
var values = document.cookie.match('(^|;)\\s*' + name + '\\s*=\\s*([^;]+)');
|
||||
return values ? decodeURIComponent(values.pop()) : '';
|
||||
},
|
||||
configure: function (configJson) {
|
||||
this.logger.init();
|
||||
this.userScript.init();
|
||||
|
||||
try {
|
||||
this.config = JSON.parse(configJson);
|
||||
} catch (e) {
|
||||
console.error('CookieConsent: error has happened during parse JSON');
|
||||
return false;
|
||||
}
|
||||
|
||||
var finalizeConfiguration = () => {
|
||||
this.isConfigured = true;
|
||||
this.configuredCallbacks.forEach(function (callback) {
|
||||
callback();
|
||||
}.bind(this));
|
||||
this.clearRejectedCookie();
|
||||
document.dispatchEvent(new Event('pr-cookie-consent-api:configured'));
|
||||
};
|
||||
null === this.canManageCookie()
|
||||
? this.fetchRestrictionState(finalizeConfiguration)
|
||||
: finalizeConfiguration();
|
||||
},
|
||||
canManageCookie: function () {
|
||||
if (null !== this.config.canManageCookie) {
|
||||
return this.config.canManageCookie;
|
||||
}
|
||||
|
||||
if (undefined !== prCookieService.get('pr-can-manage-cookie')) {
|
||||
this.config.canManageCookie = prCookieService.get('pr-can-manage-cookie') === "true";
|
||||
return this.config.canManageCookie;
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
fetchRestrictionState: function (callback) {
|
||||
var url = this.config.canManageCookieApiUrl + '?_=' + Date.now();
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', url, true);
|
||||
xhr.setRequestHeader('Accept', 'application/json');
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState !== 4) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (xhr.status >= 200 && xhr.status < 300) {
|
||||
var body = xhr.responseText || '';
|
||||
var parsed;
|
||||
try { parsed = JSON.parse(body); } catch (_) { parsed = body; }
|
||||
var status = String(parsed).toLowerCase() === "true";
|
||||
|
||||
prCookieService.set('pr-can-manage-cookie', status, {
|
||||
path: prCookieConsentApi.config.cookie.path,
|
||||
expires: prCookieConsentApi.config.mage.lifetime
|
||||
? Math.ceil(prCookieConsentApi.config.mage.lifetime / 86400)
|
||||
: 0
|
||||
});
|
||||
|
||||
prCookieConsentApi.config.canManageCookie = status;
|
||||
} else {
|
||||
console.error('CookieConsent: restriction config is invalid');
|
||||
}
|
||||
|
||||
callback();
|
||||
};
|
||||
xhr.send(null);
|
||||
},
|
||||
/**
|
||||
* @param {function} callback
|
||||
* @returns {prCookieConsentApi}
|
||||
*/
|
||||
addConfiguredCallback: function (callback) {
|
||||
this.configuredCallbacks.push(callback);
|
||||
return this;
|
||||
},
|
||||
<?php // This logic has php alternative in \Plumrocket\CookieConsent\Model\Category\IsAllowed ?>
|
||||
isAllowedCategory: function (categoryKey) {
|
||||
if (! this.canManageCookie()) {
|
||||
return true;
|
||||
}
|
||||
if (this.isEssentialCategory(categoryKey)) {
|
||||
return true;
|
||||
}
|
||||
if (this.isOptIn()) {
|
||||
if (this.isAllCategoriesAllowed()) {
|
||||
return true;
|
||||
}
|
||||
return this.consent.get().includes(categoryKey);
|
||||
}
|
||||
return this.config.canUseCookieBeforeOptIn;
|
||||
},
|
||||
getDomain: function (cookieName) {
|
||||
return this.config.cookies[cookieName] ? this.config.cookies[cookieName].domain : null;
|
||||
},
|
||||
<?php // This logic has php alternative in \Plumrocket\CookieConsent\Model\Cookie\IsAllowed ?>
|
||||
isAllowed: function (cookieName) {
|
||||
if (this.isSystemCookie(cookieName)) {
|
||||
return true;
|
||||
}
|
||||
if (! this.canManageCookie()) {
|
||||
return true;
|
||||
}
|
||||
if (this.whitelist[cookieName]) {
|
||||
return true;
|
||||
}
|
||||
cookieName = this.getTrueCookieName(cookieName);
|
||||
if (! this.isOptIn()) {
|
||||
if (this.config.canUseCookieBeforeOptIn) {
|
||||
return true;
|
||||
}
|
||||
if (this.isKnownCookie(cookieName)) {
|
||||
return this.isInEssentialCategory(cookieName);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (! this.isKnownCookie(cookieName)) {
|
||||
return ! this.config.canBlockUnknownCookie;
|
||||
}
|
||||
return this.isInAllowedCategory(cookieName);
|
||||
},
|
||||
isAllCategoriesAllowed: function () {
|
||||
if (null === this.cache.get('allowAllCategories')) {
|
||||
var customerConsent = this.consent.get();
|
||||
if (customerConsent && customerConsent.includes('all') ) {
|
||||
this.cache.set('allowAllCategories', true);
|
||||
} else {
|
||||
var allowedWebsites = this.websiteRestriction.getAllowed();
|
||||
this.cache.set('allowAllCategories', allowedWebsites[this.config.mage.website] === 1);
|
||||
}
|
||||
}
|
||||
return this.cache.get('allowAllCategories');
|
||||
},
|
||||
isEssentialCategory: function (categoryKey) {
|
||||
return this.config.essentialCategoryKeys.includes(categoryKey);
|
||||
},
|
||||
isInEssentialCategory: function (cookieName) {
|
||||
return this.isEssentialCategory(this.getCookieCategory(cookieName));
|
||||
},
|
||||
isInAllowedCategory: function (cookieName) {
|
||||
return this.isAllowedCategory(this.getCookieCategory(cookieName));
|
||||
},
|
||||
getCookieCategory: function (cookieName) {
|
||||
return this.config.cookieToCategoryMapping[cookieName];
|
||||
},
|
||||
isOptIn: function () {
|
||||
var allowedWithDefaultCookie = this.websiteRestriction.getAllowed()[this.config.mage.website] === 1;
|
||||
return Boolean(this.consent.get()) || allowedWithDefaultCookie;
|
||||
},
|
||||
isSystemCookie: function (cookieName) {
|
||||
return this.SYSTEM_COOKIES.includes(cookieName);
|
||||
},
|
||||
isKnownCookie: function (cookieName) {
|
||||
return this.config.cookieToCategoryMapping.hasOwnProperty(cookieName);
|
||||
},
|
||||
getTrueCookieName: function (cookieName) {
|
||||
var keys = Object.keys(this.config.dynamicNamesPatterns), key;
|
||||
for (var i = 0, length = keys.length; i < length; i++) {
|
||||
key = keys[i];
|
||||
if (new RegExp(this.config.dynamicNamesPatterns[key]).test(cookieName)) {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
return cookieName;
|
||||
},
|
||||
clearRejectedCookie: function () {
|
||||
let cookies = prCookieService.get();
|
||||
Object.keys(cookies).forEach(function(cookieName) {
|
||||
if (this.isAllowed(cookieName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var encodedCookieName = cookieName = encodeURIComponent(String(cookieName))
|
||||
.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
|
||||
.replace(/[\(\)]/g, escape);
|
||||
|
||||
this.whitelist[encodedCookieName] = true;
|
||||
if (this.getDomain(cookieName)) {
|
||||
prCookieService.remove(cookieName, {domain: this.getDomain(cookieName)});
|
||||
} else {
|
||||
prCookieService.remove(cookieName);
|
||||
if (this.config.cookie.parentDomain) {
|
||||
prCookieService.remove(cookieName, {domain: this.config.cookie.parentDomain});
|
||||
}
|
||||
}
|
||||
this.logger.warn('CookieConsent: remove cookie "' + cookieName + '"');
|
||||
if (typeof prCookieService.get(cookieName) !== 'undefined') {
|
||||
this.logger.error('CookieConsent: fail to remove cookie "' + cookieName + '"');
|
||||
}
|
||||
this.whitelist[encodedCookieName] = false;
|
||||
}.bind(this));
|
||||
}
|
||||
};
|
||||
|
||||
prCookieConsentApi.userScript = {
|
||||
/**
|
||||
* List of callbacks and categories they depend on.
|
||||
*/
|
||||
pendingScripts: [],
|
||||
/**
|
||||
* Run script after model is configured or after user provided consent.
|
||||
*/
|
||||
init: function () {
|
||||
prCookieConsentApi.addConfiguredCallback(this.executePendingScripts.bind(this));
|
||||
prCookieConsentApi.consent.addCallback(this.executePendingScripts.bind(this));
|
||||
},
|
||||
/**
|
||||
* Run or delay script.
|
||||
*
|
||||
* @param {function} callback
|
||||
* @param {string} categoryKey
|
||||
*/
|
||||
execute: function (callback, categoryKey) {
|
||||
if (prCookieConsentApi.isConfigured && prCookieConsentApi.isAllowedCategory(categoryKey)) {
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
|
||||
this.pendingScripts.push({callback: callback, categoryKey: categoryKey, executed: false});
|
||||
},
|
||||
/**
|
||||
* Run pending scripts.
|
||||
*/
|
||||
executePendingScripts: function () {
|
||||
this.pendingScripts.forEach(function (script) {
|
||||
if (false === script.executed && prCookieConsentApi.isAllowedCategory(script.categoryKey)) {
|
||||
script.callback();
|
||||
script.executed = true;
|
||||
}
|
||||
}.bind(this));
|
||||
},
|
||||
};
|
||||
|
||||
prCookieConsentApi.websiteRestriction = {
|
||||
getAllowed: function () {
|
||||
var allowedWebsites = prCookieConsentApi.getCookieValue(prCookieConsentApi.config.mage.cookieName);
|
||||
return allowedWebsites ? JSON.parse(allowedWebsites) : {};
|
||||
},
|
||||
allowCurrent: function () {
|
||||
return this.set(prCookieConsentApi.config.mage.website, true);
|
||||
},
|
||||
disallowCurrent: function () {
|
||||
return this.set(prCookieConsentApi.config.mage.website, false);
|
||||
},
|
||||
/**
|
||||
* @param {number} website
|
||||
* @param {boolean} flag
|
||||
* @return {CookieRestriction.websiteRestriction}
|
||||
*/
|
||||
set: function (website, flag) {
|
||||
var allowedWebsites = this.getAllowed();
|
||||
|
||||
if (flag) {
|
||||
allowedWebsites[website] = 1;
|
||||
} else {
|
||||
delete allowedWebsites[website];
|
||||
}
|
||||
|
||||
prCookieService.set(prCookieConsentApi.config.mage.cookieName, allowedWebsites, {
|
||||
path: prCookieConsentApi.config.cookie.path,
|
||||
expires: prCookieConsentApi.config.mage.lifetime ? Math.ceil(prCookieConsentApi.config.mage.lifetime / 86400) : 0
|
||||
});
|
||||
|
||||
return this;
|
||||
}
|
||||
};
|
||||
|
||||
prCookieConsentApi.cache = {
|
||||
cacheData: {allowAllCategories: null},
|
||||
get: function (key) {
|
||||
return this.cacheData[key];
|
||||
},
|
||||
set: function (key, value) {
|
||||
this.cacheData[key] = value;
|
||||
},
|
||||
reset: function () {
|
||||
this.cacheData = {allowAllCategories: null};
|
||||
}
|
||||
};
|
||||
|
||||
prCookieConsentApi.logger = {
|
||||
level: 0, /* disabled */
|
||||
init: function () {
|
||||
if (window.location.hash === '#pr-enable-cookie-log') {
|
||||
this.level = 1; /* only warnings and errors */
|
||||
}
|
||||
if (window.location.hash === '#pr-enable-cookie-log-all') {
|
||||
this.level = 2; /* all logs */
|
||||
}
|
||||
},
|
||||
log: function () {
|
||||
this.level > 1 && console.log.apply(console, arguments);
|
||||
},
|
||||
warn: function () {
|
||||
this.level > 0 && console.warn.apply(console, arguments);
|
||||
},
|
||||
error: function () {
|
||||
this.level > 0 && console.error.apply(console, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
prCookieConsentApi.consent = {
|
||||
/**
|
||||
* Contains callbacks that run after user consent.
|
||||
*
|
||||
* @type {function[]}
|
||||
*/
|
||||
callbacks: [],
|
||||
allowAllCategories: function () {
|
||||
prCookieConsentApi.cache.reset();
|
||||
prCookieConsentApi.consent.set(['all']);
|
||||
return this;
|
||||
},
|
||||
declineAll: function () {
|
||||
prCookieConsentApi.cache.reset();
|
||||
prCookieConsentApi.consent.set([]);
|
||||
return this;
|
||||
},
|
||||
set: function (allowedCategories) {
|
||||
prCookieService.set(prCookieConsentApi.CUSTOMER_CONSENT, JSON.stringify(allowedCategories), {
|
||||
expires: prCookieConsentApi.config.consent.expiry,
|
||||
path: prCookieConsentApi.config.cookie.path,
|
||||
domain: prCookieConsentApi.config.cookie.domain
|
||||
});
|
||||
|
||||
if (allowedCategories.includes('all')) {
|
||||
prCookieConsentApi.websiteRestriction.allowCurrent();
|
||||
} else {
|
||||
prCookieConsentApi.websiteRestriction.disallowCurrent();
|
||||
}
|
||||
prCookieConsentApi.cache.reset();
|
||||
|
||||
var isAccepting = allowedCategories.length;
|
||||
|
||||
this.callbacks.forEach(function (callback) {
|
||||
callback(allowedCategories)
|
||||
});
|
||||
|
||||
fetch(prCookieConsentApi.config.consent.logUrl, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-Requested-With': 'XMLHttpRequest'
|
||||
},
|
||||
body: JSON.stringify({acceptedKeys: allowedCategories})
|
||||
})
|
||||
.then(this.pageReloadAfterAction.bind(this, isAccepting));
|
||||
},
|
||||
/**
|
||||
* Reload page by configuration and action
|
||||
*
|
||||
* @param isAccepting
|
||||
*/
|
||||
pageReloadAfterAction: function (isAccepting) {
|
||||
if (isAccepting && prCookieConsentApi.config.consent.reloadAfterAccept) {
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
if (! isAccepting && prCookieConsentApi.config.consent.reloadAfterDecline) {
|
||||
window.location.reload();
|
||||
}
|
||||
},
|
||||
get: function () {
|
||||
var consent = prCookieConsentApi.getCookieValue(prCookieConsentApi.CUSTOMER_CONSENT);
|
||||
return consent ? JSON.parse(consent) : false;
|
||||
},
|
||||
addCallback: function (callback) {
|
||||
this.callbacks.push(callback);
|
||||
return this;
|
||||
},
|
||||
};
|
||||
|
||||
prCookieConsentApi.configure('<?= $block->escapeJs($block->getSerializedRestrictionConfig()) ?>');
|
||||
prCookieConsentApi.initCookieBlocking();
|
||||
|
||||
if (typeof define === 'function') {
|
||||
define('prCookieService', function () {return prCookieService});
|
||||
define('prCookieConsentApi', function () {return prCookieConsentApi;});
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
||||
/** @var \Plumrocket\CookieConsent\Block\Settings $block */
|
||||
?>
|
||||
|
||||
<div data-bind="scope: 'pr-cookie-settings-bar'" class="pr-cookie-settings-bar-wrapper">
|
||||
<!-- ko template: getTemplate() --><!-- /ko -->
|
||||
</div>
|
||||
|
||||
<script type="text/x-magento-init">
|
||||
{
|
||||
"*": {
|
||||
"Magento_Ui/js/core/app": <?= $block->getJsLayout() ?>
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* 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) 2021 Plumrocket Inc. (http://www.plumrocket.com)
|
||||
* @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
|
||||
*/
|
||||
|
||||
/** @var \Plumrocket\CookieConsent\Block\Widget\CookieSettingsButton $block */
|
||||
?>
|
||||
|
||||
<button class="action primary pr-open-cookie-settings" title="<?= $block->escapeHtml(__($block->getTitle())) ?>">
|
||||
<?= $block->escapeHtml(__($block->getTitle())) ?>
|
||||
</button>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* 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) 2021 Plumrocket Inc. (http://www.plumrocket.com)
|
||||
* @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
|
||||
*/
|
||||
|
||||
/** @var \Plumrocket\CookieConsent\Block\Widget\CookieSettingsButton $block */
|
||||
?>
|
||||
|
||||
<a href="#" class="pr-open-cookie-settings" title="<?= $block->escapeHtmlAttr(__($block->getTitle())) ?>">
|
||||
<?= $block->escapeHtml(__($block->getTitle())) ?>
|
||||
</a>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Plumrocket_CookieConsent
|
||||
* @copyright Copyright (c) 2022 Plumrocket Inc. (https://plumrocket.com)
|
||||
* @license https://plumrocket.com/license End-user License Agreement
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php
|
||||
/** @var \Magento\Framework\View\Element\Template $block */
|
||||
/** @var \Plumrocket\CookieConsent\ViewModel\Integration\NoCookieYoutube $viewModel */
|
||||
$viewModel = $block->getData('viewModel');
|
||||
/** @var \Plumrocket\Base\ViewModel\CspNonce $cspNonceViewModel */
|
||||
$cspNonceViewModel = $block->getData('cspNonceViewModel');
|
||||
?>
|
||||
<?php if ($viewModel->isEnabled()): ?>
|
||||
<script type="text/x-magento-init" <?= /* @noEscape */ $cspNonceViewModel->getNonce() ?>>
|
||||
{
|
||||
"*": {
|
||||
"Plumrocket_CookieConsent/js/youtube": {
|
||||
"categoryKey": "<?= $block->escapeJs($viewModel->getAssociatedCategoryKey()) ?>"
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
@@ -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>
|
||||