Working "tous" filter for tags
This commit is contained in:
@ -237,6 +237,26 @@ jQuery(document).ready(function($)
|
||||
// handle tags
|
||||
function handleTags()
|
||||
{
|
||||
$('input[name="tags"]').change(function()
|
||||
{
|
||||
params["tag"] = []; // remove filter
|
||||
if (this.checked)
|
||||
{
|
||||
$('select[name="tag"] option[value=""]').prop('selected', true);
|
||||
$('select[name="tag"]').attr('disabled', 'disabled');
|
||||
$(".box.tags span:not(.first) select").parent().remove();
|
||||
}
|
||||
else
|
||||
$('select[name="tag"]').removeAttr('disabled');
|
||||
|
||||
selectedOptions = gatherURLdata();
|
||||
data = originalData;
|
||||
filterData(selectedOptions);
|
||||
availableOptions = [];
|
||||
availableOptions = gatherData();
|
||||
updateMenu(availableOptions);
|
||||
});
|
||||
|
||||
$('.box.tags .item-cont').delegate('select[name="tag"]', 'change', function()
|
||||
{
|
||||
params.tag = []; // collect all tags from all dropdowns
|
||||
@ -344,7 +364,7 @@ jQuery(document).ready(function($)
|
||||
filterData(selectedOptions);
|
||||
availableOptions = [];
|
||||
availableOptions = gatherData();
|
||||
updateMenu(availableOptions);
|
||||
updateMenu(availableOptions);
|
||||
});
|
||||
|
||||
$('select[name="' + name + '"]').change(function()
|
||||
|
Reference in New Issue
Block a user