ERR FIX: наложение фильтров
This commit is contained in:
parent
d1839a8005
commit
8cbbd15829
@ -83,22 +83,26 @@
|
||||
{% block JS_1 %}<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#type').change(function(){
|
||||
let point = $(this).find("option:selected").attr('value');
|
||||
if (point === 'tA')
|
||||
let t = $(this).find("option:selected").attr('value');
|
||||
let s = $('#sex').find("option:selected").attr('value');
|
||||
if (t === 'tA')
|
||||
$('tbody > tr').show();
|
||||
else {
|
||||
$('tbody > tr').hide();
|
||||
$('tbody > tr.' + point).show();
|
||||
$('tbody > tr.' + t).show();
|
||||
}
|
||||
if(s !== 'sA') $('tbody > tr:not(.' + s +')').hide();
|
||||
});
|
||||
$('#sex').change(function(){
|
||||
let point = $(this).find("option:selected").attr('value');
|
||||
if (point === 'sA')
|
||||
let s = $(this).find("option:selected").attr('value');
|
||||
let t = $('#type').find("option:selected").attr('value');
|
||||
if (s === 'sA')
|
||||
$('tbody > tr').show();
|
||||
else {
|
||||
$('tbody > tr').hide();
|
||||
$('tbody > tr.' + point).show();
|
||||
$('tbody > tr.' + s).show();
|
||||
}
|
||||
if(s !== 'tA') $('tbody > tr:not(.' + t + ')').hide();
|
||||
});
|
||||
});
|
||||
</script>{% endblock %}
|
Loading…
Reference in New Issue
Block a user