first commit
This commit is contained in:
70
admin/templates/window/sections.virtual.tpl
Normal file
70
admin/templates/window/sections.virtual.tpl
Normal file
@@ -0,0 +1,70 @@
|
||||
<div id="flapVirtualCategory" class="tab-pane boxStatic box">
|
||||
{$hasCookie = $smarty.cookies['infobox'] == 'virtual_sections'}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="wpj-main-panel-title">
|
||||
<h4>{'virtual_help'|translate}</h4>
|
||||
<a href="" class="pull-right badge badge-secondary" data-infobox-toggle="virtual_sections" {if !$hasCookie}style="display: none;"{/if}><i class="bi bi-question-circle"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="infobox" data-infobox="virtual_sections" {if $hasCookie}style="display: none;"{/if}>
|
||||
<button type="button" class="close" data-infobox-toggle="virtual_sections"><span class="glyphicon glyphicon-remove"></span></button>
|
||||
<p>V klasických sekcích se zobrazují pouze produkty, které do nich zařadíte.</p>
|
||||
<p>Ve virtuálních sekcích se můžou zobrazovat i produkty zvolené podle nadefinovaných pravidel – například parametru, výrobce nebo ceny. Pokud vytvoříte nový produkt,
|
||||
který odpovídá filtru, automaticky se do této sekce přidá.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div class="wpj-form-group">
|
||||
<div class="d-flex align-items-center">
|
||||
{print_toggle name="virtual"}
|
||||
<label>{'virtual'|translate}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div id="virtual_categories">
|
||||
{block virtual_categories}
|
||||
{$filter = $body.data.data.virtual_settings}
|
||||
{$filter['figure'][0] = 'Y'}
|
||||
{include "block.productsFilter.tpl"}
|
||||
{/block}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$('input[name="data[virtual]"]').change(function() {
|
||||
$('#virtual_categories').toggle($(this).is(':checked'));
|
||||
}).change();
|
||||
</script>
|
||||
</div>
|
||||
|
||||
{block css}
|
||||
<style type="text/css">
|
||||
/* hide 3rd row - figure and inStore - protoze se v sekci vzdy vola applyDefaultFilterParams a tyhle dve se tam nastavuji automaticky */
|
||||
#productsFilter .panel-body .form-group:nth-child(3) {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
{/block}
|
||||
<script>
|
||||
$('[data-infobox-toggle]').on('click', function() {
|
||||
var name = $(this).data('infobox-toggle');
|
||||
var target = $("[data-infobox='" + name + "']");
|
||||
var cookieDate;
|
||||
|
||||
target.toggle();
|
||||
target.is(':visible') ? cookieDate = 'Thu, 01 Jan 1970 00:00:01 GMT' : cookieDate = 'Thu, 01 Jan 2070 00:00:01 GMT';
|
||||
|
||||
document.cookie = 'infobox=' + name + '; expires='+ cookieDate +';';
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user