ปรับปรุงการเรียงลำดับหลายข้อ
This commit is contained in:
@@ -177,7 +177,7 @@ function eva_create_evaluation_detail_firstdoc_GoDelete(a) {
|
||||
var eva_create_evaluation_detail_firstdocTableV;
|
||||
|
||||
var eva_create_evaluation_detail_firstdoc_setupTable = function (result) {
|
||||
console.log(result);
|
||||
var groupColumn = 6;
|
||||
|
||||
tmp = '"';
|
||||
eva_create_evaluation_detail_firstdocTableV = $('#eva_create_evaluation_detail_firstdocTable').DataTable({
|
||||
@@ -205,13 +205,29 @@ var eva_create_evaluation_detail_firstdoc_setupTable = function (result) {
|
||||
"render": function (data, type, row, meta) {
|
||||
return "<button type='button' class='btn btn-warning btn-sm' onclick='javascript:eva_create_evaluation_detail_firstdoc_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> ";
|
||||
}
|
||||
}
|
||||
},
|
||||
{ "visible": false, "targets": groupColumn }
|
||||
],
|
||||
"language": {
|
||||
"url": appsite + "/DataTables-1.10.16/thai.json"
|
||||
},
|
||||
"paging": true,
|
||||
"searching": false
|
||||
"searching": false,
|
||||
"drawCallback": function (settings) {
|
||||
var api = this.api();
|
||||
var rows = api.rows({ page: 'current' }).nodes();
|
||||
var last = null;
|
||||
|
||||
api.column(groupColumn, { page: 'current' }).data().each(function (group, i) {
|
||||
if (last !== group) {
|
||||
$(rows).eq(i).before(
|
||||
'<tr class="group"><td colspan="12">' + group + '</td></tr>'
|
||||
);
|
||||
|
||||
last = group;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
endLoad();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user