|
Lines 614-626
Link Here
|
| 614 |
thisLine.after(newLine); |
614 |
thisLine.after(newLine); |
| 615 |
}); |
615 |
}); |
| 616 |
|
616 |
|
| 617 |
$(document).on("click", '.ButtonLess', function(e) { |
617 |
$(document).on('click', '.ButtonLess', function (e) { |
| 618 |
e.preventDefault(); |
618 |
e.preventDefault(); |
| 619 |
if( $("a.ButtonLess").length <= 2 ) { |
619 |
if ($('a.ButtonLess').length <= 2) { |
| 620 |
$('.ButtonLess').hide(); |
620 |
$('.ButtonLess').hide(); |
| 621 |
} |
621 |
} |
|
|
622 |
|
| 623 |
let first = $(this).parent().parent().first(); |
| 624 |
let next = $(this).parent().parent().next(); |
| 625 |
let prev = $(this).parent().parent().prev(); |
| 626 |
|
| 622 |
$(this).parent().parent().remove(); |
627 |
$(this).parent().parent().remove(); |
| 623 |
$('.search-term-row .search-term-input select[name="op"]').first().prop("disabled",true).hide(); |
628 |
$('.search-term-row .search-term-input select[name="op"]').first().prop('disabled', true).hide(); |
|
|
629 |
|
| 630 |
let firstInput = first.find(':input:not(:disabled)').first(); |
| 631 |
let nextInput = next.find(':input:not(:disabled)').first(); |
| 632 |
let prevInput = prev.find(':input:not(:disabled)').first(); |
| 633 |
|
| 634 |
if (nextInput.length > 0) { |
| 635 |
nextInput.focus(); |
| 636 |
} else if (prevInput.length > 0) { |
| 637 |
prevInput.focus(); |
| 638 |
} else { |
| 639 |
firstInput.focus(); |
| 640 |
} |
| 624 |
}); |
641 |
}); |
| 625 |
</script> |
642 |
</script> |
| 626 |
[% END %] |
643 |
[% END %] |
| 627 |
- |
|
|