mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2024-11-30 12:36:03 +00:00
row appending properly and gonig to last page
This commit is contained in:
parent
5a8bac8e87
commit
3ce842b52d
@ -239,7 +239,7 @@ foreach (glob($tbl . "*.tbl") as $filename) {
|
||||
'<td><textarea class="form-control">' + string + '</textarea></td>' +
|
||||
'<td><div>' +
|
||||
'<a href="#" class="update-link btn btn-primary" data-rowid="' + rowid + '">Update</a>' +
|
||||
'<a href="#" class="delete-link btn btn-danger" data-rowid="' + rowid + '">Delete</a>' +
|
||||
'<a style="float:right" href="#" class="delete-link btn btn-danger" data-rowid="' + rowid + '">Delete</a>' +
|
||||
'</div></td>' +
|
||||
'</tr>';
|
||||
;
|
||||
@ -250,7 +250,11 @@ foreach (glob($tbl . "*.tbl") as $filename) {
|
||||
|
||||
$('.table tbody').append(newRow);
|
||||
|
||||
$('.table').DataTable();
|
||||
// Initialize DataTables on the table
|
||||
var table = $('.table').DataTable();
|
||||
|
||||
// Go to the last page after loading the table
|
||||
table.page('last').draw('page');
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user