Merkliste
Merkliste exportieren
Suche
Preisdaten
Sortierung
Farben
Kategorien
Filter
Preisdifferenz

652424"


merken

652524"


merken

652624"


merken

653602"


merken

657502"


merken

4106380"


merken

4106885"


merken

4107078"


merken

4107080"


merken

4107132"


merken

4107133"


merken

4107135"


merken

4107136"


merken

4107766"


merken

4107823"


merken

4107824"


merken

4107825"


merken

4107826"


merken

4107828"


merken

4107829"


merken
`; if (value.system == 'DUPLO') { html += `
`; } if (value.system == 'TECHNIC') { html += `
`; } if (value.pab_init == 0 ) { if (value.isIPElement == 0) { html += `
`; } else { html += `
`; } html += `
`; if (value.price_at == '0.00') { value.price_at = 'unbekannt'; value.price_de = 'unbekannt'; } } var rebrickable_url = `https://rebrickable.com/parts/?q=${value.itemNumber}`; if (value.rebrickable != null && value.rebrickable != "-1" ) { rebrickable_url = `https://rebrickable.com/parts/${value.rebrickable}/`; } var bricklink_url = `https://www.bricklink.com/v2/search.page?tab=P&q=${value.itemNumber}`; if (value.bricklink != null && value.bricklink != "-1" ) { bricklink_url = `https://www.bricklink.com/v2/catalog/catalogitem.page?P=${value.bricklink}`; } var ll_hinweis = ''; var ll_hinweis_2 = "Preis gewichtsabhängig"; var ll_price = numform(parse_any(value.weight)*0.0999,3); var ll_price_member = numform(parse_any(value.weight)*0.08991,3); if (value.ll_overwrite > 0) { ll_price = numform(value.ll_overwrite,3); ll_price_member =numform(value.ll_overwrite*0.9,3); if (value.ll_type == "single") { ll_hinweis = ''; ll_hinweis_2 = "Preis stückabhängig"; } if (value.ll_type == "bundle") { ll_hinweis = ''; ll_hinweis_2 = "Preis pro Teil in einem Bundle"; } if (value.ll_type == "minifig") { ll_hinweis = ''; ll_hinweis_2 = "Preis pro Teil als Minifigur"; } if (value.ll_type == "NA") { ll_hinweis = " (unbekannt)"; } } var eol_marker = ''; if (value.EOL != '0000-00-00 00:00:00') { eol_marker = 'EOL '; } if (moment().diff(value.created, 'days') < 14 ) { eol_marker = 'NEU '; } var bundelicon = ''; if (value.bundle > 0) { bundelicon = ``; } html += `

${value.itemNumber} ${value.designId} ${bundelicon}

