var css_assets=document.createElement("style");css_assets.type="text/css";css_assets.id="appZaawansowaneFiltry";css_assets.textContent=`.app-filters .boxhead { margin-bottom: 0; padding: 4px 15px; border-bottom: 1px solid #d8d8d8; } .app-filters .boxhead span { font-size: 15px; color: #333333; margin-top: 0; } .app-filters .innerbox { display: block !important; background: #ffffff; padding: 0 !important; } .app-filters .innerbox .mx-filter { margin-bottom: 0 !important; padding-bottom: 0 !important; background: #ffffff !important; width: 100%; } .app-filters .innerbox .mx-filter.multimode-active li a img { display: none; } .app-filters .innerbox .mx-filter.border { border-bottom: 1px solid #d8d8d8; } .app-filters .innerbox .mx-filter.border:last-child { border-bottom: none; padding-bottom: 4px; } .app-filters .innerbox .mx-filter .mx-filter-head { width: 100%; display: grid; grid-template-columns: 1fr 10px; grid-gap: 0 10px; padding: 15px 15px 10px 15px; } .app-filters .innerbox .mx-filter.expandable .mx-filter-head { cursor: pointer; } .app-filters .innerbox .mx-filter .mx-filter-head h5, .app-filters .innerbox .mx-filter .mx-filter-head span { margin: 0 !important; font-size: 15px !important; color: #333333 !important; padding: 0 !important; border: none !important; } .app-filters .innerbox .mx-filter .mx-filter-head span.expand { font-size: 18px; font-weight: 600; color: #333333; } .app-filters .innerbox .mx-filter > ul .mx-container { padding: 0 15px 15px 15px !important; display: grid; height: auto; border: none; text-align: left; } .app-filters .innerbox .mx-filter > ul { width: auto !important; height: auto; border: none; text-align: left; margin: 0; padding: 0 !important; } .app-filters .innerbox .mx-filter > ul.all-visible .mx-container li.none { display: list-item !important; } .app-filters .innerbox .mx-filter > ul.all-visible .mx-container li.showmore { display: none !important; } .app-filters .innerbox .mx-filter.expandable > ul { display: none; grid-gap: 0 15px; box-sizing: content-box !important; margin-bottom: 0 !important; } .column-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } .column-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } .column-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } .column-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; } .column-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; } .column-7 { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; } .column-8 { grid-template-columns: repeat(8, minmax(0, 1fr)) !important; } .column-9 { grid-template-columns: repeat(9, minmax(0, 1fr)) !important; } .column-10 { grid-template-columns: repeat(10, minmax(0, 1fr)) !important; } .column-11 { grid-template-columns: repeat(11, minmax(0, 1fr)) !important; } .column-12 { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; } .app-filters.multimode .innerbox .mx-filter ul li::before { display: none; } .app-filters .innerbox .mx-filter ul li { margin: 5px 0 0 0 !important; background: #ffffff !important; object-fit: contain; } .app-filters .innerbox .mx-filter ul li.selected { padding: 0 !important; line-height: 24px !important; display: list-item !important; } .app-filters .innerbox .mx-filter ul li.selected::before { display: none !important; } .app-filters .innerbox .mx-filter ul li.showmore { grid-column: 1/-1; border: none !important; margin-top: 0 !important; color: #fb5642 !important; padding-left: 5px; } .app-filters .innerbox .mx-filter ul li.really-hidden { display: list-item !important; } .app-filters .innerbox .mx-filter ul li a, .app-filters .innerbox .mx-filter ul li a span, .app-filters .innerbox .mx-filter ul li a em { /*background: #ffffff !important;*/ color: #333333 !important; font-size: 14px !important; display: inline-block !important; } .app-filters .innerbox .mx-filter ul li a:focus { outline: none; } .app-filters .innerbox .mx-filter ul li a img { margin: 0 5px 0 5px !important; display: inline-block; } .app-filters .innerbox .mx-filter#filter_rate ul li { margin-top: 10px; } .app-filters .innerbox .mx-filter#filter_rate ul li a { display: grid; grid-template-columns: repeat(7, 1fr); justify-content: center; align-items: center; grid-gap: 5px; } .app-filters .innerbox .mx-filter#filter_rate ul li a img.px1 { grid-row: 1; grid-column: 1; margin: 0 !important; justify-self: center; } .app-filters .innerbox .mx-filter#filter_rate ul li a em { text-align: center; } .app-filters .innerbox .mx-filter#filter_rate ul li a span { display: none; } .app-filters .innerbox .mx-filter ul .mx-container { grid-template-columns: 100%; } .app-filters .innerbox .mx-filter ul li.priceinput { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 15px; padding-top: 0 !important; } .app-filters .innerbox .mx-filter ul li.priceinput input { margin-bottom: 0 !important; width: 100%; padding: 0 15px; } .app-filters .innerbox .mx-filter ul li.priceinput span.fromto { display: none !important; } .app-filters .innerbox .mx-filter ul li.priceinput .bottombuttons { margin-top: 0; grid-column: 1/3; } .app-filters .innerbox .mx-filter ul li.priceinput button.btn { border: none; width: 100%; padding: 5px 15px; margin: 0 !important; background: #971112; box-sizing: border-box; } .app-filters .innerbox .mx-filter ul li.priceinput button.btn span { text-transform: initial; font-size: 14px; color: #333333; } .app-filters .mx-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 15px; padding: 15px; background: #ffffff; } .app-filters .mx-buttons.one-grid { grid-template-columns: 100%; } .app-filters .mx-buttons button { transition: 0.5s; padding: 6px; } .app-filters .mx-buttons button span { text-transform: initial; } .app-filters .mx-buttons button.multimode-button { background: #971112; border-color: #971112; } .app-filters .mx-buttons button.multimode-button span { color: #ffffff; font-size: 16px; } .app-filters .mx-buttons button.reset-button { background: #000000; border-color: #000000; } .app-filters .mx-buttons button.reset-button.inactive { cursor: default; opacity: 0.7; } .app-filters .mx-buttons button.reset-button span { color: #ffffff; font-size: 16px; } @media (min-width: 768px) { .app-filters.filters-desktop { display: block !important; } .app-filters.filters-mobile { display: none !important; } } @media (max-width: 767px) { .app-filters.filters-desktop { display: none !important; } .app-filters.filters-mobile { display: block !important; } .centercol .app-filters { margin-top: 35px; padding-top: 0 !important; } .app-filters { background: #ffffff !important; margin-bottom: 0; } .app-filters:not(.mx-widget) { background: none !important; } .app-filters .boxhead { display: none; } .app-filters .innerbox .mx-filter { flex-basis: 100% !important; } .app-filters .mx-filter-list_container { width: 100%; } .app-filters button.mx-button { border: none; border-bottom: 1px solid; width: 100%; padding: 11px 15px; box-shadow: none !important; height: auto !important; } .app-filters.mx-widget button.mx-button.show-sort { border: none; } .app-filters.mx-widget button.mx-button.show-sort h5 { text-align: left; width: 100% !important; justify-self: start !important; margin: 0 !important; } .app-filters .mx-sort-list_container { width: 100%; margin-bottom: 15px; } .app-filters .mx-sort-list_container button.mx-button.show-sort { background: #ffffff; border-color: #000000; color: #000000; cursor: default; } .app-filters .mx-sort-list_container.expandable button.mx-button.show-sort { display: grid; grid-template-columns: 1fr 10px; grid-gap: 0 10px; cursor: pointer; } .app-filters .mx-sort-list_container button.mx-button.show-sort h5, .app-filters .mx-sort-list_container button.mx-button.show-sort span.expand { color: #000000; font-size: 16px; text-transform: initial; } .app-filters .mx-sort-list_container button.mx-button.show-sort h5 { margin-top: 0; margin-bottom: 0; width: calc(100% - 20px); justify-self: end; } .app-filters .mx-sort-list_container button.mx-button.show-sort span.expand { font-size: 18px; font-weight: 600; line-height: 21px; } .app-filters .mx-sort-list_container .sort-list { display: none; border: 1px solid #ffffff; background: #ffffff; border-top: none; padding: 5px 0; } .app-filters .mx-sort-list_container:not(.expandable) .sort-list { display: block !important; } .app-filters .mx-sort-list_container .sort-list a.mx-sort { display: block; padding: 5px 15px; color: #000000; font-size: 16px; } .app-filters.mx-widget .mx-sort-list_container .sort-list a.mx-sort { padding: 5px !important; } .app-filters .mx-sort-list_container .sort-list a.mx-sort:focus { outline: none; } .app-filters .mx-sort-list_container .sort-list a.mx-sort.active { font-weight: 600; } .app-filters .mx-filter-list_container button.mx-button.show-filters { background: #ffffff; border-color: #333333; color: #333333; display: grid; grid-template-columns: 1fr 10px; grid-gap: 0 10px; opacity: 1 !important; } .app-filters .mx-filter-list_container button.mx-button.show-filters h5, .app-filters .mx-filter-list_container button.mx-button.show-filters span.expand { color: #333333; font-size: 14px; text-transform: initial; margin: 0 !important; } .app-filters .mx-filter-list_container button.mx-button.show-filters h5 { width: calc(100% - 20px); justify-self: end; } .app-filters .mx-filter-list_container button.mx-button.show-filters span.expand { font-size: 18px; font-weight: 600; line-height: 21px; } .app-filters:not(.mx-widget) .mx-filter-list_container .filter-list { display: none; background: #ffffff; } .app-filters.fx-widget .mx-filter-list_container .filter-list .innerbox { height: auto !important; } .app-filters.mx-widget { position: fixed; width: 80% !important; top: 0; height: 100%; margin-top: 0 !important; z-index: 9999999999; background-color: #ffffff; margin-top: 0 !important; padding-top: 0 !important; } .app-filters.mx-widget.widget-left { left: -80%; border-right: 2px solid #ffffff; transition: 0.5s left; } .app-filters.mx-widget.widget-left.widget-opened { left: 0 !important; } .app-filters.mx-widget.widget-right { right: -80%; border-left: 2px solid #ffffff; transition: 0.5s right; } .app-filters.mx-widget.widget-right.widget-opened { right: 0 !important; } .app-filters.mx-widget button.show-filters { position: absolute; text-align: right; top: 200px; display: flex; align-items: center; justify-content: center; width: 30px; height: 120px; border: 1px solid #d8d8d8; background: #ffffff; transition: none; padding: 0 !important; opacity: 1 !important; } .app-filters.mx-widget.widget-left button.show-filters { right: calc(-2px - 30px); border-top-right-radius: 20px; border-bottom-right-radius: 20px; } .app-filters.mx-widget.widget-right button.show-filters { left: calc(-2px - 30px); border-top-left-radius: 20px; border-bottom-left-radius: 20px; } .app-filters.mx-widget button.show-filters span { color: #333333; font-size: 14px; text-transform: initial; } .app-filters.mx-widget.widget-left button.show-filters span { writing-mode: vertical-lr; } .app-filters.mx-widget.widget-right button.show-filters span { writing-mode: vertical-lr; rotate: 180deg; } .app-filters.mx-widget .mx-filter-list_container { height: 100%; overflow: auto; } .app-filters.mx-widget .mx-filter-list_container::-webkit-scrollbar { background: #ffffff; width: 3px; } .app-filters.mx-widget .mx-filter-list_container::-webkit-scrollbar-thumb { background: #333333; } .app-filters.mx-widget .mx-sort-list_container { background: #ffffff; } .app-filters.mx-widget .mx-sort-list_container .mx-filter-head h5 { font-size: 16px !important; color: #000000 !important; padding: 0 !important; } .app-filters.mx-widget .mx-sort-list_container .mx-filter-head span.expand { color: #000000 !important; } .app-filters.mx-widget .mx-sort-list_container ul.sort-list a { font-size: 16px; color: #000000; } .app-filters .mx-buttons button.multimode-button { background: #971112; border-color: #971112; } .app-filters .mx-buttons button.multimode-button span { color: #ffffff; font-size: 16px; } .app-filters .mx-buttons button.reset-button { background: #000000; border-color: #000000; } .app-filters .mx-buttons button.reset-button span { color: #ffffff; font-size: 16px; } }`;document.getElementsByTagName("head")[0].appendChild(css_assets);jQuery(function($){let config={"active":"1","button_font_size":"14","button_font_color":"#333333","button_bg_color":"#ffffff","widget_font_color":"#111111","widget_borders":"1","widget_border_color":"#d8d8d8","widget_border_thickness":"1","button_position":"200","widget_button_width":"120","widget_button_height":"30","widget_bg_color":"#ffffff","widget_type":"1","atr_show":"1","show_moreless_buttons":"0","moreless_buttons_color":"#fb5642","headers_font_size":"15","desktop_active":"1","desktop_atr_show":"1","desktop_multimode":"1","desktop_multimode-button_size":"16","desktop_multimode-button_color":"#ffffff","desktop_multimode-button_background":"#971112","desktop_multimode-showCategoryFilter":"0","desktop_reset-button_show":"1","desktop_reset-button_size":"16","desktop_reset-button_color":"#ffffff","desktop_reset-button_background":"#000000","mobile_active":"1","mobile_multimode":"1","mobile_multimode-button_size":"16","mobile_multimode-button_color":"#ffffff","mobile_multimode-button_background":"#971112","mobile_multimode-showCategoryFilter":"0","mobile_reset-button_show":"1","mobile_reset-button_size":"16","mobile_reset-button_color":"#ffffff","mobile_reset-button_background":"#000000","mobile_container":"","mobile_sort":"1","mobile_sort-button_size":"16","mobile_sort-button_color":"#000000","mobile_sort-button_background":"#ffffff","__translatable_fields":[],"shop_id":21};let translations={"widget_text":{"__default":"Filtry","pl_PL":"Filtruj"},"more_button":{"__default":"wi\u0119cej","pl_PL":"wi\u0119cej"},"less_button":{"__default":"mniej","pl_PL":"mniej"},"mobile_sort-button_text":{"__default":"Sortowanie","pl_PL":"Sortowanie"},"multimode-button_text":{"__default":"Filtruj","pl_PL":"Zaakceptuj"},"reset-button_text":{"__default":"Wyczy\u015b\u0107 filtry","pl_PL":"Wyczy\u015b\u0107"}};let char_plus="+";let char_minus="−";if(config.shop_id==308){char_plus='';char_minus='';} $.fn.extend({toggleText:function(a,b){if(config.shop_id==308){return this.html(this.html()==b?a:b);} else{return this.text(this.text()==b?a:b);}}});let appFilters={checkIfModulePresent:function(){if($("#box_filter").length){return true;} return false;},getCurrentDevice:function(){let width=window.innerWidth;if(width<=767){return"mobile";} else{return"desktop";}},checkIfCurrentDeviceActive:function(current_device){let searched_value=current_device+"_active";if(parseInt(config[searched_value])){return true;} return false;},generateAppForCurrentDevice:function(current_device,filter_module){let helpers=this.helpers;let generateForDesktop=(module_code,parent_container,module_index)=>{module_code.addClass('filters-desktop');helpers.generateFilterHeads(module_code,parseInt(config.desktop_atr_show));if(parseInt(config.desktop_multimode)){helpers.enableMultimode(module_code,current_device);module_code.find('#filter_price .bottombuttons').remove();} else{helpers.showSelectedOnFilterClick(module_code);} if(parseInt(config['desktop_reset-button_show'])){helpers.enableReset(module_code,current_device);} helpers.countButtons(module_code);if(module_index>0&&parent_container.find(`> *:nth-child(${module_index})`).length){module_code.insertAfter(parent_container.find(`> *:nth-child(${module_index})`));} else{parent_container.prepend(module_code);} if(!parseInt(config.desktop_atr_show)){setTimeout(function(){helpers.applyGrids(false);},1);} $(document).trigger("appZaawansowaneFiltry:desktopReady");};let generateForMobile=(module_code)=>{module_code.addClass('filters-mobile');let widget_type=parseInt(config.widget_type);helpers.generateFilterHeads(module_code,parseInt(config.atr_show));helpers.wrapWithWidgetOrList(module_code,widget_type);if(parseInt(config.mobile_sort)){helpers.enableSorting(module_code,widget_type);} if(parseInt(config.mobile_multimode)){helpers.enableMultimode(module_code);module_code.find('#filter_price .bottombuttons').remove();} else{helpers.showSelectedOnFilterClick(module_code);} if(parseInt(config['mobile_reset-button_show'])){helpers.enableReset(module_code);} helpers.countButtons(module_code);let localization=helpers.getMobileLocalization();localization.prepend(module_code);if(!parseInt(config.atr_show)){setTimeout(function(){helpers.applyGrids(true);},1);} $(document).trigger("appZaawansowaneFiltry:mobileReady");};var filter_module_clone=filter_module.clone(true,false);var filter_module_index=filter_module.index();var filter_parent_container=filter_module.parents("div[class*='s-grid']");filter_module_clone.addClass('app-filters');if(filter_module_clone.find('.multiselect').length){helpers.convertFromMultiselect(filter_module_clone);} else{filter_module_clone.find('.group-filter').addClass('mx-filter');} if(filter_module_clone.find('#filter_price').length){helpers.remakePriceInputs(filter_module_clone);} if(current_device=='desktop'){generateForDesktop(filter_module_clone,filter_parent_container,filter_module_index);} else if(current_device=='mobile'){generateForMobile(filter_module_clone);} else{console.warn("[Zaawansowane Filtry Mobile + Desktop] Nieznane urządzenie!");} helpers.manageMoreLessButtons(filter_module_clone);if(parseInt(config.widget_borders)){filter_module_clone.find('.mx-filter').addClass('border');}},helpers:{convertFromMultiselect:function(object){object.find('.multiselect').each(function(){$(this).off();$(this).removeClass('multiselect').addClass('group group-filter mx-filter');let group_name=$(this).find("> span").text().split(":")[0].trim();$(this).prepend(`