chess/public/assets/js/pages/crud/datatables/extensions/fixedheader.min.js

1 line
2.0 KiB
JavaScript
Raw Permalink Normal View History

2024-08-29 03:56:32 +00:00
"use strict";var KTDatatablesExtensionsFixedheader={init:function(){$("#kt_table_1").DataTable({responsive:!0,fixedHeader:{header:!0,headerOffset:$("#kt_header").height()},paging:!1,columnDefs:[{targets:-1,title:"Actions",orderable:!1,render:function(e,a,t,n){return'\n <span class="dropdown">\n <a href="#" class="btn btn-sm btn-clean btn-icon btn-icon-md" data-toggle="dropdown" aria-expanded="true">\n <i class="la la-ellipsis-h"></i>\n </a>\n <div class="dropdown-menu dropdown-menu-right">\n <a class="dropdown-item" href="#"><i class="la la-edit"></i> Edit Details</a>\n <a class="dropdown-item" href="#"><i class="la la-leaf"></i> Update Status</a>\n <a class="dropdown-item" href="#"><i class="la la-print"></i> Generate Report</a>\n </div>\n </span>\n <a href="#" class="btn btn-sm btn-clean btn-icon btn-icon-md" title="View">\n <i class="la la-edit"></i>\n </a>'}},{width:"75px",targets:8,render:function(e,a,t,n){var l={1:{title:"Pending",class:"label-primary"},2:{title:"Delivered",class:" label-danger"},3:{title:"Canceled",class:" label-primary"},4:{title:"Success",class:" label-success"},5:{title:"Info",class:" label-info"},6:{title:"Danger",class:" label-danger"},7:{title:"Warning",class:" label-warning"}};return void 0===l[e]?e:'<span class="label '+l[e].class+' label-inline label-pill">'+l[e].title+"</span>"}},{width:"75px",targets:9,render:function(e,a,t,n){var l={1:{title:"Online",state:"danger"},2:{title:"Retail",state:"primary"},3:{title:"Direct",state:"success"}};return void 0===l[e]?e:'<span class="label label-'+l[e].state+' label-dot"></span>&nbsp;<span class="font-weight-bold text-'+l[e].state+'">'+l[e].title+"</span>"}}]})}};jQuery(document).ready(function(){KTDatatablesExtensionsFixedheader.init()});