Name
${eol_marker}${value.name}
`; if (rb_farbe) { html += `
andere Bezeichnungen
${(rb_farbe==bl_farbe) ? rb_farbe : bl_farbe + " | " + rb_farbe}
`; } html += `
Preis
`; if (pab_merken.nat == 'at') { html += `
€ ${value.price_at}
€ ${value.price_de}
`; } else if (pab_merken.nat == 'de') { html += `
€ ${value.price_at}
€ ${value.price_de}
`; } else { html += `
€ ${value.price_at}
€ ${value.price_de}
`; } html += `
`; if (value.maxOrderQty_at > 0 || value.maxOrderQty_de > 0) { html += `
Bestell Limit
${value.maxOrderQty_at} Stück
${value.maxOrderQty_de} Stück
`; } if (price_compare) { var diff_at = numform(value[price_compare]-value.price_at); var diff_de = numform(value[price_compare]-value.price_de); html += `
Preisdifferenz
€ ${diff_at}
€ ${diff_de}
`; } var hide_bestseller = ''; var lager_span = ''; if (value.pab_init == 0 ) { hide_bestseller = ' d-none'; lager_span = 'style="grid-column: 1/span 2;"'; } html +=`
Bestseller
`; if (value.bestseller_at == value.bestseller_de) { if (value.bestseller_at == 1) { html += ` ja`; } else { html += ` nein`; } } else { if (value.bestseller_at == 1) { html += ` ja
`; } else { html += ` nein
`; } if (value.bestseller_de == 1) { html += ` ja`; } else { html += ` nein`; } } html += `
Lagernd
`; if (value.pab_init == 0 ) { html += ` nicht bei PAB gelistet`; } else if (value.inStock_at == value.inStock_de && value.archiv_at == value.archiv_de) { if (value.inStock_at == 1 && value.archiv_at == 0) { html += ` ja`; } else if (value.archiv_at == 1) { html += ` archiviert`; } else { html += ` nein`; } } else { if (value.inStock_at == 1 && value.archiv_at == 0) { html += ` ja
`; } else if (value.archiv_at == 1) { html += ` archiviert`; } else { html += ` nein
`; } if (value.inStock_de == 1 && value.archiv_de) { html += ` ja`; } else if (value.archiv_de == 1) { html += ` archiviert`; } else { html += ` nein`; } } html += `
`; if (value.isIPElement == 1) { html += `
Stein ist geschützt
`; } html += `
`; var steine_auswahl = $('#easyPaginate').attr('data-selectedview'); var add_onclick = `onclick="pab_add_ml($(this))"`; var remove_onclick = `onclick="pab_remove_ml($(this))"`; var update_focuseout = `onfocusout="pab_update_ml($(this))"`; var btn_display = ''; var counter_display = 'd-none'; if (steine_auswahl.length > 0) { add_onclick = ''; remove_onclick = ''; update_focuseout = ''; btn_display = 'd-none'; counter_display = ''; } html += `
Anzahl
${value?.count??0}
`; html += `
merken
`; html += `
Preise
`; html +=`
Preis PaB
€ ${value.price_at}
 
