chess/public/assets/js/pages/crud/ktdatatable/api/events.min.js

1 line
9.2 KiB
JavaScript
Raw Normal View History

2024-08-29 03:56:32 +00:00
"use strict";var KTDefaultDatatableDemo=function(){var t=function(t){var a=$("#kt_datatable_console").append(t+"\t\n");$(a).scrollTop(a[0].scrollHeight-$(a).height())};return{init:function(){var a;a=$("#kt_datatable").KTDatatable({data:{type:"remote",source:{read:{url:HOST_URL+"/api/datatables/demos/default.php"}},pageSize:5,serverPaging:!0,serverFiltering:!0,serverSorting:!0},layout:{scroll:!0,minHeight:null,footer:!1},sortable:!0,toolbar:{placement:["bottom"],items:{pagination:{pageSizeSelect:[5,10,20,30,50]}}},search:{input:$("#kt_datatable_search_query"),key:"generalSearch"},columns:[{field:"RecordID",title:"#",sortable:!1,width:30,type:"number",selector:{class:"checkbox"},textAlign:"center"},{field:"OrderID",title:"Order ID"},{field:"Country",title:"Country",template:function(t){return t.Country+" "+t.ShipCountry}},{field:"ShipDate",title:"Ship Date",type:"date",format:"MM/DD/YYYY"},{field:"CompanyName",title:"Company Name"},{field:"Status",title:"Status",template:function(t){var a={1:{title:"Pending",class:"label-light-primary"},2:{title:"Delivered",class:" label-light-light-danger"},3:{title:"Canceled",class:" label-light-primary"},4:{title:"Success",class:" label-light-success"},5:{title:"Info",class:" label-light-info"},6:{title:"Danger",class:" label-light-danger"},7:{title:"Warning",class:" label-light-warning"}};return'<span class="label '+a[t.Status].class+' label-inline font-weight-bold label-lg">'+a[t.Status].title+"</span>"}},{field:"Type",title:"Type",autoHide:!1,template:function(t){var a={1:{title:"Online",state:"danger"},2:{title:"Retail",state:"primary"},3:{title:"Direct",state:"success"}};return'<span class="label label-'+a[t.Type].state+' label-dot mr-2"></span><span class="font-weight-bold text-'+a[t.Type].state+'">'+a[t.Type].title+"</span>"}},{field:"Actions",title:"Actions",sortable:!1,width:125,overflow:"visible",autoHide:!1,template:function(){return'\t <div class="dropdown dropdown-inline">\t <a href="javascript:;" class="btn btn-sm btn-clean btn-icon mr-2" data-toggle="dropdown">\t <span class="svg-icon svg-icon-md">\t <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">\t <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\t <rect x="0" y="0" width="24" height="24"/>\t <path d="M5,8.6862915 L5,5 L8.6862915,5 L11.5857864,2.10050506 L14.4852814,5 L19,5 L19,9.51471863 L21.4852814,12 L19,14.4852814 L19,19 L14.4852814,19 L11.5857864,21.8994949 L8.6862915,19 L5,19 L5,15.3137085 L1.6862915,12 L5,8.6862915 Z M12,15 C13.6568542,15 15,13.6568542 15,12 C15,10.3431458 13.6568542,9 12,9 C10.3431458,9 9,10.3431458 9,12 C9,13.6568542 10.3431458,15 12,15 Z" fill="#000000"/>\t </g>\t </svg>\t </span>\t </a>\t <div class="dropdown-menu dropdown-menu-sm dropdown-menu-right">\t <ul class="navi flex-column navi-hover py-2">\t <li class="navi-header font-weight-bolder text-uppercase font-size-xs text-primary pb-2">\t Choose an action:\t </li>\t <li class="navi-item">\t <a href="#" class="navi-link">\t <span class="navi-icon"><i class="la la-print"></i></span>\t <span class="navi-text">Print</span>\t </a>\t </li>\t <li class="navi-item">\t <a href="#" class="navi-link">\t