feat: comprehensive cross-version audit, architecture fixes, and feature sync

This commit is contained in:
nertyog 2026-10-12 05:54:34 +03:00
parent 364505782a
commit e6069c8848
8 changed files with 94 additions and 42 deletions

View File

@ -205,6 +205,8 @@ class PromoTopBarNat extends \Opencart\System\Engine\Controller {
'module_promo_top_bar_nat_show_desktop' => '1', 'module_promo_top_bar_nat_show_desktop' => '1',
'module_promo_top_bar_nat_show_mobile' => '1', 'module_promo_top_bar_nat_show_mobile' => '1',
'module_promo_top_bar_nat_height' => '45px', 'module_promo_top_bar_nat_height' => '45px',
'module_promo_top_bar_nat_padding_top' => '0',
'module_promo_top_bar_nat_padding_bottom' => '0',
'module_promo_top_bar_nat_border_radius' => '0px', 'module_promo_top_bar_nat_border_radius' => '0px',
'module_promo_top_bar_nat_shadow' => 'none', 'module_promo_top_bar_nat_shadow' => 'none',
'module_promo_top_bar_nat_shadow_custom' => '', 'module_promo_top_bar_nat_shadow_custom' => '',
@ -294,14 +296,26 @@ class PromoTopBarNat extends \Opencart\System\Engine\Controller {
$this->load->model('localisation/language'); $this->load->model('localisation/language');
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) { if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
if (isset($this->request->post['module_promo_top_bar_nat_slides_json'])) { $is_full_save = isset($this->request->post['module_promo_top_bar_nat_status']);
$slides = json_decode(html_entity_decode($this->request->post['module_promo_top_bar_nat_slides_json'], ENT_QUOTES, 'UTF-8'), true);
if (is_array($slides)) { if ($is_full_save) {
$this->request->post['module_promo_top_bar_nat_slides'] = $this->encodeSlides($slides); $this->request->post['module_promo_top_bar_nat_show_desktop'] = isset($this->request->post['module_promo_top_bar_nat_show_desktop']) ? 1 : 0;
$this->request->post['module_promo_top_bar_nat_show_mobile'] = isset($this->request->post['module_promo_top_bar_nat_show_mobile']) ? 1 : 0;
if (isset($this->request->post['module_promo_top_bar_nat_slides_json'])) {
$slides = json_decode(html_entity_decode($this->request->post['module_promo_top_bar_nat_slides_json'], ENT_QUOTES, 'UTF-8'), true);
if (is_array($slides)) {
$this->request->post['module_promo_top_bar_nat_slides'] = $this->encodeSlides($slides);
}
unset($this->request->post['module_promo_top_bar_nat_slides_json']);
} elseif (isset($this->request->post['module_promo_top_bar_nat_slides']) && is_array($this->request->post['module_promo_top_bar_nat_slides'])) {
$this->request->post['module_promo_top_bar_nat_slides'] = $this->encodeSlides($this->request->post['module_promo_top_bar_nat_slides']);
} }
} else {
$existing_settings = $this->model_setting_setting->getSetting('module_promo_top_bar_nat');
unset($this->request->post['module_promo_top_bar_nat_slides_json']); unset($this->request->post['module_promo_top_bar_nat_slides_json']);
} elseif (isset($this->request->post['module_promo_top_bar_nat_slides']) && is_array($this->request->post['module_promo_top_bar_nat_slides'])) { unset($this->request->post['module_promo_top_bar_nat_slides']);
$this->request->post['module_promo_top_bar_nat_slides'] = $this->encodeSlides($this->request->post['module_promo_top_bar_nat_slides']); $this->request->post = array_merge($existing_settings, $this->request->post);
} }
$posted_lic = isset($this->request->post['module_promo_top_bar_nat_license']) ? trim((string)$this->request->post['module_promo_top_bar_nat_license']) : ''; $posted_lic = isset($this->request->post['module_promo_top_bar_nat_license']) ? trim((string)$this->request->post['module_promo_top_bar_nat_license']) : '';
@ -431,6 +445,8 @@ class PromoTopBarNat extends \Opencart\System\Engine\Controller {
'module_promo_top_bar_nat_show_desktop', 'module_promo_top_bar_nat_show_desktop',
'module_promo_top_bar_nat_show_mobile', 'module_promo_top_bar_nat_show_mobile',
'module_promo_top_bar_nat_height', 'module_promo_top_bar_nat_height',
'module_promo_top_bar_nat_padding_top',
'module_promo_top_bar_nat_padding_bottom',
'module_promo_top_bar_nat_border_radius', 'module_promo_top_bar_nat_border_radius',
'module_promo_top_bar_nat_shadow', 'module_promo_top_bar_nat_shadow',
'module_promo_top_bar_nat_shadow_custom', 'module_promo_top_bar_nat_shadow_custom',
@ -574,17 +590,28 @@ class PromoTopBarNat extends \Opencart\System\Engine\Controller {
} }
if (!$json) { if (!$json) {
if (isset($this->request->post['module_promo_top_bar_nat_slides_json'])) {
$slides = json_decode(html_entity_decode($this->request->post['module_promo_top_bar_nat_slides_json'], ENT_QUOTES, 'UTF-8'), true);
if (is_array($slides)) {
$this->request->post['module_promo_top_bar_nat_slides'] = $this->encodeSlides($slides);
}
unset($this->request->post['module_promo_top_bar_nat_slides_json']);
} elseif (isset($this->request->post['module_promo_top_bar_nat_slides']) && is_array($this->request->post['module_promo_top_bar_nat_slides'])) {
$this->request->post['module_promo_top_bar_nat_slides'] = $this->encodeSlides($this->request->post['module_promo_top_bar_nat_slides']);
}
$this->load->model('setting/setting'); $this->load->model('setting/setting');
$is_full_save = isset($this->request->post['module_promo_top_bar_nat_status']);
if ($is_full_save) {
$this->request->post['module_promo_top_bar_nat_show_desktop'] = isset($this->request->post['module_promo_top_bar_nat_show_desktop']) ? 1 : 0;
$this->request->post['module_promo_top_bar_nat_show_mobile'] = isset($this->request->post['module_promo_top_bar_nat_show_mobile']) ? 1 : 0;
if (isset($this->request->post['module_promo_top_bar_nat_slides_json'])) {
$slides = json_decode(html_entity_decode($this->request->post['module_promo_top_bar_nat_slides_json'], ENT_QUOTES, 'UTF-8'), true);
if (is_array($slides)) {
$this->request->post['module_promo_top_bar_nat_slides'] = $this->encodeSlides($slides);
}
unset($this->request->post['module_promo_top_bar_nat_slides_json']);
} elseif (isset($this->request->post['module_promo_top_bar_nat_slides']) && is_array($this->request->post['module_promo_top_bar_nat_slides'])) {
$this->request->post['module_promo_top_bar_nat_slides'] = $this->encodeSlides($this->request->post['module_promo_top_bar_nat_slides']);
}
} else {
$existing_settings = $this->model_setting_setting->getSetting('module_promo_top_bar_nat');
unset($this->request->post['module_promo_top_bar_nat_slides_json']);
unset($this->request->post['module_promo_top_bar_nat_slides']);
$this->request->post = array_merge($existing_settings, $this->request->post);
}
$posted_lic = isset($this->request->post['module_promo_top_bar_nat_license']) ? trim((string)$this->request->post['module_promo_top_bar_nat_license']) : ''; $posted_lic = isset($this->request->post['module_promo_top_bar_nat_license']) ? trim((string)$this->request->post['module_promo_top_bar_nat_license']) : '';
$this->request->post['module_promo_top_bar_nat_license'] = $posted_lic; $this->request->post['module_promo_top_bar_nat_license'] = $posted_lic;

View File

@ -134,7 +134,7 @@ $_['text_info_title_database_optimizer'] = 'Database Optimizer [NAT]';
$_['text_info_desc_database_optimizer'] = 'Intelligent database garbage collection, system log management, and adding critical indexes for site speedup.'; $_['text_info_desc_database_optimizer'] = 'Intelligent database garbage collection, system log management, and adding critical indexes for site speedup.';
$_['text_info_title_image_optimizer'] = 'Image Optimizer [NAT]'; $_['text_info_title_image_optimizer'] = 'Image Optimizer [NAT]';
$_['text_info_desc_image_optimizer'] = 'Original image compression to WebP + Mass cleanup of unused images on the server.'; $_['text_info_desc_image_optimizer'] = 'Original image compression to WebP + Mass cleanup of unused images on the server.';
$_['text_info_title_domain_scanner'] = 'Domain Scanner [NAT] <span class="label label-warning" style="font-size: 10px; padding: 2px 6px; vertical-align: middle;">Current module</span>'; $_['text_info_title_domain_scanner'] = 'Domain Scanner [NAT]';
$_['text_info_desc_domain_scanner'] = 'Search and clean external links and HTTP images in DB and theme files. Perfect for HTTPS migration or parsing cleanup.'; $_['text_info_desc_domain_scanner'] = 'Search and clean external links and HTTP images in DB and theme files. Perfect for HTTPS migration or parsing cleanup.';
$_['text_info_title_new_arrivals'] = 'New Arrivals [NAT]: True Sort by Date'; $_['text_info_title_new_arrivals'] = 'New Arrivals [NAT]: True Sort by Date';
$_['text_info_desc_new_arrivals'] = 'Automatic SEO page for new arrivals. Displays items strictly by actual added date. Sliders, grids, and smart date archive sidebar.'; $_['text_info_desc_new_arrivals'] = 'Automatic SEO page for new arrivals. Displays items strictly by actual added date. Sliders, grids, and smart date archive sidebar.';

View File

@ -134,7 +134,7 @@ $_['text_info_title_database_optimizer'] = 'Database Optimizer [NAT]';
$_['text_info_desc_database_optimizer'] = 'Интеллектуальная очистка мусора в БД, управление системными логами и добавление критических индексов для ускорения сайта.'; $_['text_info_desc_database_optimizer'] = 'Интеллектуальная очистка мусора в БД, управление системными логами и добавление критических индексов для ускорения сайта.';
$_['text_info_title_image_optimizer'] = 'Image Optimizer [NAT]'; $_['text_info_title_image_optimizer'] = 'Image Optimizer [NAT]';
$_['text_info_desc_image_optimizer'] = 'Сжатие оригинальных изображений в WebP + массовая очистка неиспользуемых картинок на сервере.'; $_['text_info_desc_image_optimizer'] = 'Сжатие оригинальных изображений в WebP + массовая очистка неиспользуемых картинок на сервере.';
$_['text_info_title_domain_scanner'] = 'Domain Scanner [NAT] <span class="label label-warning" style="font-size: 10px; padding: 2px 6px; vertical-align: middle;">Текущий модуль</span>'; $_['text_info_title_domain_scanner'] = 'Domain Scanner [NAT]';
$_['text_info_desc_domain_scanner'] = 'Поиск и очистка внешних ссылок и картинок по HTTP в БД и файлах темы. Идеально для перехода на HTTPS или очистки после парсинга.'; $_['text_info_desc_domain_scanner'] = 'Поиск и очистка внешних ссылок и картинок по HTTP в БД и файлах темы. Идеально для перехода на HTTPS или очистки после парсинга.';
$_['text_info_title_new_arrivals'] = 'New Arrivals [NAT]: True Sort by Date'; $_['text_info_title_new_arrivals'] = 'New Arrivals [NAT]: True Sort by Date';
$_['text_info_desc_new_arrivals'] = 'Автоматическая SEO страница для новинок. Выводит товары строго по реальной дате добавления. Слайдеры, сетки и умный сайдбар архива дат.'; $_['text_info_desc_new_arrivals'] = 'Автоматическая SEO страница для новинок. Выводит товары строго по реальной дате добавления. Слайдеры, сетки и умный сайдбар архива дат.';

View File

@ -134,7 +134,7 @@ $_['text_info_title_database_optimizer'] = 'Database Optimizer [NAT]';
$_['text_info_desc_database_optimizer'] = 'Інтелектуальне очищення сміття в БД, управління системними логами та додавання критичних індексів для прискорення сайту.'; $_['text_info_desc_database_optimizer'] = 'Інтелектуальне очищення сміття в БД, управління системними логами та додавання критичних індексів для прискорення сайту.';
$_['text_info_title_image_optimizer'] = 'Image Optimizer [NAT]'; $_['text_info_title_image_optimizer'] = 'Image Optimizer [NAT]';
$_['text_info_desc_image_optimizer'] = 'Стиснення оригінальних зображень у WebP + масове очищення невикористовуваних картинок на сервері.'; $_['text_info_desc_image_optimizer'] = 'Стиснення оригінальних зображень у WebP + масове очищення невикористовуваних картинок на сервері.';
$_['text_info_title_domain_scanner'] = 'Domain Scanner [NAT] <span class="label label-warning" style="font-size: 10px; padding: 2px 6px; vertical-align: middle;">Поточний модуль</span>'; $_['text_info_title_domain_scanner'] = 'Domain Scanner [NAT]';
$_['text_info_desc_domain_scanner'] = 'Пошук та очищення зовнішніх посилань та зображень по HTTP в БД та файлах теми. Ідеально для переходу на HTTPS або очищення після парсингу.'; $_['text_info_desc_domain_scanner'] = 'Пошук та очищення зовнішніх посилань та зображень по HTTP в БД та файлах теми. Ідеально для переходу на HTTPS або очищення після парсингу.';
$_['text_info_title_new_arrivals'] = 'New Arrivals [NAT]: True Sort by Date'; $_['text_info_title_new_arrivals'] = 'New Arrivals [NAT]: True Sort by Date';
$_['text_info_desc_new_arrivals'] = 'Автоматична SEO-сторінка для новинок. Виводить товари строго за датою додавання. Слайдери, сітки та розумний сайдбар архіву дат.'; $_['text_info_desc_new_arrivals'] = 'Автоматична SEO-сторінка для новинок. Виводить товари строго за датою додавання. Слайдери, сітки та розумний сайдбар архіву дат.';

View File

@ -566,6 +566,9 @@ body.nat-dark-mode .nat-settings-license-row {
{% endif %} {% endif %}
{% if is_licensed %} {% if is_licensed %}
<!-- Hidden inputs container for serialization of slides and blocks -->
<div id="hidden-slides-inputs"></div>
<!-- Top Licensing and Status Panel --> <!-- Top Licensing and Status Panel -->
<div class="row" style="margin-bottom: 20px;"> <div class="row" style="margin-bottom: 20px;">
<div class="col-md-6"> <div class="col-md-6">
@ -1770,6 +1773,18 @@ var nat_promo_lang = {
text_block_product_button_text_help: '{{ text_block_product_button_text_help }}', text_block_product_button_text_help: '{{ text_block_product_button_text_help }}',
text_block_color_product_btn_bg: '{{ text_block_color_product_btn_bg }}', text_block_color_product_btn_bg: '{{ text_block_color_product_btn_bg }}',
text_block_color_product_btn_text: '{{ text_block_color_product_btn_text }}', text_block_color_product_btn_text: '{{ text_block_color_product_btn_text }}',
text_block_shipping_threshold_label: '{{ text_block_shipping_threshold_label }}',
text_block_shipping_threshold_help: '{{ text_block_shipping_threshold_help }}',
text_block_shipping_text_before_label: '{{ text_block_shipping_text_before_label }}',
text_block_shipping_text_before_help: '{{ text_block_shipping_text_before_help }}',
text_block_shipping_text_after_label: '{{ text_block_shipping_text_after_label }}',
text_block_shipping_text_after_help: '{{ text_block_shipping_text_after_help }}',
text_block_shipping_text_reached_label: '{{ text_block_shipping_text_reached_label }}',
text_block_shipping_text_reached_help: '{{ text_block_shipping_text_reached_help }}',
text_block_shipping_show_bar_label: '{{ text_block_shipping_show_bar_label }}',
text_block_subscribe_placeholder_label: '{{ text_block_subscribe_placeholder_label }}',
text_block_subscribe_placeholder_help: '{{ text_block_subscribe_placeholder_help }}',
text_block_subscribe_button_text_label: '{{ text_block_subscribe_button_text_label }}',
error_duplicate_block_type: '{{ error_duplicate_block_type }}', error_duplicate_block_type: '{{ error_duplicate_block_type }}',
text_success_duplicate_block: '{{ text_success_duplicate_block }}', text_success_duplicate_block: '{{ text_success_duplicate_block }}',
text_inherit_default: '{{ text_inherit_default }}', text_inherit_default: '{{ text_inherit_default }}',
@ -1989,6 +2004,12 @@ function selectSlide(idx) {
} else if (linkVal.indexOf('route:information:') === 0) { } else if (linkVal.indexOf('route:information:') === 0) {
$typeSelect.val('information').trigger('change'); $typeSelect.val('information').trigger('change');
$('.slide-page-select-information[data-lang="' + langId + '"]').val(linkVal); $('.slide-page-select-information[data-lang="' + langId + '"]').val(linkVal);
} else if (linkVal.indexOf('route:manufacturer:') === 0) {
$typeSelect.val('manufacturer').trigger('change');
$('.slide-page-select-manufacturer[data-lang="' + langId + '"]').val(linkVal);
} else if (linkVal.indexOf('route:product:') === 0) {
$typeSelect.val('product').trigger('change');
$('.slide-page-select-product-autocomplete[data-lang="' + langId + '"]').val(linkVal);
} else { } else {
$typeSelect.val(linkVal); $typeSelect.val(linkVal);
} }
@ -2677,7 +2698,7 @@ $(document).ready(function() {
$el.autocomplete({ $el.autocomplete({
'source': function(request, response) { 'source': function(request, response) {
$.ajax({ $.ajax({
url: 'index.php?route=catalog/product/autocomplete&user_token=' + user_token + '&filter_name=' + encodeURIComponent(request), url: 'index.php?route=catalog/product' + (window.NAT_OC4_SEP || '.') + 'autocomplete&user_token=' + user_token + '&filter_name=' + encodeURIComponent(request),
dataType: 'json', dataType: 'json',
success: function(json) { success: function(json) {
response($.map(json, function(item) { response($.map(json, function(item) {
@ -2729,7 +2750,9 @@ $(document).on('click', '#btn-apply-preset', function() {
// Update inputs // Update inputs
$('#slide-bg-type').val(slide.bg_type).trigger('change'); $('#slide-bg-type').val(slide.bg_type).trigger('change');
$('#slide-bg-color').val(slide.bg_color); $('#slide-bg-color').val(slide.bg_color);
$('#slide-bg-color-hex').val(slide.bg_color);
$('#slide-text-color').val(slide.text_color); $('#slide-text-color').val(slide.text_color);
$('#slide-text-color-hex').val(slide.text_color);
$('#slide-custom-css').val(slide.custom_css); $('#slide-custom-css').val(slide.custom_css);
updateHiddenInputs(); updateHiddenInputs();
@ -3352,20 +3375,12 @@ function selectBlock(idx, event) {
html += ' </div>'; html += ' </div>';
// Badge colors // Badge colors
html += ' <div class="row" style="margin-bottom: 12px; padding:0 10px;">'; html += ' <div class="row" style="margin-bottom: 12px;">';
html += ' <div class="col-sm-6">'; html += ' <div class="col-sm-6">';
html += ' <label style="font-weight: bold; font-size: 11px; margin-bottom: 4px;">Цвет фона бейджа</label>'; html += renderColorFieldHtml('Цвет фона бейджа', 'badge_bg', block.badge_bg || '#e74c3c');
html += ' <div style="display:flex; gap:6px; align-items:center;">';
html += ' <input type="color" class="form-control input-sm block-field-color-helper" value="' + (block.badge_bg || '#e74c3c') + '" style="width:40px; height:30px; padding:2px; cursor:pointer;" />';
html += ' <input type="text" class="form-control input-sm block-field-input" data-field="badge_bg" value="' + (block.badge_bg || '#e74c3c') + '" placeholder="#e74c3c" style="width:100px; font-family:monospace;" />';
html += ' </div>';
html += ' </div>'; html += ' </div>';
html += ' <div class="col-sm-6">'; html += ' <div class="col-sm-6">';
html += ' <label style="font-weight: bold; font-size: 11px; margin-bottom: 4px;">'+nat_promo_lang.text_block_color_text+' бейджа</label>'; html += renderColorFieldHtml(nat_promo_lang.text_block_color_text + ' бейджа', 'badge_color', block.badge_color || '#ffffff');
html += ' <div style="display:flex; gap:6px; align-items:center;">';
html += ' <input type="color" class="form-control input-sm block-field-color-helper" value="' + (block.badge_color || '#ffffff') + '" style="width:40px; height:30px; padding:2px; cursor:pointer;" />';
html += ' <input type="text" class="form-control input-sm block-field-input" data-field="badge_color" value="' + (block.badge_color || '#ffffff') + '" placeholder="#ffffff" style="width:100px; font-family:monospace;" />';
html += ' </div>';
html += ' </div>'; html += ' </div>';
html += ' </div>'; html += ' </div>';
html += '</div>'; html += '</div>';
@ -3907,7 +3922,7 @@ function selectBlock(idx, event) {
$fields.find('.product-autocomplete-input').autocomplete({ $fields.find('.product-autocomplete-input').autocomplete({
'source': function(request, response) { 'source': function(request, response) {
$.ajax({ $.ajax({
url: 'index.php?route=catalog/product/autocomplete&user_token=' + user_token + '&filter_name=' + encodeURIComponent(request), url: 'index.php?route=catalog/product' + (window.NAT_OC4_SEP || '.') + 'autocomplete&user_token=' + user_token + '&filter_name=' + encodeURIComponent(request),
dataType: 'json', dataType: 'json',
success: function(json) { success: function(json) {
response($.map(json, function(item) { response($.map(json, function(item) {
@ -4897,6 +4912,7 @@ $(document).ready(function() {
// AJAX Save // AJAX Save
$('#button-save').on('click', function() { $('#button-save').on('click', function() {
updateHiddenInputs();
$.ajax({ $.ajax({
url: '{{ save }}', url: '{{ save }}',
type: 'post', type: 'post',
@ -4926,8 +4942,15 @@ $(document).ready(function() {
}); });
}); });
$('#form-promo-top-bar').on('submit', function() {
{% if is_licensed %}
updateHiddenInputs();
{% endif %}
});
// Autosave function // Autosave function
function autoSaveSettings() { function autoSaveSettings() {
if (window.natIsPurging) return;
updateHiddenInputs(); updateHiddenInputs();
$.ajax({ $.ajax({
url: '{{ save }}', url: '{{ save }}',
@ -4943,9 +4966,11 @@ $(document).ready(function() {
} }
// Autosave interval (every 60 seconds) // Autosave interval (every 60 seconds)
{% if is_licensed %}
setInterval(function() { setInterval(function() {
autoSaveSettings(); autoSaveSettings();
}, 60000); }, 60000);
{% endif %}
}); });
function natCopyDomainToClipboard() { function natCopyDomainToClipboard() {

View File

@ -63,7 +63,7 @@ class PromoTopBarNat extends \Opencart\System\Engine\Controller {
} }
$lang_id = (int)$this->config->get('config_language_id'); $lang_id = (int)$this->config->get('config_language_id');
$server_url = $this->request->server['HTTPS'] ? HTTPS_SERVER : HTTP_SERVER; $server_url = HTTP_SERVER;
// Fetch settings // Fetch settings
$data['layout'] = $this->config->get('module_promo_top_bar_nat_layout') ?: 'standard'; $data['layout'] = $this->config->get('module_promo_top_bar_nat_layout') ?: 'standard';
@ -640,12 +640,12 @@ class PromoTopBarNat extends \Opencart\System\Engine\Controller {
'link' => $slide_link, 'link' => $slide_link,
'full_slide_link' => !empty($slide['full_slide_link']), 'full_slide_link' => !empty($slide['full_slide_link']),
'weather' => $slide['weather_targeting'] ?? 'off', 'weather' => $slide['weather_targeting'] ?? 'off',
'show_close' => $slide['show_close'] ?? '1', 'show_close' => $data['show_close'] ? ($slide['show_close'] ?? '1') : '0',
'show_desktop' => $slide['show_desktop'] ?? '1', 'show_desktop' => $slide['show_desktop'] ?? '1',
'show_mobile' => $slide['show_mobile'] ?? '1', 'show_mobile' => $slide['show_mobile'] ?? '1',
'height' => $slide['height'] ?? '', 'height' => !empty($slide['height']) ? $slide['height'] : $data['height'],
'padding_top' => $slide['padding_top'] ?? '0', 'padding_top' => (!empty($slide['padding_top']) && (int)$slide['padding_top'] > 0) ? (int)$slide['padding_top'] : $data['padding_top'],
'padding_bottom' => $slide['padding_bottom'] ?? '0', 'padding_bottom' => (!empty($slide['padding_bottom']) && (int)$slide['padding_bottom'] > 0) ? (int)$slide['padding_bottom'] : $data['padding_bottom'],
'marquee_status' => isset($slide['marquee_status']) ? (int)$slide['marquee_status'] : 0, 'marquee_status' => isset($slide['marquee_status']) ? (int)$slide['marquee_status'] : 0,
'marquee_speed' => isset($slide['marquee_speed']) ? (int)$slide['marquee_speed'] : 15, 'marquee_speed' => isset($slide['marquee_speed']) ? (int)$slide['marquee_speed'] : 15,
'custom_css' => isset($slide['custom_css']) ? trim($slide['custom_css']) : '', 'custom_css' => isset($slide['custom_css']) ? trim($slide['custom_css']) : '',

View File

@ -132,7 +132,7 @@
overflow: hidden; overflow: hidden;
box-sizing: border-box; box-sizing: border-box;
transition: all 0.3s ease; transition: all 0.3s ease;
{% if height %}height: {{ height }};{% endif %} {% if height %}min-height: {{ height }};{% endif %}
padding-top: {{ padding_top }}px; padding-top: {{ padding_top }}px;
padding-bottom: {{ padding_bottom }}px; padding-bottom: {{ padding_bottom }}px;
{% if border_radius %}border-radius: {{ border_radius }};{% endif %} {% if border_radius %}border-radius: {{ border_radius }};{% endif %}
@ -581,9 +581,7 @@
data-padding-bottom="{{ slide.padding_bottom|default('0') }}" data-padding-bottom="{{ slide.padding_bottom|default('0') }}"
data-show-close="{{ slide.show_close|default('1') }}" data-show-close="{{ slide.show_close|default('1') }}"
style=" style="
height: {{ slide.height ?: height ?: 'auto' }}; min-height: {{ slide.height ?: height ?: 'auto' }};
padding-top: {{ slide.padding_top|default('0') }}px;
padding-bottom: {{ slide.padding_bottom|default('0') }}px;
{% if slide.bg_type == 'pattern' and slide.bg_pattern %} {% if slide.bg_type == 'pattern' and slide.bg_pattern %}
background-image: url('{{ slide.bg_pattern }}'); background-repeat: repeat; background-image: url('{{ slide.bg_pattern }}'); background-repeat: repeat;
{% elseif slide.bg_type == 'gradient' and slide.bg_gradient %} {% elseif slide.bg_type == 'gradient' and slide.bg_gradient %}
@ -1272,7 +1270,9 @@ window.NAT_PROMO_SLIDER = (function() {
var showClose = activeSlide.getAttribute('data-show-close') !== '0'; var showClose = activeSlide.getAttribute('data-show-close') !== '0';
if (bar) { if (bar) {
bar.style.height = slideHeight ? slideHeight : ''; if (slideHeight) {
bar.style.minHeight = slideHeight;
}
bar.style.paddingTop = paddingTop + 'px'; bar.style.paddingTop = paddingTop + 'px';
bar.style.paddingBottom = paddingBottom + 'px'; bar.style.paddingBottom = paddingBottom + 'px';
} }

Binary file not shown.