€ ${value.price_de}
`; if (value.weight !== null || value.ll_type == 'NA') { html +=` `; } html += `
mit Jahreskarte
€ ${ll_price_member}
${ll_hinweis_2}
Bricklink
lade Preise
`; // Ende Preise if (value.rb_name !== null && value.rebrickable !== null && value.rebrickable != -1 && value.rebrickable != -2) { html += `
Rebrickable
Bezeichnung
${value.rb_name}
`; } if (value.bl_name !== null && value.bricklink !== null && value.bricklink != -1 && value.bricklink != -2) { html += `
Bricklink
Bezeichnung
${value.bl_name}
Länge
${value.dimensions_y??'-'}
Breite
${value.dimensions_x??'-'}
Höhe
${value.dimensions_z??'-'}
Gewicht [g]
${value.weight??'-'}
Stück
Summe [g]
`; } html += `
`; count++; }); $('#easyPaginate').html(html); observer.observe(); pab_card_prep(); $('div.pabcountfield').on("keydown", function(e) { //console.log(e.which); if (e.which == 13) { e.preventDefault(); $(this).blur(); } }); $('input.calc2weight').on('input', function() { var weight = $(this).data('weight'); var count = $(this).val(); var target = $(this).data('item'); calc2weight(weight,count,target); }); $('input.calc2count').on('input', function() { var weight = $(this).data('weight'); var count = $(this).val(); var target = $(this).data('item'); calc2count(weight,count,target); }); } function updateURLParameter(url, param, paramVal) { var TheAnchor = null; var newAdditionalURL = ""; var tempArray = url.split("?"); var baseURL = tempArray[0]; var additionalURL = tempArray[1]; var temp = ""; /* if (domain=window.location.hostname == 'brickbank.app') { } else { if (param == 'set' && paramVal.length > 0) { return window.location.origin + '/' + paramVal + '/'; } return baseURL; } */ if (additionalURL) { var tmpAnchor = additionalURL.split("#"); var TheParams = tmpAnchor[0]; TheAnchor = tmpAnchor[1]; if(TheAnchor) additionalURL = TheParams; tempArray = additionalURL.split("&"); for (var i=0; i new_max) { $('#page_range,#page_range_b').val(1); current_page = 1 // } else { $('#page_range,#page_range_b').attr('max', new_max); $('#max_pages,#max_pages_b').html(new_max); } $('#current_page,#current_page_b').html(current_page); $('#page_range,#page_range_b').val(current_page); max_pages = new_max; } function pab_recalibrate_categories () { $('a.pab_cat_switch').find('.counti').html(0); $.each( rs_indb_cat, function( key, value ) { $('a.pab_cat_switch[data-target-cat='+key+']').find('.counti').html(value.count); }); } var delayTimer_pab; function pab_insert_search (e) { var search = e.attr('data-bundle'); $('#desktop_search').val(search); $('#mobile_search').val(search); $('#current_page,#current_page_b').html(1); $('#page_range,#page_range_b').val(1); current_page = 1 $('#desktop_search').trigger('input'); } function pab_add_ml (e) { clearTimeout(delayTimer_pab); var itemNumber = e.attr('data-tid'); var current = parseInt ($('#counttile_'+itemNumber).html()); var new_count = current + 1; pab_merken.items[itemNumber]['count'] = new_count; $('#counttile_'+itemNumber).html(new_count); localStorage.setItem('pab_merken', JSON.stringify(pab_merken)); delayTimer_pab = setTimeout(function() { pab_update_ownshare(); }, 1000); } function pab_update_ml (e) { clearTimeout(delayTimer_pab); var itemNumber = e.attr('data-tid'); var current = parseInt ($('#counttile_'+itemNumber).html()); if (isNaN(current)) { $('#counttile_'+itemNumber).html(pab_merken.items[itemNumber]['count']); return false; } else { pab_merken.items[itemNumber]['count'] = current; } localStorage.setItem('pab_merken', JSON.stringify(pab_merken)); delayTimer_pab = setTimeout(function() { pab_update_ownshare(); }, 1000); } function pab_update_ml_kp (e) { if (e.key === 'Enter') { console.log('Enter Pressed'); } else { console.log(e.which); } } function pab_remove_ml (e) { clearTimeout(delayTimer_pab); var itemNumber = e.attr('data-tid'); var current = parseInt ($('#counttile_'+itemNumber).html()); var new_count = current - 1; if (new_count < 0) { new_count = 0; } pab_merken.items[itemNumber]['count'] = new_count; $('#counttile_'+itemNumber).html(new_count); localStorage.setItem('pab_merken', JSON.stringify(pab_merken)); delayTimer_pab = setTimeout(function() { pab_update_ownshare(); }, 1000); } function pab_flipper_action (designId,itemNumber,colourId,blId = false,weight = 0) { console.log('Flip Daten Laden'); var data = { cardId: designId, itemNumber: itemNumber, colour: colourId, bricklink: blId, weight: weight } $.ajax({ type: "POST", url: "/api/public/ajax/pab_flipper/", data: data, dataType: "json" }) .done(function(response) { if (response.status != 'success') { return false; } var flip_data = response.part_info; var html = '' // Pab Becher if (flip_data?.avg_pab_big_count??false) { html += `
PaB Becher groß
€ ${numform(flip_data.avg_pab_big_price,3)} ≈ ${flip_data.avg_pab_big_count} Stk.
`; } $('.preise_'+flip_data.itemNumber).html(html); // Bricklink html = ''; if ((flip_data?.bricklink?.meta?.code??false) && flip_data.bricklink.meta.code == 200) { var bl_data = flip_data.bricklink; var bricklink_url = `https://www.bricklink.com/v2/catalog/catalogitem.page?P=${blId}#T=P&C=${flip_data.bricklink_colour}`; html += `
Bricklink
min.
€ ${(bl_data.min_price)}
 
avg.
€ ${(bl_data.avg_price)}
 
