Add project files.

This commit is contained in:
2025-07-23 18:54:59 +03:30
parent 429fe73799
commit a0852dd7d8
3356 changed files with 1632271 additions and 0 deletions

View File

@ -0,0 +1,252 @@
"use strict";
// Class definition
var KTDatatableColumnRenderingDemo = function() {
// Private functions
// basic demo
var demo = function() {
var datatable = $('#kt_datatable').KTDatatable({
// datasource definition
data: {
type: 'remote',
source: {
read: {
url: HOST_URL + '/api/datatables/demos/default.php',
},
},
pageSize: 10, // display 20 records per page
serverPaging: true,
serverFiltering: true,
serverSorting: true,
},
// layout definition
layout: {
scroll: false, // enable/disable datatable scroll both horizontal and vertical when needed.
footer: false, // display/hide footer
},
// column sorting
sortable: true,
pagination: true,
search: {
input: $('#kt_datatable_search_query'),
delay: 400,
key: 'generalSearch'
},
// columns definition
columns: [
{
field: 'RecordID',
title: '#',
sortable: 'asc',
width: 40,
type: 'number',
selector: false,
textAlign: 'center',
}, {
field: 'OrderID',
title: 'Customer',
width: 250,
template: function(data) {
var number = KTUtil.getRandomInt(1, 14);
var user_img = 'background-image:url(\'assets/media/users/100_' + number + '.jpg\')';
var output = '';
if (number > 8) {
output = '<div class="d-flex align-items-center">\
<div class="symbol symbol-40 flex-shrink-0">\
<div class="symbol-label" style="' + user_img + '"></div>\
</div>\
<div class="ml-2">\
<div class="text-dark-75 font-weight-bold line-height-sm">' + data.CompanyAgent + '</div>\
<a href="#" class="font-size-sm text-dark-50 text-hover-primary">' +
data.CompanyEmail + '</a>\
</div>\
</div>';
}
else {
var stateNo = KTUtil.getRandomInt(0, 7);
var states = [
'success',
'primary',
'danger',
'success',
'warning',
'dark',
'primary',
'info'];
var state = states[stateNo];
output = '<div class="d-flex align-items-center">\
<div class="symbol symbol-40 symbol-'+state+' flex-shrink-0">\
<div class="symbol-label">' + data.CompanyAgent.substring(0, 1) + '</div>\
</div>\
<div class="ml-2">\
<div class="text-dark-75 font-weight-bold line-height-sm">' + data.CompanyAgent + '</div>\
<a href="#" class="font-size-sm text-dark-50 text-hover-primary">' +
data.CompanyEmail + '</a>\
</div>\
</div>';
}
return output;
},
}, {
field: 'Country',
title: 'Country',
template: function(row) {
return row.Country + ' ' + row.ShipCountry;
},
}, {
field: 'ShipDate',
title: 'Ship Date',
type: 'date',
format: 'MM/DD/YYYY',
}, {
field: 'CompanyName',
title: 'Company Name',
}, {
field: 'Status',
title: 'Status',
// callback function support for column rendering
template: function(row) {
var status = {
1: {'title': 'Pending', 'class': ' label-light-primary'},
2: {'title': 'Delivered', 'class': ' label-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 font-weight-bold label-lg ' + status[row.Status].class + ' label-inline">' + status[row.Status].title + '</span>';
},
}, {
field: 'Type',
title: 'Type',
autoHide: false,
// callback function support for column rendering
template: function(row) {
var status = {
1: {'title': 'Online', 'state': 'danger'},
2: {'title': 'Retail', 'state': 'primary'},
3: {'title': 'Direct', 'state': 'success'},
};
return '<span class="label font-weight-bold label-lg label-' + status[row.Type].state + ' label-dot mr-2"></span><span class="font-weight-bold text-' + status[row.Type].state + '">' +
status[row.Type].title + '</span>';
},
}, {
field: 'Actions',
title: 'Actions',
sortable: false,
width: 125,
overflow: 'visible',
autoHide: false,
template: function() {
return '\
<div class="dropdown dropdown-inline">\
<a href="javascript:;" class="btn btn-sm btn-clean btn-icon mr-2" data-toggle="dropdown">\
<span class="svg-icon svg-icon-md">\
<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">\
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\
<rect x="0" y="0" width="24" height="24"/>\
<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"/>\
</g>\
</svg>\
</span>\
</a>\
<div class="dropdown-menu dropdown-menu-sm dropdown-menu-right">\
<ul class="navi flex-column navi-hover py-2">\
<li class="navi-header font-weight-bolder text-uppercase font-size-xs text-primary pb-2">\
Choose an action:\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-print"></i></span>\
<span class="navi-text">Print</span>\
</a>\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-copy"></i></span>\
<span class="navi-text">Copy</span>\
</a>\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-file-excel-o"></i></span>\
<span class="navi-text">Excel</span>\
</a>\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-file-text-o"></i></span>\
<span class="navi-text">CSV</span>\
</a>\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-file-pdf-o"></i></span>\
<span class="navi-text">PDF</span>\
</a>\
</li>\
</ul>\
</div>\
</div>\
<a href="javascript:;" class="btn btn-sm btn-clean btn-icon mr-2" title="Edit details">\
<span class="svg-icon svg-icon-md">\
<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">\
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\
<rect x="0" y="0" width="24" height="24"/>\
<path d="M8,17.9148182 L8,5.96685884 C8,5.56391781 8.16211443,5.17792052 8.44982609,4.89581508 L10.965708,2.42895648 C11.5426798,1.86322723 12.4640974,1.85620921 13.0496196,2.41308426 L15.5337377,4.77566479 C15.8314604,5.0588212 16,5.45170806 16,5.86258077 L16,17.9148182 C16,18.7432453 15.3284271,19.4148182 14.5,19.4148182 L9.5,19.4148182 C8.67157288,19.4148182 8,18.7432453 8,17.9148182 Z" fill="#000000" fill-rule="nonzero"\ transform="translate(12.000000, 10.707409) rotate(-135.000000) translate(-12.000000, -10.707409) "/>\
<rect fill="#000000" opacity="0.3" x="5" y="20" width="15" height="2" rx="1"/>\
</g>\
</svg>\
</span>\
</a>\
<a href="javascript:;" class="btn btn-sm btn-clean btn-icon" title="Delete">\
<span class="svg-icon svg-icon-md">\
<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">\
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\
<rect x="0" y="0" width="24" height="24"/>\
<path d="M6,8 L6,20.5 C6,21.3284271 6.67157288,22 7.5,22 L16.5,22 C17.3284271,22 18,21.3284271 18,20.5 L18,8 L6,8 Z" fill="#000000" fill-rule="nonzero"/>\
<path d="M14,4.5 L14,4 C14,3.44771525 13.5522847,3 13,3 L11,3 C10.4477153,3 10,3.44771525 10,4 L10,4.5 L5.5,4.5 C5.22385763,4.5 5,4.72385763 5,5 L5,5.5 C5,5.77614237 5.22385763,6 5.5,6 L18.5,6 C18.7761424,6 19,5.77614237 19,5.5 L19,5 C19,4.72385763 18.7761424,4.5 18.5,4.5 L14,4.5 Z" fill="#000000" opacity="0.3"/>\
</g>\
</svg>\
</span>\
</a>\
';
},
}],
});
$('#kt_datatable_search_status').on('change', function() {
datatable.search($(this).val().toLowerCase(), 'Status');
});
$('#kt_datatable_search_type').on('change', function() {
datatable.search($(this).val().toLowerCase(), 'Type');
});
$('#kt_datatable_search_status, #kt_datatable_search_type').selectpicker();
};
return {
// public functions
init: function() {
demo();
},
};
}();
jQuery(document).ready(function() {
KTDatatableColumnRenderingDemo.init();
});

View File

@ -0,0 +1,241 @@
"use strict";
// Class definition
var KTDatatableColumnWidthDemo = function() {
// Private functions
var demo = function() {
var datatable = $('#kt_datatable').KTDatatable({
// datasource definition
data: {
type: 'remote',
source: {
read: {
url: HOST_URL + '/api/datatables/demos/default.php',
// sample custom headers
// headers: {'x-my-custom-header': 'some value', 'x-test-header': 'the value'},
map: function(raw) {
// sample data mapping
var dataSet = raw;
if (typeof raw.data !== 'undefined') {
dataSet = raw.data;
}
return dataSet;
},
},
},
pageSize: 10,
serverPaging: true,
serverFiltering: true,
serverSorting: true,
},
// layout definition
layout: {
scroll: false,
footer: false,
},
// column sorting
sortable: true,
pagination: true,
search: {
input: $('#kt_datatable_search_query'),
key: 'generalSearch'
},
// columns definition
columns: [{
field: 'RecordID',
title: '#',
sortable: 'asc',
width: 30,
type: 'number',
selector: false,
textAlign: 'center',
}, {
field: 'OrderID',
title: 'Order ID',
}, {
field: 'Country',
title: 'Country',
template: function(row) {
return row.Country + ' ' + row.ShipCountry;
},
}, {
field: 'ShipDate',
title: 'Ship Date',
type: 'date',
format: 'MM/DD/YYYY',
}, {
field: 'CompanyName',
title: 'Company Name',
}, {
field: 'Status',
title: 'Status',
// callback function support for column rendering
template: function(row) {
var status = {
1: {
'title': 'Pending',
'class': ' label-light-success'
},
2: {
'title': 'Delivered',
'class': ' label-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 font-weight-bold label-lg ' + status[row.Status].class + ' label-inline">' + status[row.Status].title + '</span>';
},
}, {
field: 'Type',
title: 'Type',
autoHide: false,
// callback function support for column rendering
template: function(row) {
var status = {
1: {
'title': 'Online',
'state': 'danger'
},
2: {
'title': 'Retail',
'state': 'primary'
},
3: {
'title': 'Direct',
'state': 'success'
},
};
return '<span class="label label-' + status[row.Type].state + ' label-dot mr-2"></span><span class="font-weight-bold text-' + status[row.Type].state + '">' +
status[row.Type].title + '</span>';
},
}, {
field: 'Actions',
title: 'Actions',
sortable: false,
width: 125,
overflow: 'visible',
autoHide: false,
template: function() {
return '\
<div class="dropdown dropdown-inline">\
<a href="javascript:;" class="btn btn-sm btn-clean btn-icon mr-2" data-toggle="dropdown">\
<span class="svg-icon svg-icon-md">\
<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">\
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\
<rect x="0" y="0" width="24" height="24"/>\
<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"/>\
</g>\
</svg>\
</span>\
</a>\
<div class="dropdown-menu dropdown-menu-sm dropdown-menu-right">\
<ul class="navi flex-column navi-hover py-2">\
<li class="navi-header font-weight-bolder text-uppercase font-size-xs text-primary pb-2">\
Choose an action:\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-print"></i></span>\
<span class="navi-text">Print</span>\
</a>\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-copy"></i></span>\
<span class="navi-text">Copy</span>\
</a>\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-file-excel-o"></i></span>\
<span class="navi-text">Excel</span>\
</a>\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-file-text-o"></i></span>\
<span class="navi-text">CSV</span>\
</a>\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-file-pdf-o"></i></span>\
<span class="navi-text">PDF</span>\
</a>\
</li>\
</ul>\
</div>\
</div>\
<a href="javascript:;" class="btn btn-sm btn-clean btn-icon mr-2" title="Edit details">\
<span class="svg-icon svg-icon-md">\
<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">\
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\
<rect x="0" y="0" width="24" height="24"/>\
<path d="M8,17.9148182 L8,5.96685884 C8,5.56391781 8.16211443,5.17792052 8.44982609,4.89581508 L10.965708,2.42895648 C11.5426798,1.86322723 12.4640974,1.85620921 13.0496196,2.41308426 L15.5337377,4.77566479 C15.8314604,5.0588212 16,5.45170806 16,5.86258077 L16,17.9148182 C16,18.7432453 15.3284271,19.4148182 14.5,19.4148182 L9.5,19.4148182 C8.67157288,19.4148182 8,18.7432453 8,17.9148182 Z" fill="#000000" fill-rule="nonzero"\ transform="translate(12.000000, 10.707409) rotate(-135.000000) translate(-12.000000, -10.707409) "/>\
<rect fill="#000000" opacity="0.3" x="5" y="20" width="15" height="2" rx="1"/>\
</g>\
</svg>\
</span>\
</a>\
<a href="javascript:;" class="btn btn-sm btn-clean btn-icon" title="Delete">\
<span class="svg-icon svg-icon-md">\
<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">\
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\
<rect x="0" y="0" width="24" height="24"/>\
<path d="M6,8 L6,20.5 C6,21.3284271 6.67157288,22 7.5,22 L16.5,22 C17.3284271,22 18,21.3284271 18,20.5 L18,8 L6,8 Z" fill="#000000" fill-rule="nonzero"/>\
<path d="M14,4.5 L14,4 C14,3.44771525 13.5522847,3 13,3 L11,3 C10.4477153,3 10,3.44771525 10,4 L10,4.5 L5.5,4.5 C5.22385763,4.5 5,4.72385763 5,5 L5,5.5 C5,5.77614237 5.22385763,6 5.5,6 L18.5,6 C18.7761424,6 19,5.77614237 19,5.5 L19,5 C19,4.72385763 18.7761424,4.5 18.5,4.5 L14,4.5 Z" fill="#000000" opacity="0.3"/>\
</g>\
</svg>\
</span>\
</a>\
';
},
}],
});
$('#kt_datatable_search_status').on('change', function() {
datatable.search($(this).val().toLowerCase(), 'Status');
});
$('#kt_datatable_search_type').on('change', function() {
datatable.search($(this).val().toLowerCase(), 'Type');
});
$('#kt_datatable_search_status, #kt_datatable_search_type').selectpicker();
};
return {
// public functions
init: function() {
demo();
},
};
}();
jQuery(document).ready(function() {
KTDatatableColumnWidthDemo.init();
});

View File

@ -0,0 +1,217 @@
"use strict";
// Class definition
var KTDefaultDatatableDemo = function () {
// Private functions
// basic demo
var demo = function () {
var datatable = $('#kt_datatable').KTDatatable({
data: {
type: 'remote',
source: {
read: {
url: HOST_URL + '/api/datatables/demos/default.php'
}
},
pageSize: 20,
serverPaging: true,
serverFiltering: true,
serverSorting: true
},
layout: {
scroll: true,
height: 550,
footer: false
},
sortable: true,
filterable: false,
pagination: true,
search: {
input: $('#kt_datatable_search_query')
},
rows: {
autoHide: false,
},
columns: [
{
field: 'RecordID',
title: '#',
sortable: false,
width: 20,
type: 'number',
selector: false,
textAlign: 'center',
}, {
field: 'OrderID',
title: 'Order ID',
}, {
field: 'Country',
title: 'Country',
template: function(row) {
return row.Country + ' ' + row.ShipCountry;
},
}, {
field: 'CompanyEmail',
title: 'Email',
width: 150,
}, {
field: 'ShipAddress',
title: 'Ship Address',
width: 200,
}, {
field: 'ShipDate',
title: 'Ship Date',
type: 'date',
format: 'MM/DD/YYYY',
}, {
field: 'CompanyName',
title: 'Company Name',
width: 200,
}, {
field: 'Status',
title: 'Status',
// callback function support for column rendering
template: function(row) {
var status = {
1: {'title': 'Pending', 'class': 'label-light-primary'},
2: {'title': 'Delivered', 'class': ' label-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 font-weight-bold label-lg ' + status[row.Status].class + ' label-inline">' + status[row.Status].title + '</span>';
},
}, {
field: 'Type',
title: 'Type',
autoHide: false,
// callback function support for column rendering
template: function(row) {
var status = {
1: {'title': 'Online', 'state': 'danger'},
2: {'title': 'Retail', 'state': 'primary'},
3: {'title': 'Direct', 'state': 'success'},
};
return '<span class="label label-' + status[row.Type].state + ' label-dot mr-2"></span><span class="font-weight-bold text-' + status[row.Type].state + '">' +
status[row.Type].title + '</span>';
},
}, {
field: 'Actions',
title: 'Actions',
sortable: false,
width: 125,
overflow: 'visible',
autoHide: false,
template: function() {
return '\
<div class="dropdown dropdown-inline">\
<a href="javascript:;" class="btn btn-sm btn-clean btn-icon mr-2" data-toggle="dropdown">\
<span class="svg-icon svg-icon-md">\
<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">\
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\
<rect x="0" y="0" width="24" height="24"/>\
<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"/>\
</g>\
</svg>\
</span>\
</a>\
<div class="dropdown-menu dropdown-menu-sm dropdown-menu-right">\
<ul class="navi flex-column navi-hover py-2">\
<li class="navi-header font-weight-bolder text-uppercase font-size-xs text-primary pb-2">\
Choose an action:\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-print"></i></span>\
<span class="navi-text">Print</span>\
</a>\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-copy"></i></span>\
<span class="navi-text">Copy</span>\
</a>\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-file-excel-o"></i></span>\
<span class="navi-text">Excel</span>\
</a>\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-file-text-o"></i></span>\
<span class="navi-text">CSV</span>\
</a>\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-file-pdf-o"></i></span>\
<span class="navi-text">PDF</span>\
</a>\
</li>\
</ul>\
</div>\
</div>\
<a href="javascript:;" class="btn btn-sm btn-clean btn-icon mr-2" title="Edit details">\
<span class="svg-icon svg-icon-md">\
<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">\
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\
<rect x="0" y="0" width="24" height="24"/>\
<path d="M8,17.9148182 L8,5.96685884 C8,5.56391781 8.16211443,5.17792052 8.44982609,4.89581508 L10.965708,2.42895648 C11.5426798,1.86322723 12.4640974,1.85620921 13.0496196,2.41308426 L15.5337377,4.77566479 C15.8314604,5.0588212 16,5.45170806 16,5.86258077 L16,17.9148182 C16,18.7432453 15.3284271,19.4148182 14.5,19.4148182 L9.5,19.4148182 C8.67157288,19.4148182 8,18.7432453 8,17.9148182 Z" fill="#000000" fill-rule="nonzero"\ transform="translate(12.000000, 10.707409) rotate(-135.000000) translate(-12.000000, -10.707409) "/>\
<rect fill="#000000" opacity="0.3" x="5" y="20" width="15" height="2" rx="1"/>\
</g>\
</svg>\
</span>\
</a>\
<a href="javascript:;" class="btn btn-sm btn-clean btn-icon" title="Delete">\
<span class="svg-icon svg-icon-md">\
<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">\
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\
<rect x="0" y="0" width="24" height="24"/>\
<path d="M6,8 L6,20.5 C6,21.3284271 6.67157288,22 7.5,22 L16.5,22 C17.3284271,22 18,21.3284271 18,20.5 L18,8 L6,8 Z" fill="#000000" fill-rule="nonzero"/>\
<path d="M14,4.5 L14,4 C14,3.44771525 13.5522847,3 13,3 L11,3 C10.4477153,3 10,3.44771525 10,4 L10,4.5 L5.5,4.5 C5.22385763,4.5 5,4.72385763 5,5 L5,5.5 C5,5.77614237 5.22385763,6 5.5,6 L18.5,6 C18.7761424,6 19,5.77614237 19,5.5 L19,5 C19,4.72385763 18.7761424,4.5 18.5,4.5 L14,4.5 Z" fill="#000000" opacity="0.3"/>\
</g>\
</svg>\
</span>\
</a>\
';
},
}],
});
$('#kt_datatable_search_status').on('change', function() {
datatable.search($(this).val().toLowerCase(), 'Status');
});
$('#kt_datatable_search_type').on('change', function() {
datatable.search($(this).val().toLowerCase(), 'Type');
});
$('#kt_datatable_search_status, #kt_datatable_search_type').selectpicker();
};
return {
// public functions
init: function () {
demo();
}
};
}();
jQuery(document).ready(function () {
KTDefaultDatatableDemo.init();
});

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,300 @@
"use strict";
// Class definition
var KTDatatableRecordSelectionDemo = function() {
// Private functions
var options = {
// datasource definition
data: {
type: 'remote',
source: {
read: {
url: HOST_URL + '/api/datatables/demos/default.php',
},
},
pageSize: 10,
serverPaging: true,
serverFiltering: true,
serverSorting: true,
},
// layout definition
layout: {
scroll: false, // enable/disable datatable scroll both horizontal and
footer: false // display/hide footer
},
// column sorting
sortable: true,
pagination: true,
// columns definition
columns: [{
field: 'RecordID',
title: '#',
sortable: false,
width: 20,
selector: {
class: ''
},
textAlign: 'center',
}, {
field: 'OrderID',
title: 'Order ID',
template: '{{OrderID}}',
}, {
field: 'Country',
title: 'Country',
template: function(row) {
return row.Country + ' ' + row.ShipCountry;
},
}, {
field: 'ShipAddress',
title: 'Ship Address',
}, {
field: 'ShipDate',
title: 'Ship Date',
type: 'date',
format: 'MM/DD/YYYY',
}, {
field: 'Status',
title: 'Status',
// callback function support for column rendering
template: function(row) {
var status = {
1: {'title': 'Pending', 'class': 'label-light-primary'},
2: {'title': 'Delivered', 'class': ' label-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 label-lg font-weight-bold' + status[row.Status].class + ' label-inline">' + status[row.Status].title + '</span>';
},
}, {
field: 'Type',
title: 'Type',
autoHide: false,
// callback function support for column rendering
template: function(row) {
var status = {
1: {'title': 'Online', 'state': 'danger'},
2: {'title': 'Retail', 'state': 'primary'},
3: {'title': 'Direct', 'state': 'success'},
};
return '<span class="label label-' + status[row.Type].state + ' label-dot mr-2"></span><span class="font-weight-bold text-' + status[row.Type].state + '">' + status[row.Type].title + '</span>';
},
}, {
field: 'Actions',
title: 'Actions',
sortable: false,
width: 125,
overflow: 'visible',
textAlign: 'left',
autoHide: false,
template: function() {
return '\
<div class="dropdown dropdown-inline">\
<a href="javascript:;" class="btn btn-sm btn-clean btn-icon mr-2" data-toggle="dropdown">\
<span class="svg-icon svg-icon-md">\
<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">\
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\
<rect x="0" y="0" width="24" height="24"/>\
<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"/>\
</g>\
</svg>\
</span>\
</a>\
<div class="dropdown-menu dropdown-menu-sm dropdown-menu-right">\
<ul class="navi flex-column navi-hover py-2">\
<li class="navi-header font-weight-bolder text-uppercase font-size-xs text-primary pb-2">\
Choose an action:\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-print"></i></span>\
<span class="navi-text">Print</span>\
</a>\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-copy"></i></span>\
<span class="navi-text">Copy</span>\
</a>\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-file-excel-o"></i></span>\
<span class="navi-text">Excel</span>\
</a>\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-file-text-o"></i></span>\
<span class="navi-text">CSV</span>\
</a>\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-file-pdf-o"></i></span>\
<span class="navi-text">PDF</span>\
</a>\
</li>\
</ul>\
</div>\
</div>\
<a href="javascript:;" class="btn btn-sm btn-clean btn-icon mr-2" title="Edit details">\
<span class="svg-icon svg-icon-md">\
<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">\
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\
<rect x="0" y="0" width="24" height="24"/>\
<path d="M8,17.9148182 L8,5.96685884 C8,5.56391781 8.16211443,5.17792052 8.44982609,4.89581508 L10.965708,2.42895648 C11.5426798,1.86322723 12.4640974,1.85620921 13.0496196,2.41308426 L15.5337377,4.77566479 C15.8314604,5.0588212 16,5.45170806 16,5.86258077 L16,17.9148182 C16,18.7432453 15.3284271,19.4148182 14.5,19.4148182 L9.5,19.4148182 C8.67157288,19.4148182 8,18.7432453 8,17.9148182 Z" fill="#000000" fill-rule="nonzero"\ transform="translate(12.000000, 10.707409) rotate(-135.000000) translate(-12.000000, -10.707409) "/>\
<rect fill="#000000" opacity="0.3" x="5" y="20" width="15" height="2" rx="1"/>\
</g>\
</svg>\
</span>\
</a>\
<a href="javascript:;" class="btn btn-sm btn-clean btn-icon" title="Delete">\
<span class="svg-icon svg-icon-md">\
<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">\
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\
<rect x="0" y="0" width="24" height="24"/>\
<path d="M6,8 L6,20.5 C6,21.3284271 6.67157288,22 7.5,22 L16.5,22 C17.3284271,22 18,21.3284271 18,20.5 L18,8 L6,8 Z" fill="#000000" fill-rule="nonzero"/>\
<path d="M14,4.5 L14,4 C14,3.44771525 13.5522847,3 13,3 L11,3 C10.4477153,3 10,3.44771525 10,4 L10,4.5 L5.5,4.5 C5.22385763,4.5 5,4.72385763 5,5 L5,5.5 C5,5.77614237 5.22385763,6 5.5,6 L18.5,6 C18.7761424,6 19,5.77614237 19,5.5 L19,5 C19,4.72385763 18.7761424,4.5 18.5,4.5 L14,4.5 Z" fill="#000000" opacity="0.3"/>\
</g>\
</svg>\
</span>\
</a>\
';
},
}],
};
// basic demo
var localSelectorDemo = function() {
// enable extension
options.extensions = {
// boolean or object (extension options)
checkbox: true,
};
options.search = {
input: $('#kt_datatable_search_query'),
key: 'generalSearch'
};
var datatable = $('#kt_datatable').KTDatatable(options);
$('#kt_datatable_search_status').on('change', function() {
datatable.search($(this).val().toLowerCase(), 'Status');
});
$('#kt_datatable_search_type').on('change', function() {
datatable.search($(this).val().toLowerCase(), 'Type');
});
$('#kt_datatable_search_status, #kt_datatable_search_type').selectpicker();
datatable.on(
'datatable-on-check datatable-on-uncheck',
function(e) {
var checkedNodes = datatable.rows('.datatable-row-active').nodes();
var count = checkedNodes.length;
$('#kt_datatable_selected_records').html(count);
if (count > 0) {
$('#kt_datatable_group_action_form').collapse('show');
} else {
$('#kt_datatable_group_action_form').collapse('hide');
}
});
$('#kt_datatable_fetch_modal').on('show.bs.modal', function(e) {
var ids = datatable.rows('.datatable-row-active').
nodes().
find('.checkbox > [type="checkbox"]').
map(function(i, chk) {
return $(chk).val();
});
console.log(ids);
var c = document.createDocumentFragment();
for (var i = 0; i < ids.length; i++) {
var li = document.createElement('li');
li.setAttribute('data-id', ids[i]);
li.innerHTML = 'Selected record ID: ' + ids[i];
c.appendChild(li);
}
$('#kt_datatable_fetch_display').append(c);
}).on('hide.bs.modal', function(e) {
$('#kt_datatable_fetch_display').empty();
});
};
var serverSelectorDemo = function() {
// enable extension
options.extensions = {
// boolean or object (extension options)
checkbox: true,
};
options.search = {
input: $('#kt_datatable_search_query_2'),
key: 'generalSearch'
};
var datatable = $('#kt_datatable_2').KTDatatable(options);
$('#kt_datatable_search_status_2').on('change', function() {
datatable.search($(this).val().toLowerCase(), 'Status');
});
$('#kt_datatable_search_type_2').on('change', function() {
datatable.search($(this).val().toLowerCase(), 'Type');
});
$('#kt_datatable_search_status_2, #kt_datatable_search_type_2').selectpicker();
datatable.on(
'datatable-on-click-checkbox',
function(e) {
// datatable.checkbox() access to extension methods
var ids = datatable.checkbox().getSelectedId();
var count = ids.length;
$('#kt_datatable_selected_records_2').html(count);
if (count > 0) {
$('#kt_datatable_group_action_form_2').collapse('show');
} else {
$('#kt_datatable_group_action_form_2').collapse('hide');
}
});
$('#kt_datatable_fetch_modal_2').on('show.bs.modal', function(e) {
var ids = datatable.checkbox().getSelectedId();
var c = document.createDocumentFragment();
for (var i = 0; i < ids.length; i++) {
var li = document.createElement('li');
li.setAttribute('data-id', ids[i]);
li.innerHTML = 'Selected record ID: ' + ids[i];
c.appendChild(li);
}
$('#kt_datatable_fetch_display_2').append(c);
}).on('hide.bs.modal', function(e) {
$('#kt_datatable_fetch_display_2').empty();
});
};
return {
// public functions
init: function() {
localSelectorDemo();
serverSelectorDemo();
},
};
}();
jQuery(document).ready(function() {
KTDatatableRecordSelectionDemo.init();
});

View File

@ -0,0 +1,213 @@
"use strict";
// Class definition
var KTDatatableAutoColumnHideDemo = function() {
// Private functions
// basic demo
var demo = function() {
var datatable = $('#kt_datatable').KTDatatable({
// datasource definition
data: {
type: 'remote',
source: {
read: {
url: HOST_URL + '/api/datatables/demos/default.php',
},
},
pageSize: 10,
saveState: false,
serverPaging: true,
serverFiltering: true,
serverSorting: true,
},
layout: {
scroll: false
},
// column sorting
sortable: true,
pagination: true,
search: {
input: $('#kt_datatable_search_query'),
key: 'generalSearch'
},
// columns definition
columns: [
{
field: 'OrderID',
title: 'Order ID',
}, {
field: 'Country',
title: 'Country',
template: function(row) {
return row.Country + ' ' + row.ShipCountry;
},
}, {
field: 'CompanyEmail',
title: 'Email',
width: 'auto',
}, {
field: 'ShipDate',
title: 'Ship Date',
type: 'date',
format: 'MM/DD/YYYY',
}, {
field: 'CompanyName',
title: 'Company Name',
width: 'auto',
}, {
field: 'ShipAddress',
title: 'Ship Address',
}, {
field: 'Website',
title: 'Website',
}, {
field: 'TotalPayment',
title: 'Payment',
}, {
field: 'Notes',
title: 'Notes',
width: 300,
}, {
field: 'Status',
title: 'Status',
// callback function support for column rendering
template: function(row) {
var status = {
1: {'title': 'Pending', 'class': 'label-light-primary'},
2: {'title': 'Delivered', 'class': ' label-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 label-lg font-weight-bold' + status[row.Status].class + ' label-inline">' + status[row.Status].title + '</span>';
},
}, {
field: 'Type',
title: 'Type',
// callback function support for column rendering
template: function(row) {
var status = {
1: {'title': 'Online', 'state': 'danger'},
2: {'title': 'Retail', 'state': 'primary'},
3: {'title': 'Direct', 'state': 'success'},
};
return '<span class="label label-' + status[row.Type].state + ' label-dot mr-2"></span><span class="font-weight-bold text-' + status[row.Type].state + '">' +
status[row.Type].title + '</span>';
},
}, {
field: 'Actions',
title: 'Actions',
sortable: false,
width: 125,
overflow: 'visible',
autoHide: false,
template: function() {
return '\
<div class="dropdown dropdown-inline">\
<a href="javascript:;" class="btn btn-sm btn-clean btn-icon mr-2" data-toggle="dropdown">\
<span class="svg-icon svg-icon-md">\
<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">\
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\
<rect x="0" y="0" width="24" height="24"/>\
<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"/>\
</g>\
</svg>\
</span>\
</a>\
<div class="dropdown-menu dropdown-menu-sm dropdown-menu-right">\
<ul class="navi flex-column navi-hover py-2">\
<li class="navi-header font-weight-bolder text-uppercase font-size-xs text-primary pb-2">\
Choose an action:\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-print"></i></span>\
<span class="navi-text">Print</span>\
</a>\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-copy"></i></span>\
<span class="navi-text">Copy</span>\
</a>\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-file-excel-o"></i></span>\
<span class="navi-text">Excel</span>\
</a>\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-file-text-o"></i></span>\
<span class="navi-text">CSV</span>\
</a>\
</li>\
<li class="navi-item">\
<a href="#" class="navi-link">\
<span class="navi-icon"><i class="la la-file-pdf-o"></i></span>\
<span class="navi-text">PDF</span>\
</a>\
</li>\
</ul>\
</div>\
</div>\
<a href="javascript:;" class="btn btn-sm btn-clean btn-icon mr-2" title="Edit details">\
<span class="svg-icon svg-icon-md">\
<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">\
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\
<rect x="0" y="0" width="24" height="24"/>\
<path d="M8,17.9148182 L8,5.96685884 C8,5.56391781 8.16211443,5.17792052 8.44982609,4.89581508 L10.965708,2.42895648 C11.5426798,1.86322723 12.4640974,1.85620921 13.0496196,2.41308426 L15.5337377,4.77566479 C15.8314604,5.0588212 16,5.45170806 16,5.86258077 L16,17.9148182 C16,18.7432453 15.3284271,19.4148182 14.5,19.4148182 L9.5,19.4148182 C8.67157288,19.4148182 8,18.7432453 8,17.9148182 Z" fill="#000000" fill-rule="nonzero"\ transform="translate(12.000000, 10.707409) rotate(-135.000000) translate(-12.000000, -10.707409) "/>\
<rect fill="#000000" opacity="0.3" x="5" y="20" width="15" height="2" rx="1"/>\
</g>\
</svg>\
</span>\
</a>\
<a href="javascript:;" class="btn btn-sm btn-clean btn-icon" title="Delete">\
<span class="svg-icon svg-icon-md">\
<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">\
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\
<rect x="0" y="0" width="24" height="24"/>\
<path d="M6,8 L6,20.5 C6,21.3284271 6.67157288,22 7.5,22 L16.5,22 C17.3284271,22 18,21.3284271 18,20.5 L18,8 L6,8 Z" fill="#000000" fill-rule="nonzero"/>\
<path d="M14,4.5 L14,4 C14,3.44771525 13.5522847,3 13,3 L11,3 C10.4477153,3 10,3.44771525 10,4 L10,4.5 L5.5,4.5 C5.22385763,4.5 5,4.72385763 5,5 L5,5.5 C5,5.77614237 5.22385763,6 5.5,6 L18.5,6 C18.7761424,6 19,5.77614237 19,5.5 L19,5 C19,4.72385763 18.7761424,4.5 18.5,4.5 L14,4.5 Z" fill="#000000" opacity="0.3"/>\
</g>\
</svg>\
</span>\
</a>\
';
},
}],
});
$('#kt_datatable_search_status').on('change', function() {
datatable.search($(this).val().toLowerCase(), 'Status');
});
$('#kt_datatable_search_type').on('change', function() {
datatable.search($(this).val().toLowerCase(), 'Type');
});
$('#kt_datatable_search_status, #kt_datatable_search_type').selectpicker();
};
return {
// public functions
init: function() {
demo();
},
};
}();
jQuery(document).ready(function() {
KTDatatableAutoColumnHideDemo.init();
});

View File

@ -0,0 +1,159 @@
"use strict";
// Class definition
var KTDefaultDatatableDemo = function () {
// Private functions
// basic demo
var demo = function () {
var datatable = $('#kt_datatable').KTDatatable({
data: {
type: 'remote',
source: {
read: {
url: HOST_URL + '/api/datatables/demos/default.php'
}
},
pageSize: 20,
serverPaging: true,
serverFiltering: true,
serverSorting: true
},
layout: {
scroll: true,
height: 550,
footer: false
},
sortable: true,
filterable: false,
pagination: true,
search: {
input: $('#kt_datatable_search_query')
},
columns: [
{
field: 'RecordID',
title: '#',
sortable: false,
width: 20,
type: 'number',
selector: false,
textAlign: 'center',
}, {
field: 'OrderID',
title: 'Order ID',
}, {
field: 'Country',
title: 'Country',
template: function(row) {
return row.Country + ' ' + row.ShipCountry;
},
}, {
field: 'CompanyEmail',
width: 150,
title: 'Email',
}, {
field: 'ShipAddress',
title: 'Ship Address',
}, {
field: 'ShipDate',
title: 'Ship Date',
type: 'date',
format: 'MM/DD/YYYY',
}, {
field: 'CompanyName',
title: 'Company Name',
}, {
field: 'Status',
title: 'Status',
// callback function support for column rendering
template: function(row) {
var status = {
1: {'title': 'Pending', 'class': 'label-light-primary'},
2: {'title': 'Delivered', 'class': ' label-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 label-lg font-weight-bold' + status[row.Status].class + ' label-inline">' + status[row.Status].title + '</span>';
},
}, {
field: 'Type',
title: 'Type',
autoHide: false,
// callback function support for column rendering
template: function(row) {
var status = {
1: {'title': 'Online', 'state': 'danger'},
2: {'title': 'Retail', 'state': 'primary'},
3: {'title': 'Direct', 'state': 'success'},
};
return '<span class="label label-' + status[row.Type].state + ' label-dot mr-2"></span><span class="font-weight-bold text-' + status[row.Type].state + '">' +
status[row.Type].title + '</span>';
},
}, {
field: 'Actions',
title: 'Actions',
sortable: false,
width: 110,
overflow: 'visible',
autoHide: false,
template: function() {
return '\
<div class="dropdown dropdown-inline">\
<a href="javascript:;" class="btn btn-sm btn-clean btn-icon" data-toggle="dropdown">\
<i class="la la-cog"></i>\
</a>\
<div class="dropdown-menu dropdown-menu-sm dropdown-menu-right">\
<ul class="nav nav-hoverable flex-column">\
<li class="nav-item"><a class="nav-link" href="#"><i class="nav-icon la la-edit"></i><span class="nav-text">Edit Details</span></a></li>\
<li class="nav-item"><a class="nav-link" href="#"><i class="nav-icon la la-leaf"></i><span class="nav-text">Update Status</span></a></li>\
<li class="nav-item"><a class="nav-link" href="#"><i class="nav-icon la la-print"></i><span class="nav-text">Print</span></a></li>\
</ul>\
</div>\
</div>\
<a href="javascript:;" class="btn btn-sm btn-clean btn-icon" title="Edit details">\
<i class="la la-edit"></i>\
</a>\
<a href="javascript:;" class="btn btn-sm btn-clean btn-icon" title="Delete">\
<i class="la la-trash"></i>\
</a>\
';
},
}],
});
$('#kt_datatable_search_status').on('change', function() {
datatable.search($(this).val().toLowerCase(), 'Status');
});
$('#kt_datatable_search_type').on('change', function() {
datatable.search($(this).val().toLowerCase(), 'Type');
});
$('#kt_datatable_search_status, #kt_datatable_search_type').selectpicker();
};
return {
// public functions
init: function () {
demo();
}
};
}();
jQuery(document).ready(function () {
KTDefaultDatatableDemo.init();
});