You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.9 KiB
58 lines
1.9 KiB
(function (factory) { |
|
if (typeof define === 'function' && define.amd) { |
|
// AMD |
|
define(['jquery', 'datatables.net-bs4', 'datatables.net-searchpanes'], function ($) { |
|
return factory($, window, document); |
|
}); |
|
} |
|
else if (typeof exports === 'object') { |
|
// CommonJS |
|
module.exports = function (root, $) { |
|
if (!root) { |
|
root = window; |
|
} |
|
if (!$ || !$.fn.dataTable) { |
|
$ = require('datatables.net-bs4')(root, $).$; |
|
} |
|
console.log($.fn.dataTable); |
|
if (!$.fn.dataTable.SearchPanes) { |
|
console.log("not present"); |
|
require('datatables.net-searchpanes')(root, $); |
|
} |
|
return factory($, root, root.document); |
|
}; |
|
} |
|
else { |
|
// Browser |
|
factory(jQuery, window, document); |
|
} |
|
}(function ($, window, document) { |
|
'use strict'; |
|
var DataTable = $.fn.dataTable; |
|
$.extend(true, DataTable.SearchPane.classes, { |
|
buttonGroup: 'btn-group col justify-content-end', |
|
disabledButton: 'disabled', |
|
dull: '', |
|
narrow: 'col', |
|
pane: { |
|
container: 'table' |
|
}, |
|
paneButton: 'btn btn-light', |
|
pill: 'pill badge badge-pill badge-secondary', |
|
search: 'col-sm form-control search', |
|
searchCont: 'input-group col-sm', |
|
searchLabelCont: 'input-group-append', |
|
subRow1: 'dtsp-subRow1', |
|
subRow2: 'dtsp-subRow2', |
|
table: 'table table-sm table-borderless', |
|
topRow: 'dtsp-topRow row' |
|
}); |
|
$.extend(true, DataTable.SearchPanes.classes, { |
|
clearAll: 'dtsp-clearAll col-auto btn btn-light', |
|
container: 'dtsp-searchPanes', |
|
panes: 'dtsp-panes dtsp-container', |
|
title: 'dtsp-title col', |
|
titleRow: 'dtsp-titleRow row' |
|
}); |
|
return DataTable.searchPanes; |
|
}));
|
|
|