47 lines
1.4 KiB
JavaScript
47 lines
1.4 KiB
JavaScript
var contentTable;
|
|
|
|
function initContentTable() {
|
|
contentTable = $("#contentTable").DataTable({
|
|
info: false,
|
|
paging: false,
|
|
searching: false,
|
|
autoWidth: false,
|
|
order: [],
|
|
select: {
|
|
style: "multi+shift",
|
|
selector: 'th:first-child input[type="checkbox"]'
|
|
},
|
|
columnDefs: [
|
|
{ orderable: false, targets: "no-sort" },
|
|
{
|
|
targets: 0,
|
|
checkboxes: { selectRow: true }
|
|
}
|
|
],
|
|
columns: [
|
|
{
|
|
// Select row checkbox column
|
|
title: '<input type="checkbox" class="form-check-input table-select-all" />',
|
|
data: null,
|
|
orderable: false,
|
|
className: "text-center col-1",
|
|
render: function() {
|
|
return '<input type="checkbox" class="form-check-input table-select-row" />'
|
|
}
|
|
},
|
|
{ title: "GUID", data: "guid", visible: false },
|
|
{
|
|
title: "Name",
|
|
data: "title",
|
|
render: function(data, type, row) {
|
|
return `<a href="#" onclick="showEditFilterModal(${row.id})" class="text-decoration-none">${data}</a>`
|
|
}
|
|
},
|
|
{
|
|
title: "Created", data: "creation_datetime"
|
|
},
|
|
]
|
|
});
|
|
}
|
|
|
|
async function loadContent(guildId) {} |