Refactor CMS page template for improved readability and consistency
- Adjusted indentation and spacing for better code structure in page.tpl - Ensured consistent use of block syntax and formatting - Maintained functionality of the Paypo iframe integration and CMS content display
This commit is contained in:
1181
.vscode/ftp-kr.sync.cache.json
vendored
1181
.vscode/ftp-kr.sync.cache.json
vendored
File diff suppressed because it is too large
Load Diff
@@ -2687,7 +2687,7 @@ class AdminControllerCore extends Controller
|
|||||||
|
|
||||||
$this->addJqueryPlugin(['scrollTo', 'alerts', 'chosen', 'autosize', 'fancybox']);
|
$this->addJqueryPlugin(['scrollTo', 'alerts', 'chosen', 'autosize', 'fancybox']);
|
||||||
$this->addJqueryPlugin('growl', null, false);
|
$this->addJqueryPlugin('growl', null, false);
|
||||||
$this->addJqueryUI(['ui.slider', 'ui.datepicker']);
|
$this->addJqueryUI(['ui.core', 'ui.widget', 'ui.mouse', 'ui.draggable', 'ui.sortable','ui.datepicker','ui.slider']);
|
||||||
|
|
||||||
$this->addJS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/js/vendor/bootstrap.min.js');
|
$this->addJS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/js/vendor/bootstrap.min.js');
|
||||||
$this->addJS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/js/vendor/modernizr.min.js');
|
$this->addJS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/js/vendor/modernizr.min.js');
|
||||||
@@ -2717,6 +2717,10 @@ class AdminControllerCore extends Controller
|
|||||||
|
|
||||||
// Specific Admin Theme
|
// Specific Admin Theme
|
||||||
$this->addCSS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/css/overrides.css', 'all', PHP_INT_MAX);
|
$this->addCSS(__PS_BASE_URI__ . $this->admin_webpath . '/themes/' . $this->bo_theme . '/css/overrides.css', 'all', PHP_INT_MAX);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$this->context->controller->addJs(apPageHelper::getJsAdminDir().'admin/form.js');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->addJS([
|
$this->addJS([
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ define('_PS_SMARTY_CONSOLE_OPEN_BY_URL_', 1);
|
|||||||
define('_PS_SMARTY_CONSOLE_OPEN_', 2);
|
define('_PS_SMARTY_CONSOLE_OPEN_', 2);
|
||||||
|
|
||||||
if (!defined('_PS_JQUERY_VERSION_')) {
|
if (!defined('_PS_JQUERY_VERSION_')) {
|
||||||
define('_PS_JQUERY_VERSION_', '3.4.1');
|
define('_PS_JQUERY_VERSION_', '1.12.4');
|
||||||
}
|
}
|
||||||
|
|
||||||
define('_PS_CACHE_CA_CERT_FILE_', _PS_CACHE_DIR_.'cacert.pem');
|
define('_PS_CACHE_CA_CERT_FILE_', _PS_CACHE_DIR_.'cacert.pem');
|
||||||
|
|||||||
@@ -1926,6 +1926,7 @@ class APPageBuilder extends Module
|
|||||||
|
|
||||||
$cache_id = $this->getCacheId('apshortcode', $shortcode_key);
|
$cache_id = $this->getCacheId('apshortcode', $shortcode_key);
|
||||||
if ($disable_cache || !$this->isCached($this->templateFile, $cache_id)) {
|
if ($disable_cache || !$this->isCached($this->templateFile, $cache_id)) {
|
||||||
|
|
||||||
$shortcode_html = '';
|
$shortcode_html = '';
|
||||||
$shortcode_obj = ApPageBuilderShortcodeModel::getShortCode($shortcode_key);
|
$shortcode_obj = ApPageBuilderShortcodeModel::getShortCode($shortcode_key);
|
||||||
if (isset($shortcode_obj['id_appagebuilder']) && $shortcode_obj['id_appagebuilder'] != '' && $shortcode_obj['id_appagebuilder'] != 0) {
|
if (isset($shortcode_obj['id_appagebuilder']) && $shortcode_obj['id_appagebuilder'] != '' && $shortcode_obj['id_appagebuilder'] != 0) {
|
||||||
|
|||||||
@@ -112,7 +112,6 @@ class AdminApPageBuilderProfilesController extends ModuleAdminControllerCore
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->context->controller->addJs(apPageHelper::getJsAdminDir().'admin/form.js');
|
|
||||||
|
|
||||||
$this->page_header_toolbar_btn['SaveAndStay'] = array(
|
$this->page_header_toolbar_btn['SaveAndStay'] = array(
|
||||||
'href' => 'javascript:void(0);',
|
'href' => 'javascript:void(0);',
|
||||||
|
|||||||
@@ -506,10 +506,9 @@ function htmlentitiesDecode(str) {
|
|||||||
|
|
||||||
//edit group
|
//edit group
|
||||||
$(document).on("click", ".btn-edit", function () {
|
$(document).on("click", ".btn-edit", function () {
|
||||||
if ($(this).data('type' == undefined) && $(this).data('type') == undefined) {
|
var type = $(this).data('type') !== undefined
|
||||||
var type = $(this).closest('.widget-row').data("type");
|
? $(this).data('type')
|
||||||
} else
|
: $(this).closest('.widget-row').data('type');
|
||||||
var type = $(this).data("type");
|
|
||||||
|
|
||||||
if (type.indexOf("apSub") == 0) {
|
if (type.indexOf("apSub") == 0) {
|
||||||
if (type == "apSubAccordions") {
|
if (type == "apSubAccordions") {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$('.block_newsletter form').on('submit', function () {
|
$('.my_row.newsletter form').on('submit', function () {
|
||||||
var psemailsubscriptionForm = $(this);
|
var psemailsubscriptionForm = $(this);
|
||||||
if (typeof psemailsubscription_subscription === 'undefined') {
|
if (typeof psemailsubscription_subscription === 'undefined') {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -22,49 +22,49 @@
|
|||||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*}
|
*}
|
||||||
{extends file='page.tpl'}
|
{extends file='page.tpl'}
|
||||||
|
|
||||||
{block name='page_title'}
|
{block name='page_title'}
|
||||||
{$cms.meta_title}
|
{$cms.meta_title}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name='page_content_container'}
|
{block name='page_content_container'}
|
||||||
<section id="content" class="page-content page-cms page-cms-{$cms.id}">
|
<section id="content" class="page-content page-cms page-cms-{$cms.id}">
|
||||||
{if $cms.id == 61}
|
{if $cms.id == 61}
|
||||||
<iframe id="paypoIframe" src="https://start.paypo.pl" width="100%" frameborder="no"></iframe>
|
<iframe id="paypoIframe" src="https://start.paypo.pl" width="100%" frameborder="no"></iframe>
|
||||||
{literal}
|
{literal}
|
||||||
<script type="module">
|
<script type="module">
|
||||||
window.addEventListener('message', event => {
|
window.addEventListener('message', event => {
|
||||||
const paypoIframe = document.querySelector('#paypoIframe');
|
const paypoIframe = document.querySelector('#paypoIframe');
|
||||||
|
|
||||||
const eventData = JSON.parse(event.data);
|
const eventData = JSON.parse(event.data);
|
||||||
|
|
||||||
let isPageHeightSet = false;
|
let isPageHeightSet = false;
|
||||||
|
|
||||||
if (typeof eventData === "object") {
|
if (typeof eventData === "object") {
|
||||||
if ('pageBodyHeight' in eventData) {
|
if ('pageBodyHeight' in eventData) {
|
||||||
paypoIframe.style.height = eventData.pageBodyHeight + 'px';
|
paypoIframe.style.height = eventData.pageBodyHeight + 'px';
|
||||||
isPageHeightSet = true;
|
isPageHeightSet = true;
|
||||||
} else {
|
} else {
|
||||||
isPageHeightSet || (paypoIframe.style.height = '5200px');
|
isPageHeightSet || (paypoIframe.style.height = '5200px');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{/literal}
|
{/literal}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{block name='cms_content'}
|
{block name='cms_content'}
|
||||||
{$cms.content nofilter}
|
{$cms.content nofilter}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name='hook_cms_dispute_information'}
|
{block name='hook_cms_dispute_information'}
|
||||||
{hook h='displayCMSDisputeInformation'}
|
{hook h='displayCMSDisputeInformation'}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name='hook_cms_print_button'}
|
{block name='hook_cms_print_button'}
|
||||||
{hook h='displayCMSPrintButton'}
|
{hook h='displayCMSPrintButton'}
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
{/block}
|
{/block}
|
||||||
|
|||||||
Reference in New Issue
Block a user