Add record comment

This commit is contained in:
Khanh Ngo
2019-12-09 17:50:48 +07:00
parent c1fae6f3dd
commit bca3c45e37
10 changed files with 158 additions and 64 deletions

View File

@ -41,6 +41,7 @@
<th>Status</th>
<th>TTL</th>
<th>Data</th>
<th>Comment</th>
<th>Edit</th>
<th>Delete</th>
<th>ID</th>
@ -64,6 +65,9 @@
<td class="length-break">
{{ record.data }}
</td>
<td class="length-break">
{{ record.comment }}
</td>
<td width="6%">
<button type="button" class="btn btn-flat btn-warning button_edit">
Edit&nbsp;<i class="fa fa-edit"></i>
@ -119,20 +123,20 @@
"columnDefs": [
{
type: 'natural',
targets: [0, 4]
targets: [0, 5]
},
{
// hidden column so that we can add new records on top
// regardless of whatever sorting is done
// regardless of whatever sorting is done. See orderFixed
visible: false,
targets: [ 7 ]
targets: [ 8 ]
},
{
className: "length-break",
targets: [ 4 ]
targets: [ 5 ]
}
],
"orderFixed": [[7, 'asc']]
"orderFixed": [[8, 'asc']]
});
// handle delete button
@ -223,7 +227,7 @@
// add new row
var default_type = records_allow_edit[0]
var nRow = jQuery('#tbl_records').dataTable().fnAddData(['', default_type, 'Active', 3600, '', '', '', '0']);
var nRow = jQuery('#tbl_records').dataTable().fnAddData(['', default_type, 'Active', 3600, '', '', '', '', '0']);
editRow($("#tbl_records").DataTable(), nRow);
document.getElementById("edit-row-focus").focus();
nEditing = nRow;