Merge #16672 - Fix #16671 - by using .last() properly

Ref: #15801
Ref: #15792


Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2021-02-20 01:06:44 +01:00
commit f1edbfbf2d
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -740,7 +740,7 @@ function addNewContinueInsertionFields (event) {
// Insert/Clone the ignore checkboxes
if (currRows === 1) {
$('<input id="insert_ignore_1" type="checkbox" name="insert_ignore_1" checked="checked">')
.insertBefore('table.insertRowTable').last()
.insertBefore($('table.insertRowTable').last())
.after('<label for="insert_ignore_1">' + Messages.strIgnore + '</label>');
} else {
/**
@ -756,21 +756,21 @@ function addNewContinueInsertionFields (event) {
var newName = lastCheckboxName.replace(/\d+/, lastCheckboxIndex + 1);
$('<br><div class="clearfloat"></div>')
.insertBefore('table.insertRowTable').last();
.insertBefore($('table.insertRowTable').last());
$lastCheckbox
.clone()
.attr({ 'id': newName, 'name': newName })
.prop('checked', true)
.insertBefore('table.insertRowTable').last();
.insertBefore($('table.insertRowTable').last());
$('label[for^=insert_ignore]').last()
.clone()
.attr('for', newName)
.insertBefore('table.insertRowTable').last();
.insertBefore($('table.insertRowTable').last());
$('<br>')
.insertBefore('table.insertRowTable').last();
.insertBefore($('table.insertRowTable').last());
}
currRows++;
}