Lines 580-594
Link Here
|
580 |
} else { |
580 |
} else { |
581 |
table.search(term).draw(); |
581 |
table.search(term).draw(); |
582 |
} |
582 |
} |
583 |
clearFilter(term); |
|
|
584 |
} |
585 |
|
586 |
function clearFilter(term) { |
587 |
if (term == "") { |
588 |
$(".dt_button_clear_filter").addClass("disabled"); |
589 |
} else { |
590 |
$(".dt_button_clear_filter").removeClass("disabled"); |
591 |
} |
592 |
} |
583 |
} |
593 |
|
584 |
|
594 |
/* Custom table search configuration: If a table row |
585 |
/* Custom table search configuration: If a table row |
Lines 656-668
Link Here
|
656 |
var opt = $(this).find("option:selected").text(); |
647 |
var opt = $(this).find("option:selected").text(); |
657 |
filterDataTable(table_dt, 2, opt); |
648 |
filterDataTable(table_dt, 2, opt); |
658 |
}); |
649 |
}); |
659 |
|
|
|
660 |
$(".dt_button_clear_filter").on("click", function () { |
661 |
table_dt.search("").columns().search("").draw(); |
662 |
$("#news-filter select").each(function () { |
663 |
$(this).val(""); |
664 |
}); |
665 |
}); |
666 |
}); |
650 |
}); |
667 |
</script> |
651 |
</script> |
668 |
[% ELSE %] |
652 |
[% ELSE %] |
669 |
- |
|
|