1
0
forked from ScoDoc/ScoDoc
ScoDoc/app/static/DataTables/FixedColumns-4.0.2/js/fixedColumns.dataTables.js

37 lines
1.1 KiB
JavaScript
Raw Normal View History

2022-03-26 23:33:12 +01:00
/*! DataTables integration for DataTables' FixedColumns
2022-02-17 16:29:01 +01:00
* ©2016 SpryMedia Ltd - datatables.net/license
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD
2022-03-26 23:33:12 +01:00
define(['jquery', 'datatables.net-dt', 'datatables.net-fixedcolumns'], function ($) {
2022-02-17 16:29:01 +01:00
return factory($);
});
}
else if (typeof exports === 'object') {
// CommonJS
module.exports = function (root, $) {
if (!root) {
root = window;
}
if (!$ || !$.fn.dataTable) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
2022-03-26 23:33:12 +01:00
$ = require('datatables.net-dt')(root, $).$;
2022-02-17 16:29:01 +01:00
}
2022-03-26 23:33:12 +01:00
if (!$.fn.dataTable.FixedColumns) {
2022-02-17 16:29:01 +01:00
// eslint-disable-next-line @typescript-eslint/no-var-requires
require('datatables.net-fixedcolumns')(root, $);
}
return factory($);
};
}
else {
// Browser
factory(jQuery);
}
}(function ($) {
'use strict';
var dataTable = $.fn.dataTable;
return dataTable.fixedColumns;
}));