max.
€ ${(bl_data.max_price)}
`; } else { html = `
Bricklink
leider keine Preisdaten gefunden.
`; } $('.BLpreise_'+flip_data.itemNumber).html(html); $('[data-toggle="tooltip"]').tooltip(); }) .fail(function (jqXHR, exception) { var msg_err = ""; if (jqXHR.status === 0) { msg_err = "Not connect. Verify Network."; } else if (jqXHR.status == 404) { msg_err = "Requested page not found. [404]"; } else if (jqXHR.status == 500) { msg_err = "Internal Server Error [500]."; } else if (exception === "parsererror") { msg_err = "Requested JSON parse failed."; } else if (exception === "timeout") { msg_err = "Time out error."; } else if (exception === "abort") { msg_err = "Ajax request aborted."; } else { msg_err = "Uncaught Error. "+ jqXHR.responseText; } console.log(msg_err); }); } function pab_card_prep() { $('.pab-merken').click(function(){ var itemNumber = $(this).data('rem'); if (Object.keys(pab_merken.items).length == 0) { $('#merkliste-button').removeClass('d-none',300); } if (Object.keys(pab_merken.items).indexOf(String(itemNumber)) < 0) { pab_merken.items[itemNumber] = { itemNumber: itemNumber, count: 1 }; $(this).find('svg.icon').addClass('icon-filled text-yellow'); $('#counttile_'+itemNumber).html(1); $('#counter_'+itemNumber).removeClass('d-none'); } else { var index = Object.keys(pab_merken.items).indexOf(String(itemNumber)); if (index !== -1) { delete pab_merken.items[itemNumber]; } $(this).find('svg.icon').removeClass('icon-filled text-yellow'); $('#counter_'+itemNumber).addClass('d-none'); } if (Object.keys(pab_merken.items).length == 0) { $('#merkliste-button').addClass('d-none',300); } localStorage.setItem('pab_merken', JSON.stringify(pab_merken)); pab_update_ownshare(); $('#merkliste-badge').html(Object.keys(pab_merken.items).length) }); $('input.card-flipper').on('change', function() { var flip = $(this).attr('data-flip'); var datadiv = $(this).next('div.brick-card') if (flip == 0) { pab_flipper_action (datadiv.attr('data-designID'),datadiv.attr('data-itemNumber'),datadiv.attr('data-colour'),datadiv.attr('data-BLID'),datadiv.attr('data-weight')); } var even = datadiv.data('count') % 2 == 0; $(this).next('div.brick-card').toggleClass("col-6 col-12", 450).promise().done(function() { $('html, body').animate({ scrollTop: $(this).offset().top -10 }, 200); }); if (flip == 0 && !even) { $('html, body').animate({ scrollTop: $(this).next('div.brick-card').offset().top -10 }, 100); $(this).attr('data-flip',1) } else if (flip == 0) { $(this).attr('data-flip',1) } else if (!even) { $('html, body').animate({ scrollTop: $(this).prev('div.brick-card').offset().top -10 }, 100); $(this).attr('data-flip',0) } else { $(this).attr('data-flip',0) } $('[data-toggle="tooltip"]').tooltip(); }); $.each( pab_merken.items, function( key, value ) { $('div[data-rem='+key+']').find('svg.icon').addClass('icon-filled text-yellow'); $('#counttile_'+key).html(value.count); $('#counter_'+key).removeClass('d-none'); }); $(".flip-it-desktop").click( function() { console.log('flip'); $(this).removeClass('d-sm-inline'); $(this).next(".flop-it-desktop").addClass('d-sm-inline'); } ); $(".flop-it-desktop").click( function() { console.log('flop'); $(this).removeClass('d-sm-inline'); $(this).prev(".flip-it-desktop").addClass('d-sm-inline'); } ); $(".flip-it-mobile").click( function() { console.log('flip'); $(this).addClass('d-none'); $(this).next(".flop-it-mobile").removeClass('d-none'); } ); $(".flop-it-mobile").click( function() { console.log('flop'); $(this).addClass('d-none'); $(this).prev(".flip-it-mobile").removeClass('d-none'); } ); } // Brickscan function init_brickscan (deep = false) { console.log('Brickscan gestartet'); $('#ajax_load').load('/modal/tool/brick_scan/',function(responseTxt, statusTxt, xhr){ if(statusTxt == "success") { $('#brickscanmodal').modal('toggle'); if (deep) { $('#brickscanmodal').on('shown.bs.modal', function (e) { setTimeout(() => { //$('#scanner').trigger('touchstart'); }, 250); console.log('modal geladen.'); }) } } }); } function init_import() { return false; } PagerThePaginator (current_page,ItemsPerPage,max_pages); $(document).ready(function(){ if (urlParams.get('scan') == 'true') { init_brickscan(true); console.log('Scanmodus gestartet'); base_url= updateURLParameter(window.location.origin+'/pab/', 'scan', 'true'); window.history.replaceState('', '', base_url); } if (Object.keys(pab_merken.items).length > 0) { $('#merkliste-badge').html(Object.keys(pab_merken.items).length) } pab_card_prep(); $('.pab_cat_switch').click(function(e){ var cat = $(this).attr('data-target-cat'); var href = $(this).attr('href'); if ($(this).closest("li.active").length) { $(this).closest("li.active").removeClass('active bg-blue-lt'); $(this).children('span.nav-link-icon').first().addClass('d-none'); cat = ''; href = window.location.href.split(/[?#]/)[0]; } else if ($(this).closest("li.nav-item").length) { $(this).closest("li.nav-item").siblings('li.active').find('span.nav-link-icon').addClass('d-none'); $(this).closest("li.nav-item").siblings('li.active').removeClass('active bg-blue-lt'); $(this).closest("li.nav-item").addClass('active bg-blue-lt'); $(this).children('span.nav-link-icon').first().removeClass('d-none'); } else if ($(this).hasClass("active")) { $(this).removeClass('active'); $(this).children('svg.icon-tabler-x').first().addClass('d-none'); cat = ''; href = window.location.href.split(/[?#]/)[0]; } else { $(this).closest('div.list-group').find('a.active').find('svg.icon-tabler-x').first().addClass('d-none'); $(this).closest('div.list-group').find('a.active').removeClass('active'); $(this).addClass('active'); $(this).children('svg.icon-tabler-x').first().removeClass('d-none'); } if (cat == '') { $('#mobile-filter-indicator').find('svg').removeClass('icon-filled text-orange'); $('#mobile-filter-indicator').find('span.text').html('Filter'); } else { $('#mobile-filter-indicator').find('svg').addClass('icon-filled text-orange'); $('#mobile-filter-indicator').find('span.text').html(rs_indb_cat[cat]?.name??'Filter'); } window.history.replaceState('', '', href); $('#easyPaginate').attr('data-selectedcat', cat); current_page = 1 PagerThePaginator (current_page,ItemsPerPage,max_pages); e.preventDefault(); }); $('#page_range,#page_range_b').on('input', function () { current_page = $(this).val(); $('#current_page,#current_page_b').html(current_page); $('#pagination_prv,#pagination_prv_b').removeClass('disabled'); $('#pagination_nxt,#pagination_nxt_b').removeClass('disabled'); if (current_page == max_pages) { $('#pagination_nxt,#pagination_nxt_b').addClass('disabled'); } if (current_page == 1) { $('#pagination_prv,#pagination_prv_b').addClass('disabled'); } }).on('change', function () { PagerThePaginator (current_page,ItemsPerPage,max_pages); $('#page_range,#page_range_b').val(current_page); }); $('#pagination_nxt,#pagination_nxt_b').click(function(){ if (current_page == max_pages) { return false; } ++current_page; $('#current_page,#current_page_b').html(current_page); $('#pagination_prv,#pagination_prv_b').removeClass('disabled'); $('#page_range,#page_range_b').val(current_page); PagerThePaginator (current_page,ItemsPerPage,max_pages); if (current_page == max_pages) { $('#pagination_nxt,#pagination_nxt_b').addClass('disabled'); } }); $('#pagination_prv,#pagination_prv_b').click(function(){ if (current_page == 1) { return false; } --current_page; $('#current_page,#current_page_b').html(current_page); $('#pagination_nxt,#pagination_nxt_b').removeClass('disabled'); $('#page_range,#page_range_b').val(current_page); PagerThePaginator (current_page,ItemsPerPage,max_pages); if (current_page == 1) { $('#pagination_prv,#pagination_prv_b').addClass('disabled'); } }); $('#pab_duplo_filter,#pab_duplo_filter_m').click(function(){ if ($(this).is(':checked')) { pab_duplo_filter = true; $('#pab_duplo_filter,#pab_duplo_filter_m').prop( "checked", true ); pab_merken.filter.duplo = true; localStorage.setItem('pab_merken', JSON.stringify(pab_merken)); $('#mobile-filter-indicator').find('svg').addClass('icon-filled text-orange'); } else { pab_duplo_filter = false; $('#pab_duplo_filter,#pab_duplo_filter_m').prop( "checked", false ); pab_merken.filter.duplo = false; localStorage.setItem('pab_merken', JSON.stringify(pab_merken)); if ($('#easyPaginate').attr('data-selectedcat') == '' && !pab_duplo_filter && !pab_print_filter && !pab_limited_filte && !pab_nonpab_filter && !pab_archiv_filter) { $('#mobile-filter-indicator').find('svg').removeClass('icon-filled text-orange'); } } PagerThePaginator (current_page,ItemsPerPage,max_pages); }); $('#pab_print_filter,#pab_print_filter_m').click(function(){ if ($(this).is(':checked')) { pab_print_filter = true; $('#pab_print_filter,#pab_print_filter_m').prop( "checked", true ); pab_merken.filter.print = true; localStorage.setItem('pab_merken', JSON.stringify(pab_merken)); $('#mobile-filter-indicator').find('svg').addClass('icon-filled text-orange'); } else { pab_print_filter = false; $('#pab_print_filter,#pab_print_filter_m').prop( "checked", false ); pab_merken.filter.print = false; localStorage.setItem('pab_merken', JSON.stringify(pab_merken)); if ($('#easyPaginate').attr('data-selectedcat') == '' && !pab_duplo_filter && !pab_print_filter && !pab_limited_filter && !pab_nonpab_filter && !pab_archiv_filter) { $('#mobile-filter-indicator').find('svg').removeClass('icon-filled text-orange'); } } PagerThePaginator (current_page,ItemsPerPage,max_pages); }); $('#pab_nonpab_filter,#pab_nonpab_filter_m').click(function(){ if ($(this).is(':checked')) { pab_nonpab_filter = false; $('#pab_nonpab_filter,#pab_nonpab_filter_m').prop( "checked", true ); pab_merken.filter.nonpab = false; localStorage.setItem('pab_merken', JSON.stringify(pab_merken)); $('#mobile-filter-indicator').find('svg').addClass('icon-filled text-orange'); } else { pab_nonpab_filter = true; $('#pab_nonpab_filter,#pab_nonpab_filter_m').prop( "checked", false ); pab_merken.filter.nonpab = true; localStorage.setItem('pab_merken', JSON.stringify(pab_merken)); if ($('#easyPaginate').attr('data-selectedcat') == '' && !pab_duplo_filter && !pab_print_filter && !pab_limited_filter && !pab_nonpab_filter && !pab_archiv_filter) { $('#mobile-filter-indicator').find('svg').removeClass('icon-filled text-orange'); } } PagerThePaginator (current_page,ItemsPerPage,max_pages); }); $('#pab_archiv_filter,#pab_archiv_filter_m').click(function(){ if ($(this).is(':checked')) { pab_archiv_filter = true; $('#pab_archiv_filter,#pab_archiv_filterm').prop( "checked", true ); pab_merken.filter.archiv = true; localStorage.setItem('pab_merken', JSON.stringify(pab_merken)); $('#mobile-filter-indicator').find('svg').addClass('icon-filled text-orange'); } else { pab_archiv_filter = false; $('#pab_archiv_filter,#pab_archiv_filter_m').prop( "checked", false ); pab_merken.filter.archiv = false; localStorage.setItem('pab_merken', JSON.stringify(pab_merken)); if ($('#easyPaginate').attr('data-selectedcat') == '' && !pab_duplo_filter && !pab_print_filter && !pab_limited_filter && !pab_nonpab_filter && !pab_archiv_filter) { $('#mobile-filter-indicator').find('svg').removeClass('icon-filled text-orange'); } } PagerThePaginator (current_page,ItemsPerPage,max_pages); }); $('#pab_limited_filter,#pab_limited_filter_m').click(function(){ if ($(this).is(':checked')) { pab_limited_filter = true; $('#pab_limited_filter,#pab_limited_filter_m').prop( "checked", true ); pab_merken.filter.limited = true; localStorage.setItem('pab_merken', JSON.stringify(pab_merken)); $('#mobile-filter-indicator').find('svg').addClass('icon-filled text-orange'); } else { pab_limited_filter = false; $('#pab_limited_filter,#pab_limited_filter_m').prop( "checked", false ); pab_merken.filter.limited = false; localStorage.setItem('pab_merken', JSON.stringify(pab_merken)); if ($('#easyPaginate').attr('data-selectedcat') == '' && !pab_duplo_filter && !pab_print_filter && !pab_limited_filter && !pab_nonpab_filter && !pab_archiv_filter) { $('#mobile-filter-indicator').find('svg').removeClass('icon-filled text-orange'); } } PagerThePaginator (current_page,ItemsPerPage,max_pages); }); $('#pab_merken_filter,#pab_merken_filter_m').click(function(){ if ($(this).is(':checked')) { $('#easyPaginate').attr('data-merken',1); current_page = 1; $('#pab_merken_filter,#pab_merken_filter_m').prop( "checked", true ); } else { $('#easyPaginate').attr('data-merken',0); current_page = 1; $('#pab_merken_filter,#pab_merken_filter_m').prop( "checked", false ); } PagerThePaginator (current_page,ItemsPerPage,'page'); }); // Suche var delayTimer_desktop; $('#desktop_search').on('input',function(e){ clearTimeout(delayTimer_desktop); var search_query = $('#desktop_search').val(); if (search_query.length >= 3 || search_query.length == 0) { delayTimer_desktop = setTimeout(function() { PagerThePaginator (1,ItemsPerPage,max_pages); }, 500); } if (search_query.length > 0) { var icon_addon = ` `; $(this).siblings('span.input-group-text').html(icon_addon); $('a.clear_search').click(function(){ $('#desktop_search').val('').trigger("input"); $('#mobile_search').val('').trigger("input"); }); } else { var icon_addon = ` `; $(this).siblings('span.input-group-text').html(icon_addon); } }); // Suche var delayTimer_mobile; $('#mobile_search').on('input',function(e){ clearTimeout(delayTimer_mobile); var search_query = $('#mobile_search').val(); if (search_query.length >= 3 || search_query.length == 0) { delayTimer_mobile = setTimeout(function() { PagerThePaginator (current_page,ItemsPerPage,max_pages); }, 500); } if (search_query.length > 0) { var icon_addon = ` `; $(this).siblings('span.input-group-text').html(icon_addon); $('a.clear_search').click(function(){ $('#desktop_search').val('').trigger("input"); $('#mobile_search').val('').trigger("input"); }); $('#search-menu-icon').addClass('text-green icon-pulse'); } else { var icon_addon = ` `; $(this).siblings('span.input-group-text').html(icon_addon); $('#search-menu-icon').removeClass('text-green icon-pulse'); } }); $('input.search-fields').click(function(){ var search_query_d = $('#desktop_search').val(); var fields = []; $("input[name='search-fields-d']:checked").each(function(){fields.push($(this).attr('data-field-name'));}); if (Object.keys(fields).length > 0) { $('#desktop_search').attr('placeholder', fields.join('/')) } else { $('#desktop_search').attr('placeholder', 'Name/Elementnummer/Designnummer') } if (search_query_d.length >= 3) { PagerThePaginator (current_page,ItemsPerPage,max_pages); } }); $('input.search-fields-m').change(function(){ var search_query_m = $('#mobile_search').val(); var fields = []; $("input[name='search-fields-m']:checked").each(function(){fields.push($(this).attr('data-field-name'));}); if (Object.keys(fields).length > 0) { $('#mobile_search').attr('placeholder', fields.join('/')) } else { $('#mobile_search').attr('placeholder', 'Name/Elementnummer/Designnummer') } if (search_query_m.length >= 3) { PagerThePaginator (current_page,ItemsPerPage,max_pages); } }); $('#btn-radio-pricediff input').change(function(){ PagerThePaginator (current_page,ItemsPerPage,max_pages); }); $('#btn-radio-pricediff-m input').change(function(){ if ($('#btn-radio-pricediff-none-m').is(':checked')) { $('#btn-radio-pricediff-none').attr('checked', true); $('#btn-radio-pricediff-ll').attr('checked', false); $('#btn-radio-pricediff-bl').attr('checked', false); } if ($('#btn-radio-pricediff-ll-m').is(':checked')) { $('#btn-radio-pricediff-none').attr('checked', false); $('#btn-radio-pricediff-ll').attr('checked', true); $('#btn-radio-pricediff-bl').attr('checked', false); } if ($('#btn-radio-pricediff-bl-m').is(':checked')) { $('#btn-radio-pricediff-none').attr('checked', false); $('#btn-radio-pricediff-ll').attr('checked', false); $('#btn-radio-pricediff-bl').attr('checked', true); } PagerThePaginator (current_page,ItemsPerPage,max_pages); $('#filter-menu').collapse('hide'); }); $('.pab_price_switch').click(function(){ var nat = $(this).attr('data-nat'); $('#btn-nat-'+nat+'-d,#btn-nat-'+nat+'-m').prop( "checked", true ); console.log(nat); if (nat == 'at') { $('.pab_price_at').removeClass('d-none'); $('.pab_price_de').addClass('d-none'); } else if (nat == 'de') { $('.pab_price_de').removeClass('d-none'); $('.pab_price_at').addClass('d-none'); } else { $('.pab_price_at').removeClass('d-none'); $('.pab_price_de').removeClass('d-none'); } pab_merken.nat = nat; localStorage.setItem('pab_merken', JSON.stringify(pab_merken)); $('#filter-menu').collapse('hide'); }); if (pab_merken?.memory??false) { $('button.btn-info').removeClass('d-none').click(function(e){ init_brickscan(); e.preventDefault(); }); } }); // Merkliste function init_favoriten (toggle = true) { $('#ajax_load').load('/modal/pab/merkliste/',function(responseTxt, statusTxt, xhr){ if(statusTxt == "success") { $('#merkliste-modal').modal('toggle'); } }); } var node = document.getElementById("pab_item_count"); var longpress = false; var presstimer = null; var longtarget = null; var cancel = function(e) { if (presstimer !== null) { clearTimeout(presstimer); presstimer = null; } this.classList.remove("longpress"); }; var click = function(e) { if (presstimer !== null) { clearTimeout(presstimer); presstimer = null; } this.classList.remove("longpress"); if (longpress) { return false; } }; var start = function(e) { console.log(e); if (e.type === "click" && e.button !== 0) { return; } longpress = false; this.classList.add("longpress"); if (presstimer === null) { presstimer = setTimeout(function() { init_brickscan(); longpress = true; }, 1000); } return false; }; node.addEventListener("mousedown", start); node.addEventListener("touchstart", start); node.addEventListener("click", click); node.addEventListener("mouseout", cancel); node.addEventListener("touchend", cancel); node.addEventListener("touchleave", cancel); node.addEventListener("touchcancel", cancel); -->