agdar/static/js/demo/table-manage-combine.demo.js
2025-11-02 14:35:35 +03:00

48 lines
1.3 KiB
JavaScript
Executable File

/*
Template Name: Color Admin - Responsive Admin Dashboard Template build with Twitter Bootstrap 5
Version: 5.5.1
Author: Sean Ngu
Website: http://www.seantheme.com/color-admin/
*/
var handleDataTableCombinationSetting = function() {
"use strict";
if ($('#data-table-combine').length !== 0) {
var options = {
dom: '<"row mb-3"<"col-lg-8 d-lg-block"<"d-flex d-lg-inline-flex justify-content-center mb-md-2 mb-lg-0 me-0 me-md-3"l><"d-flex d-lg-inline-flex justify-content-center mb-md-2 mb-lg-0 "B>><"col-lg-4 d-flex d-lg-block justify-content-center"fr>>t<"row mt-3"<"col-md-auto me-auto"i><"col-md-auto ms-auto"p>>',
buttons: [
{ extend: 'copy', className: 'btn-sm' },
{ extend: 'csv', className: 'btn-sm' },
{ extend: 'excel', className: 'btn-sm' },
{ extend: 'pdf', className: 'btn-sm' },
{ extend: 'print', className: 'btn-sm' }
],
responsive: true,
colReorder: true,
keys: true,
rowReorder: true,
select: true
};
if ($(window).width() <= 767) {
options.rowReorder = false;
options.colReorder = false;
}
$('#data-table-combine').DataTable(options);
}
};
var TableManageCombine = function () {
"use strict";
return {
//main function
init: function () {
handleDataTableCombinationSetting();
}
};
}();
$(document).ready(function() {
TableManageCombine.init();
});