Update on filter
This commit is contained in:
@ -109,26 +109,34 @@ function updateMenu(availableOptions)
|
||||
{
|
||||
console.log("updateMenu", availableOptions);
|
||||
|
||||
$('.photos input, .photos input + label').each(function()
|
||||
function checkItem(name, array)
|
||||
{
|
||||
if (this.value != "all")
|
||||
$(this).css('color', 'red');
|
||||
$('.'+name+' .item-cont span').each(function()
|
||||
{
|
||||
$(this).addClass("filter");
|
||||
});
|
||||
for (a of array)
|
||||
{
|
||||
$('.'+name+' .item-cont span input[id="'+a+'"]').parent().removeClass("filter");
|
||||
}
|
||||
}
|
||||
|
||||
checkItem("photos", availableOptions.photos);
|
||||
checkItem("years", availableOptions.years);
|
||||
checkItem("months", availableOptions.months);
|
||||
checkItem("genres", availableOptions.genres);
|
||||
checkItem("themes", availableOptions.themes);
|
||||
checkItem("dimensions", availableOptions.dimensions);
|
||||
checkItem("help", availableOptions.helps);
|
||||
|
||||
/*$('.photos .item-cont span').each(function()
|
||||
{
|
||||
$(this).addClass("filter");
|
||||
});
|
||||
for (a of availableOptions.photos)
|
||||
{
|
||||
$('.photos input[id="' + a + '"], .photos input[id="' + a + '"] + label').css('color', 'black');
|
||||
}
|
||||
|
||||
/*$('.photos input').each(function()
|
||||
{
|
||||
console.log(this.id);
|
||||
for (i of availableOptions.photos)
|
||||
{
|
||||
console.log("fuck", this.id, i);
|
||||
if (this.id != i)
|
||||
$(this).hide();
|
||||
}
|
||||
});*/
|
||||
$('.photos .item-cont span input[id="'+a+'"]').parent().removeClass("filter");
|
||||
}*/
|
||||
}
|
||||
|
||||
function URLGeneration(availableOptions)
|
||||
|
Reference in New Issue
Block a user