Skip to content

Commit

Permalink
Merge pull request #14 from mageplaza/2.4-develop
Browse files Browse the repository at this point in the history
2.4 develop
  • Loading branch information
Victor-Mageplaza authored Aug 22, 2021
2 parents 12724dd + 675ec6b commit 8eca9e6
Show file tree
Hide file tree
Showing 9 changed files with 276 additions and 8 deletions.
8 changes: 8 additions & 0 deletions Model/System/Config/Source/InlineApplyFor.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ class InlineApplyFor extends OptionArray
const HOME_PAGE = 'home_page';
const CATEGORY_PAGE = 'category_page';
const PRODUCT_PAGE = 'product_page';
const DAILYDEAL_ALLDEALS = 'dailydeal_alldeals';
const DAILYDEAL_BESTSELLERDEALS = 'dailydeal_bestsellerdeals';
const DAILYDEAL_FEATUREDDEALS = 'dailydeal_featureddeals';
const DAILYDEAL_NEWDEALS = 'dailydeal_newdeals';

/**
* @return array
Expand All @@ -40,6 +44,10 @@ public function getOptionHash()
self::HOME_PAGE => __('Home Page'),
self::CATEGORY_PAGE => __('Categories Page'),
self::PRODUCT_PAGE => __('Products Page'),
self::DAILYDEAL_ALLDEALS => __('Daily Deal All Deals Page'),
self::DAILYDEAL_BESTSELLERDEALS => __('Daily Deal Bestseller Deals Page'),
self::DAILYDEAL_FEATUREDDEALS => __('Daily Deal Featured Deals Page'),
self::DAILYDEAL_NEWDEALS => __('Daily Deal New Deals Page'),
];
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"mageplaza/module-core": "^1.4.5"
},
"type": "magento2-module",
"version": "4.0.0",
"version": "4.0.1",
"license": "proprietary",
"authors": [
{
Expand Down
43 changes: 43 additions & 0 deletions etc/csp_whitelist.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialShare
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
-->
<csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp:etc/csp_whitelist.xsd">
<policies>
<policy id="style-src">
<values>
<value id="fue-style" type="host">*.googleapis.com</value>
<value id="addtoany-style" type="host">*.addtoany.com</value>
</values>
</policy>
<policy id="font-src">
<values>
<value id="googleapis" type="host">https://fonts.gstatic.com</value>
</values>
</policy>
<policy id="connect-src">
<values>
<value id="fue-connect" type="host">http://dpm.demdex.net</value>
</values>
</policy>
</policies>
</csp_whitelist>
52 changes: 52 additions & 0 deletions view/frontend/layout/dailydeal_pages_alldeals.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0"?>
<!--
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialShare
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="columns.top">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineTop" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_alldeals</argument>
<argument name="position" xsi:type="string">top_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>
</block>
</referenceContainer>
<referenceContainer name="content">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.Float" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_alldeals</argument>
<argument name="type" xsi:type="string">float</argument>
<argument name="position" xsi:type="string">float_position</argument>
</arguments>
</block>
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineBottom" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_alldeals</argument>
<argument name="position" xsi:type="string">bottom_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>

</block>
</referenceContainer>
</body>
</page>
52 changes: 52 additions & 0 deletions view/frontend/layout/dailydeal_pages_bestsellerdeals.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0"?>
<!--
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialShare
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="columns.top">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineTop" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_bestsellerdeals</argument>
<argument name="position" xsi:type="string">top_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>
</block>
</referenceContainer>
<referenceContainer name="content">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.Float" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_bestsellerdeals</argument>
<argument name="type" xsi:type="string">float</argument>
<argument name="position" xsi:type="string">float_position</argument>
</arguments>
</block>
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineBottom" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_bestsellerdeals</argument>
<argument name="position" xsi:type="string">bottom_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>

</block>
</referenceContainer>
</body>
</page>
52 changes: 52 additions & 0 deletions view/frontend/layout/dailydeal_pages_featureddeals.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0"?>
<!--
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialShare
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="columns.top">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineTop" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_featureddeals</argument>
<argument name="position" xsi:type="string">top_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>
</block>
</referenceContainer>
<referenceContainer name="content">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.Float" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_featureddeals</argument>
<argument name="type" xsi:type="string">float</argument>
<argument name="position" xsi:type="string">float_position</argument>
</arguments>
</block>
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineBottom" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_featureddeals</argument>
<argument name="position" xsi:type="string">bottom_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>

</block>
</referenceContainer>
</body>
</page>
52 changes: 52 additions & 0 deletions view/frontend/layout/dailydeal_pages_newdeals.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0"?>
<!--
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialShare
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="columns.top">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineTop" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_newdeals</argument>
<argument name="position" xsi:type="string">top_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>
</block>
</referenceContainer>
<referenceContainer name="content">
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.Float" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_newdeals</argument>
<argument name="type" xsi:type="string">float</argument>
<argument name="position" xsi:type="string">float_position</argument>
</arguments>
</block>
<block class="Mageplaza\SocialShare\Block\SocialShare" name="mp.SocialShare.InlineBottom" template="Mageplaza_SocialShare::socialshare.phtml">
<arguments>
<argument name="page" xsi:type="string">dailydeal_newdeals</argument>
<argument name="position" xsi:type="string">bottom_content</argument>
<argument name="type" xsi:type="string">inline</argument>
</arguments>

</block>
</referenceContainer>
</body>
</page>
11 changes: 10 additions & 1 deletion view/frontend/templates/socialshare.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
.mp_social_share_inline {
width: fit-content;
justify-content: flex-end;
margin-top: -25px;
margin-top: -10px;
margin-bottom: 15px;
<?= $block->getPosition() === 'bottom_content' ? 'float: right;' : 'float: left;' ?>
}
Expand All @@ -66,6 +66,15 @@
<?php endif;?>

@media only screen and (min-width: 430px) {.navigation { z-index: 1; }}
@media only screen and (max-width: 777px) {
.mp_social_share_inline {
width: fit-content;
justify-content: flex-end;
margin-top: -10px;
margin-bottom: 15px;
float: none;
}
}

.footer-bottom .container .logo { z-index: 0;}
<?php endif;?>
Expand Down
12 changes: 6 additions & 6 deletions view/frontend/web/js/thankskit.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,32 @@ require([
var existCondition = setInterval(
function () {
if ($('#a2a_modal').css('display') === 'block') {
if ($('.a2a_button_facebook').length !== 0) {
if ($('.a2a_button_facebook').length !== 0 && $('.a2a_kit .a2a_button_facebook img').attr('src') !== undefined) {
$('#a2a_thanks_kit .a2a_button_facebook .a2a_s_facebook svg').replaceWith('<img src="' + $('.a2a_kit .a2a_button_facebook img').attr('src') + '" width="32" height="32" alt="facebook">');
$('#a2a_thanks_kit .a2a_button_facebook').css('height', '32px');
}

if ($('.a2a_button_twitter').length !== 0) {
if ($('.a2a_button_twitter').length !== 0 && $('.a2a_kit .a2a_button_twitter img').attr('src') !== undefined) {
$('#a2a_thanks_kit .a2a_button_twitter .a2a_s_twitter svg').replaceWith('<img src="' + $('.a2a_kit .a2a_button_twitter img').attr('src') + '" width="32" height="32" alt="twitter">');
$('#a2a_thanks_kit .a2a_button_twitter').css('height', '32px');
}

if ($('.a2a_button_facebook_messenger').length !== 0) {
if ($('.a2a_button_facebook_messenger').length !== 0 && $('.a2a_kit .a2a_button_facebook_messenger img').attr('src') !== undefined) {
$('#a2a_thanks_kit .a2a_button_facebook_messenger .a2a_s_facebook_messenger svg').replaceWith('<img src="' + $('.a2a_kit .a2a_button_facebook_messenger img').attr('src') + '" width="32" height="32" alt="facebook_messenger">');
$('#a2a_thanks_kit .a2a_button_facebook_messenger').css('height', '32px');
}

if ($('.a2a_button_pinterest').length !== 0) {
if ($('.a2a_button_pinterest').length !== 0 && $('.a2a_kit .a2a_button_pinterest img').attr('src') !== undefined) {
$('#a2a_thanks_kit .a2a_button_pinterest .a2a_s_pinterest svg').replaceWith('<img src="' + $('.a2a_kit .a2a_button_pinterest img').attr('src') + '" width="32" height="32" alt="pinterest">');
$('#a2a_thanks_kit .a2a_button_pinterest').css('height', '32px');
}

if ($('.a2a_button_linkedin').length !== 0) {
if ($('.a2a_button_linkedin').length !== 0 && $('.a2a_kit .a2a_button_linkedin img').attr('src') !== undefined) {
$('#a2a_thanks_kit .a2a_button_linkedin .a2a_s_linkedin svg').replaceWith('<img src="' + $('.a2a_kit .a2a_button_linkedin img').attr('src') + '" width="32" height="32" alt="linkedin">');
$('#a2a_thanks_kit .a2a_button_linkedin').css('height', '32px');
}

if ($('.a2a_button_tumblr').length !== 0) {
if ($('.a2a_button_tumblr').length !== 0 && $('.a2a_kit .a2a_button_tumblr img').attr('src') !== undefined) {
$('#a2a_thanks_kit .a2a_button_tumblr .a2a_s_tumblr svg').replaceWith('<img src="' + $('.a2a_kit .a2a_button_tumblr img').attr('src') + '" width="32" height="32" alt="tumblr">');
$('#a2a_thanks_kit .a2a_button_tumblr').css('height', '32px');
}
Expand Down

0 comments on commit 8eca9e6

Please sign in to comment.