';
$('.checked-filters-items').append(sHTML);
/* Na het toevoegen van het filter, het 'verwijderen' van deze set toevoegen */
$('#SelectedGroupFilter'+iParentFilterId).on('click', function () {
iParentFilterId = $(this).attr('data-id');
/* Checkboxes unchecken */
var oCheckbox = $('.Filter-Window[data-id='+iParentFilterId+'] input:checkbox');
if(oCheckbox.length !== 0) {
oCheckbox.each(function (index, element) {
if ($(element).is(':checked')) {
ToggleItem(element.id, true);
}
});
} else {
/* Slider resetten */
var maxValue
var oRangeSlider = $('.Filter-Window[data-id=' + iParentFilterId + ']').find('.rangeslider');
if(oRangeSlider.length !== 0) {
maxValue = oRangeSlider.slider('option', 'max');
oRangeSlider.slider('values', [0, maxValue]).trigger('change');
$('.Filter-Window[data-id=' + iParentFilterId + '] .MinValue .val').html(0);
$('.Filter-Window[data-id=' + iParentFilterId + '] .min-val-input').val(0);
$('.Filter-Window[data-id=' + iParentFilterId + '] .MaxValue .val').html('Onbeperkt');
$('.Filter-Window[data-id=' + iParentFilterId + '] .max-val-input').val(maxValue);
var sType = oRangeSlider.attr('data-type');
if (sType === 'Stock') {
$("#MinStock").val(0);
$("#MaxStock").val(maxValue);
} else if (sType === 'Price') {
$("#MinPrice").val(0);
$("#MaxPrice").val(maxValue);
}
}
}
/* Element verwijderen. */
$(this).remove();
/* Bepalen of de resetknop en header zichtbaar zijn. */
ToggleFilterBlock();
CategoryFilter(true, true, bInfiniteScroll);
});
}
/**
* Als het filter een slider is en er zijn values, maak dan een selected filter aan
*/
function CreateSelectedSlider(oParentFilter) {
var oRangeSlider = oParentFilter.find('.rangeslider');
if (oRangeSlider.length === 0) {
return;
}
var aValues = oRangeSlider.slider('option', 'values');
/* Min en Max value moeten wel anders zijn dan default. Anders is er niks geselecteerd. */
if(aValues[0] === oRangeSlider.slider('option', 'min') && aValues[1] === oRangeSlider.slider('option', 'max')) {
return;
}
var MinHTML = oParentFilter.find('.MinValue').html();
var MaxHTML = oParentFilter.find('.MaxValue').html();
var sParentTitle = GetParentFilterTitile(oParentFilter);
/* Bepalen wat het label is van de regel. */
return sParentTitle + ': ' + MinHTML + ' t/m ' + MaxHTML+ '';
}
/**
* Maakt selected filters aan obv de checkboxes
*/
function CreateSelectedCheckboxes(oParentFilter) {
/* De namen van de geselecteerde checkboxes ophalen. */
let aFilterLables = GetCheckedFilterNamesByParent(oParentFilter);
/* Niks geselecteerd, hoeft hier verder niks te gebeuren. */
if(aFilterLables.length === 0){
return;
}
let sParentTitle = GetParentFilterTitile(oParentFilter);
/* Bepalen wat het label is van de regel. */
return sParentTitle + ': ' + aFilterLables.join(' of ')+ '';
}
function CreateSelectedColors(oParentFilter) {
/* De data (style en class) van de geselecteerde checkboxes ophalen. */
let aFilterLables = GetCheckedColorsNamesByParent(oParentFilter);
/* Niks geselecteerd, hoeft hier verder niks te gebeuren. */
if(aFilterLables.length === 0){
return;
}
let aColorLabels = [];
/* Per geselecteerde kleur een ronde swatch maken. */
for (var i in aFilterLables) {
let sLabel =
'
'+
'
' +
'
'+
'
'+
'
'+
'
';
aColorLabels.push(sLabel);
}
/* Bepalen wat het label is van de regel. */
return aColorLabels.join('');
}
/**
* Haal de title op van de Filter groep. Filter eventueel de voorloop eraf.
*/
function GetParentFilterTitile(oParentFilter) {
var sParentTitle = '';
oParentFilter.find('.Title').each(function () {
/* Voor de sup-filters willen wij enkel wat achter de - staat. */
var sParentValue = $(this).find('a').text().split("-");
sParentTitle = sParentValue.pop().trim();
});
return sParentTitle;
}
/**
* Geeft de namen terug van de geselecteerde filter obv een Group
* @param oParentFilter
* @returns array
* @constructor
*/
function GetCheckedFilterNamesByParent(oParentFilter) {
var aFilterLables = new Array();
oParentFilter.find('li').each(function () {
if ($(this).find('input').prop('checked') === true) {
var filterTitle = $(this).find('a').text().trim();
aFilterLables.push(filterTitle);
}
});
return aFilterLables;
}
/**
* Geeft de style en class terug van de geselecteerde kleurenfilter obv een Group
* @param oParentFilter
* @returns array
* @constructor
*/
function GetCheckedColorsNamesByParent(oParentFilter) {
let aFilterLables = [];
oParentFilter.find('.colors__swatch-round').each(function () {
if ($(this).find('input').prop('checked') === true) {
let filterObject = [];
filterObject['class'] = $(this).data('class');
filterObject['style'] = $(this).data('style');
aFilterLables.push(filterObject);
}
});
return aFilterLables;
}
/**
* Bepalen of de container met filters zichtbaar moeten zijn.
*/
function ToggleFilterBlock() {
if ($('.checked-filters-item').length) {
$('.checked-filters-container').show();
} else {
$('.checked-filters-container').hide();
}
}
/**
* Unchecken van alle geselecteerde filters, verbergen container
* @constructor
*/
function ResetFilters() {
$('.Filter-Window input:checkbox').attr('checked', null);
$('.Filter-Window').each(function () {
var maxValue;
$(this).find('.rangeslider').each(function () {
maxValue = $(this).slider('option', 'max');
$(this).slider('values',[0, maxValue]);
var sType = $(this).attr('data-type');
if (sType === 'Stock') {
$("#MinStock").val(0);
$("#MaxStock").val(maxValue);
} else if (sType === 'Price') {
$("#MinPrice").val(0);
$("#MaxPrice").val(maxValue);
}
});
$(this).find('input:checkbox').prop('checked', false);
$(this).find('.MinValue .val').html(0);
$(this).find('.min-val-input').val(0);
$(this).find('.MaxValue .val').html('Onbeperkt');
$(this).find('.max-val-input').val(maxValue);
});
CategoryFilter(true, true, bInfiniteScroll);
$('.checked-filters-item').remove();
$('.checked-filters-container').hide();
}
' + iNewStaffelPrice;
ePriceElement.find('.Price').html(hNewPrice);
eUnitElement.html(iUnitNumber);
});
$(document).on('change', '.Filter-Window .jsChangeGetResults', function () {
var bInfiniteScroll = false;
ContinueScroll = false;
bShowLoading = false;
CategoryFilter(true,bShowLoading,bInfiniteScroll);
})
if ($('.Filter-Window').length !== 0) {
InitCategoryFilter();
}
});
function InitCategoryFilter () {
FilterKey2Url = false;
var bInfiniteScroll = false;
var bShowLoading = false;
CategoryFilter(false,bShowLoading,bInfiniteScroll);
}
function ChangeLayout(iLayout, iColorScheme, iSecondColorScheme){
$('.layout_link').removeClass('active');
$("#layout_"+iLayout).addClass('active');
$('#filter_properties #CategoryLayoutId').val(iLayout);
$('#filter_properties #ColorSchemeId').val(iColorScheme);
$('#filter_properties #SecondColorSchemeId').val(iSecondColorScheme);
var bInfiniteScroll = false;
ContinueScroll = false;
bShowLoading = false;
CategoryFilter(true,bShowLoading,bInfiniteScroll);
}
var delay;
function CategoryFilter(bResetPaginator, bShowLoading, bInfiniteScroll)
{
if(bResetPaginator == undefined) {
bResetPaginator = false;
}
if(bShowLoading == undefined){
bShowLoading = true;
}
if(bInfiniteScroll == undefined){
bInfiniteScroll = false;
}
clearTimeout(delay);
delay=setTimeout(function(){
if(bShowLoading){
$('.Ajax-Loading').show();
}
var aFilters = new Array;
$("#filter_properties :input:not([type='checkbox'])").each(function(){
var sPropertyName = $(this).attr('id');
var sPropertyValue = $(this).val();
var aProperty = sPropertyName.split('_');
if(aProperty.length > 1) {
// Bij de range slider willen we alleen filteren als de filter ook daadwerkelijk actief is.
if($(".Filter-Window li #ToggleShowAllKeywords_" + aProperty[1]).is(':checked')){
aFilters[sPropertyName] = sPropertyValue;
}
} else {
if(sPropertyValue !== ''){
aFilters[sPropertyName] = sPropertyValue;
}
}
});
// gather all checkbox based checked checkbox values
$(".Filter-Window .Filter298915_checkbox:checked").each(function(){
if((typeof aFilters['ProductPropertyOption']) !== 'object') {
aFilters['ProductPropertyOption'] = [];
}
aFilters['ProductPropertyOption'].push($(this).val());
});
$(".Filter-Window select#Filter_ProductPropertyOption_298915").each(function(){
if((typeof aFilters['ProductPropertyOption']) !== 'object') {
aFilters['ProductPropertyOption'] = [];
}
aFilters['ProductPropertyOption'].push($(this).val());
});
// gather all toggle based checked checkbox values
$(".Filter-Window .Filter298915_toggle:checked").each(function(){
if(aFilters['ProductPropertyOption'] === undefined) {
aFilters['ProductPropertyOption'] = 0;
}
aFilters['ProductPropertyOption'] = $(this).val();
});
// gather all checkbox based checked checkbox values
$(".Filter-Window .Filter298922_checkbox:checked").each(function(){
if((typeof aFilters['ProductPropertyOption']) !== 'object') {
aFilters['ProductPropertyOption'] = [];
}
aFilters['ProductPropertyOption'].push($(this).val());
});
$(".Filter-Window select#Filter_ProductPropertyOption_298922").each(function(){
if((typeof aFilters['ProductPropertyOption']) !== 'object') {
aFilters['ProductPropertyOption'] = [];
}
aFilters['ProductPropertyOption'].push($(this).val());
});
// gather all toggle based checked checkbox values
$(".Filter-Window .Filter298922_toggle:checked").each(function(){
if(aFilters['ProductPropertyOption'] === undefined) {
aFilters['ProductPropertyOption'] = 0;
}
aFilters['ProductPropertyOption'] = $(this).val();
});
// gather all checkbox based checked checkbox values
$(".Filter-Window .Filter299258_checkbox:checked").each(function(){
if((typeof aFilters['ProductPropertyOption']) !== 'object') {
aFilters['ProductPropertyOption'] = [];
}
aFilters['ProductPropertyOption'].push($(this).val());
});
$(".Filter-Window select#Filter_ProductPropertyOption_299258").each(function(){
if((typeof aFilters['ProductPropertyOption']) !== 'object') {
aFilters['ProductPropertyOption'] = [];
}
aFilters['ProductPropertyOption'].push($(this).val());
});
// gather all toggle based checked checkbox values
$(".Filter-Window .Filter299258_toggle:checked").each(function(){
if(aFilters['ProductPropertyOption'] === undefined) {
aFilters['ProductPropertyOption'] = 0;
}
aFilters['ProductPropertyOption'] = $(this).val();
});
// gather all checkbox based checked checkbox values
$(".Filter-Window .Filter298929_checkbox:checked").each(function(){
if((typeof aFilters['ProductPropertyCheckbox']) !== 'object') {
aFilters['ProductPropertyCheckbox'] = [];
}
aFilters['ProductPropertyCheckbox'].push($(this).val());
});
$(".Filter-Window select#Filter_ProductPropertyCheckbox_298929").each(function(){
if((typeof aFilters['ProductPropertyCheckbox']) !== 'object') {
aFilters['ProductPropertyCheckbox'] = [];
}
aFilters['ProductPropertyCheckbox'].push($(this).val());
});
// gather all toggle based checked checkbox values
$(".Filter-Window .Filter298929_toggle:checked").each(function(){
if(aFilters['ProductPropertyCheckbox'] === undefined) {
aFilters['ProductPropertyCheckbox'] = 0;
}
aFilters['ProductPropertyCheckbox'] = $(this).val();
});
// gather all checkbox based checked checkbox values
$(".Filter-Window .Filter298936_checkbox:checked").each(function(){
if((typeof aFilters['ProductPropertyOption']) !== 'object') {
aFilters['ProductPropertyOption'] = [];
}
aFilters['ProductPropertyOption'].push($(this).val());
});
$(".Filter-Window select#Filter_ProductPropertyOption_298936").each(function(){
if((typeof aFilters['ProductPropertyOption']) !== 'object') {
aFilters['ProductPropertyOption'] = [];
}
aFilters['ProductPropertyOption'].push($(this).val());
});
// gather all toggle based checked checkbox values
$(".Filter-Window .Filter298936_toggle:checked").each(function(){
if(aFilters['ProductPropertyOption'] === undefined) {
aFilters['ProductPropertyOption'] = 0;
}
aFilters['ProductPropertyOption'] = $(this).val();
});
// gather all checkbox based checked checkbox values
$(".Filter-Window .Filter298943_checkbox:checked").each(function(){
if((typeof aFilters['ProductPropertyOption']) !== 'object') {
aFilters['ProductPropertyOption'] = [];
}
aFilters['ProductPropertyOption'].push($(this).val());
});
$(".Filter-Window select#Filter_ProductPropertyOption_298943").each(function(){
if((typeof aFilters['ProductPropertyOption']) !== 'object') {
aFilters['ProductPropertyOption'] = [];
}
aFilters['ProductPropertyOption'].push($(this).val());
});
// gather all toggle based checked checkbox values
$(".Filter-Window .Filter298943_toggle:checked").each(function(){
if(aFilters['ProductPropertyOption'] === undefined) {
aFilters['ProductPropertyOption'] = 0;
}
aFilters['ProductPropertyOption'] = $(this).val();
});
// gather all checkbox based checked checkbox values
$(".Filter-Window .Filter299223_checkbox:checked").each(function(){
if((typeof aFilters['ProductPropertyCheckbox']) !== 'object') {
aFilters['ProductPropertyCheckbox'] = [];
}
aFilters['ProductPropertyCheckbox'].push($(this).val());
});
$(".Filter-Window select#Filter_ProductPropertyCheckbox_299223").each(function(){
if((typeof aFilters['ProductPropertyCheckbox']) !== 'object') {
aFilters['ProductPropertyCheckbox'] = [];
}
aFilters['ProductPropertyCheckbox'].push($(this).val());
});
// gather all toggle based checked checkbox values
$(".Filter-Window .Filter299223_toggle:checked").each(function(){
if(aFilters['ProductPropertyCheckbox'] === undefined) {
aFilters['ProductPropertyCheckbox'] = 0;
}
aFilters['ProductPropertyCheckbox'] = $(this).val();
});
// gather all checkbox based checked checkbox values
$(".Filter-Window .Filter374634_checkbox:checked").each(function(){
if((typeof aFilters['ProductPropertyOption']) !== 'object') {
aFilters['ProductPropertyOption'] = [];
}
aFilters['ProductPropertyOption'].push($(this).val());
});
$(".Filter-Window select#Filter_ProductPropertyOption_374634").each(function(){
if((typeof aFilters['ProductPropertyOption']) !== 'object') {
aFilters['ProductPropertyOption'] = [];
}
aFilters['ProductPropertyOption'].push($(this).val());
});
// gather all toggle based checked checkbox values
$(".Filter-Window .Filter374634_toggle:checked").each(function(){
if(aFilters['ProductPropertyOption'] === undefined) {
aFilters['ProductPropertyOption'] = 0;
}
aFilters['ProductPropertyOption'] = $(this).val();
});
//Window(s) active/disabled
$(".Window .Filter-Window").each(function(){
if (aFilters['HideFilter'] === undefined) {
aFilters['HideFilter'] = [];
}
var oElem = $(this).find('div');
if (oElem.hasClass('Disabled')) {
aFilters['HideFilter'].push(oElem.attr('id'));
}
});
if (bResetPaginator) {
aFilters['Page'] = 1;
}
if (bInfiniteScroll) {
aFilters['bInfiniteScroll'] = true;
}
//Ajax call
xajax_CategoryFilter(aFilters);
}, 300);
}
function SetFilterKey(sKey){
if (!FilterKey2Url) {
return;
}
window.location.hash = 'filter:'+sKey;
}
$(document).ready(function(){
// Back button in chrome werkt anders, waardoor de laad meer knop niet werkte na het bezoeken van een andere pagina en dan terug te gaan.
// Zodra er op laad meer is geklikt komt er een hash in de url, dan dus onthouden dat er daar op is geklikt.
var hash = window.location.hash.substr(1);
if(hash) {
$('#Page').val(1);
}
if($(window).height() == $(document).height()){
CategoryFilter(false, false, true);
}
});
//]]>
");
xajax_UpdateAttributeFieldsFloatingBasket(xajax.getFormValues('AttributeBasketForm'), '', '', $('#ProductAmount').val());
}
function processOrder(){
LockOrderButtons();
xajax_AddProductToCart(xajax.getFormValues('Product'));
}
function getContextSelector(contextSelector) {
if(contextSelector === undefined) {
return $(document);
} else {
return $(contextSelector);
}
}
function updatePriceDetail() {
// Zoals vele plekken een lege placeholder. Deze functie wordt o.a. van een categorie weergave met floatingbasket aangeroepen als er attributen geselecteerd moeten worden.
// Zonder deze functie krijg je een JS error
}
Product toegevoegd aan jouw offerte. Ga naar de offerte pagina om jouw offerte aan te vragen, dan nemen wij zo spoedig mogelijk contact met je op.
Prym fournituren kopen? Dat doet u natuurlijk bij KicKenStoffen.nl
Als trots verkooppunt van Prym bieden wij het beste assortiment fournituren van topkwaliteit. Met een breed aanbod van praktische en duurzame fournituren, vindt u bij ons alles voor uw naaiprojecten. Maak uw creaties compleet met de betrouwbare kwaliteit van Prym!