refactor datatables
This commit is contained in:
@@ -43,13 +43,13 @@
|
||||
<tr role="row">
|
||||
<th class="checkbox-column sorting_asc text-center" tabindex="0"
|
||||
aria-controls="style-3" aria-sort="ascending"
|
||||
style="width: 50.2656px;">#</th>
|
||||
style="width: 50.2656px;">Record Id</th>
|
||||
<th class="sorting text-center" tabindex="1" aria-controls="style-3"
|
||||
colspan="1"
|
||||
style="width: 44.2344px;">Email Address</th>
|
||||
<th class="sorting text-center" tabindex="2" aria-controls="style-3"
|
||||
colspan="1"
|
||||
style="width: 44.2344px;">Subject</th>
|
||||
style="width: 44.2344px;">Reaction</th>
|
||||
<th class="sorting text-center" tabindex="3" aria-controls="style-3"
|
||||
colspan="1"
|
||||
style="width: 44.2344px;">Message</th>
|
||||
@@ -161,8 +161,8 @@ function initializeDataTable(tableName, mainUrl) {
|
||||
debug: true,
|
||||
columnDefs: [
|
||||
{
|
||||
"targets": [3],
|
||||
"render": function (data, type, row) {
|
||||
targets: [3],
|
||||
render: function (data, type, row) {
|
||||
// Adjust the length of text you want to show before truncating
|
||||
var maxLength = 40;
|
||||
// Truncate the text if it exceeds the maxLength
|
||||
@@ -172,10 +172,10 @@ function initializeDataTable(tableName, mainUrl) {
|
||||
}
|
||||
},
|
||||
{
|
||||
targets: [1, 2, 3],
|
||||
targets: [0, 1, 2, 3],
|
||||
searchable: true,
|
||||
orderable: true
|
||||
}
|
||||
},
|
||||
],
|
||||
dom: "<'dt--top-section'<'row'<'col-12 col-sm-6 d-flex justify-content-sm-start justify-content-center'l><'col-12 col-sm-6 d-flex justify-content-sm-end justify-content-center mt-sm-0 mt-3'Bf>>>" +
|
||||
"<'table-responsive'tr>" +
|
||||
|
||||
Reference in New Issue
Block a user