first commit
This commit is contained in:
9
web/templates/koza/static/entrypoints/app.js
Normal file
9
web/templates/koza/static/entrypoints/app.js
Normal file
@@ -0,0 +1,9 @@
|
||||
require('@assets[common]/entrypoints/app.js');
|
||||
|
||||
require('@css/core-end.scss');
|
||||
|
||||
require('@static/bootstrap-v4/js/util.js');
|
||||
require('@static/bootstrap-v4/js/tab.js');
|
||||
require('@static/bootstrap-v4/js/button.js');
|
||||
|
||||
require('@assets/js/wpj.sections-responsive.js');
|
||||
4
web/templates/koza/static/entrypoints/cart.js
Normal file
4
web/templates/koza/static/entrypoints/cart.js
Normal file
@@ -0,0 +1,4 @@
|
||||
require('@css/order.scss');
|
||||
|
||||
require('@static/wpj/wpj.cart.js');
|
||||
require('@static/jquery/jquery.tooltip.js');
|
||||
73
web/templates/koza/static/entrypoints/category.js
Normal file
73
web/templates/koza/static/entrypoints/category.js
Normal file
@@ -0,0 +1,73 @@
|
||||
import SimpleBar from '@static/jquery/simplebar.js';
|
||||
|
||||
require('@static/jquery/jquery.unveil2.js');
|
||||
require('@assets[common]/entrypoints/category.js');
|
||||
|
||||
function search($searchInput, $itemList, $showAll, dataFilterInput, labelWrapper) {
|
||||
var filter = $($searchInput).val();
|
||||
wpj.domUtils.resetTimer('search', 200, function() {
|
||||
if (filter) {
|
||||
$itemList.find('label:not(:Contains(' + filter + '))').hide();
|
||||
var $found = $itemList.find('label:Contains(' + filter + ')');
|
||||
if ($found.length) {
|
||||
$found.css('display', 'block'); // kdyz se pouzije show, ff to zobrazuje inline
|
||||
$showAll.hide();
|
||||
} else {
|
||||
$showAll.show();
|
||||
}
|
||||
} else {
|
||||
$itemList.find('label').show();
|
||||
$itemList.find('[data-recently-checked]').css('display', 'block');
|
||||
var $checkedLabels = $itemList.find('[data-filter-input=\'' + dataFilterInput + '\']:checked').parent();
|
||||
$checkedLabels.attr('data-recently-checked', true);
|
||||
$checkedLabels.css('display', 'block'); // kdyz se pouzije show, ff to zobrazuje inline
|
||||
$showAll.hide();
|
||||
}
|
||||
|
||||
$('.' + labelWrapper + '-label-wrapper').trigger('changed');
|
||||
|
||||
var scrollbars = document.querySelectorAll('.' + labelWrapper + '-label-wrapper');
|
||||
|
||||
for (var i = 0; i < scrollbars.length; i++) {
|
||||
var simpleBar = new SimpleBar(scrollbars[i]);
|
||||
|
||||
simpleBar.recalculate();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
window.initProducersSearch = function() {
|
||||
var $producerSearchInput = $('input[data-role="producer-search"]'),
|
||||
$producerList = $('[data-role="producer-list"]');
|
||||
|
||||
var $showAllProducers = $('[data-filter="show-all-manufacturers"]');
|
||||
|
||||
var searchProducers = function() {
|
||||
search($producerSearchInput, $producerList, $showAllProducers, 'vyrobce', 'manufacuter');
|
||||
};
|
||||
|
||||
$showAllProducers.on('click', function() {
|
||||
$($producerSearchInput).val('');
|
||||
searchProducers();
|
||||
});
|
||||
|
||||
$producerSearchInput.on('keyup change', searchProducers);
|
||||
};
|
||||
|
||||
window.initSeriesSearch = function() {
|
||||
var $seriesSearchInput = $('input[data-role="series-search"]'),
|
||||
$seriesList = $('[data-role="series-list"]');
|
||||
|
||||
var $showAllSeries = $('[data-filter="show-all-series"]');
|
||||
|
||||
var searchSeries = function() {
|
||||
search($seriesSearchInput, $seriesList, $showAllSeries, 'series', 'series');
|
||||
};
|
||||
|
||||
$showAllSeries.on('click', function() {
|
||||
$($seriesSearchInput).val('');
|
||||
searchSeries();
|
||||
});
|
||||
|
||||
$seriesSearchInput.on('keyup change', searchSeries);
|
||||
};
|
||||
1
web/templates/koza/static/entrypoints/home.js
Normal file
1
web/templates/koza/static/entrypoints/home.js
Normal file
@@ -0,0 +1 @@
|
||||
require('@assets[common]/entrypoints/home.js');
|
||||
Reference in New Issue
Block a user