2865815c47
- updated dependencies - `@fortawesome/fontawesome-free` to 5.10.2 - `@fullcalendar/bootstrap` to 4.3.0 - `@fullcalendar/core` to 4.3.1 - `@fullcalendar/daygrid` to 4.3.0 - `@fullcalendar/interaction` to 4.3.0 - `@fullcalendar/timegrid` to 4.3.0 - `bootstrap-slider` to 10.6.2 - `flot` to 3.2.9 - `overlayscrollbars` to 1.9.1 - `raphael` to 2.3.0 - `select2` to 4.0.10 - `sweetalert2` to 8.16.3 - replaced dependencies - `jqvmap` with `jqvmap-novulnerability` (removes git requirement on `npm i`) - added new dependencies - `datatables.net-autofill-bs4` to 2.3.3 - `datatables.net-bs4` to 1.10.19 - `datatables.net-buttons-bs4` to 1.5.6 - `datatables.net-colreorder-bs4` to 1.5.1 - `datatables.net-fixedcolumns-bs4` to 3.2.6 - `datatables.net-fixedheader-bs4` to 3.1.5 - `datatables.net-keytable-bs4` to 2.5.0 - `datatables.net-responsive-bs4` to 2.2.3 - `datatables.net-rowgroup-bs4` to 1.1.0 - `datatables.net-rowreorder-bs4` to 1.2.5 - `datatables.net-scroller-bs4` to 2.0.0 - `datatables.net-select-bs4` to 1.3.0 - `jszip` to 3.2.2 - `pdfmake` to 0.1.58 - updated devDependencies - `@babel/cli` to 7.5.5 - `@babel/core` to 7.5.5 - `@babel/preset-env` to 7.5.5 - `css-loader` to 3.2.0 - `rollup"` to .20.2 - `terser` to 4.2.1 - removed old plugins - `morris`
86 lines
2 KiB
JavaScript
86 lines
2 KiB
JavaScript
/*! Bootstrap 4 integration for DataTables' Responsive
|
|
* ©2016 SpryMedia Ltd - datatables.net/license
|
|
*/
|
|
|
|
(function( factory ){
|
|
if ( typeof define === 'function' && define.amd ) {
|
|
// AMD
|
|
define( ['jquery', 'datatables.net-bs4', 'datatables.net-responsive'], 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, $).$;
|
|
}
|
|
|
|
if ( ! $.fn.dataTable.Responsive ) {
|
|
require('datatables.net-responsive')(root, $);
|
|
}
|
|
|
|
return factory( $, root, root.document );
|
|
};
|
|
}
|
|
else {
|
|
// Browser
|
|
factory( jQuery, window, document );
|
|
}
|
|
}(function( $, window, document, undefined ) {
|
|
'use strict';
|
|
var DataTable = $.fn.dataTable;
|
|
|
|
|
|
var _display = DataTable.Responsive.display;
|
|
var _original = _display.modal;
|
|
var _modal = $(
|
|
'<div class="modal fade dtr-bs-modal" role="dialog">'+
|
|
'<div class="modal-dialog" role="document">'+
|
|
'<div class="modal-content">'+
|
|
'<div class="modal-header">'+
|
|
'<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>'+
|
|
'</div>'+
|
|
'<div class="modal-body"/>'+
|
|
'</div>'+
|
|
'</div>'+
|
|
'</div>'
|
|
);
|
|
|
|
_display.modal = function ( options ) {
|
|
return function ( row, update, render ) {
|
|
if ( ! $.fn.modal ) {
|
|
_original( row, update, render );
|
|
}
|
|
else {
|
|
if ( ! update ) {
|
|
if ( options && options.header ) {
|
|
var header = _modal.find('div.modal-header');
|
|
var button = header.find('button').detach();
|
|
|
|
header
|
|
.empty()
|
|
.append( '<h4 class="modal-title">'+options.header( row )+'</h4>' )
|
|
.append( button );
|
|
}
|
|
|
|
_modal.find( 'div.modal-body' )
|
|
.empty()
|
|
.append( render() );
|
|
|
|
_modal
|
|
.appendTo( 'body' )
|
|
.modal();
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
return DataTable.Responsive;
|
|
}));
|