source: public/vendors/dataTable/Responsive-2.2.3/js/responsive.bootstrap4.js@ e954f3e

develop
Last change on this file since e954f3e was 7304c7f, checked in by beratkjufliju <kufliju@…>, 3 years ago

added user authentication, create & forgot password methods and blades

  • Property mode set to 100644
File size: 2.0 KB
Line 
1/*! Bootstrap 4 integration for DataTables' Responsive
2 * ©2016 SpryMedia Ltd - datatables.net/license
3 */
4
5(function( factory ){
6 if ( typeof define === 'function' && define.amd ) {
7 // AMD
8 define( ['jquery', 'datatables.net-bs4', 'datatables.net-responsive'], function ( $ ) {
9 return factory( $, window, document );
10 } );
11 }
12 else if ( typeof exports === 'object' ) {
13 // CommonJS
14 module.exports = function (root, $) {
15 if ( ! root ) {
16 root = window;
17 }
18
19 if ( ! $ || ! $.fn.dataTable ) {
20 $ = require('datatables.net-bs4')(root, $).$;
21 }
22
23 if ( ! $.fn.dataTable.Responsive ) {
24 require('datatables.net-responsive')(root, $);
25 }
26
27 return factory( $, root, root.document );
28 };
29 }
30 else {
31 // Browser
32 factory( jQuery, window, document );
33 }
34}(function( $, window, document, undefined ) {
35'use strict';
36var DataTable = $.fn.dataTable;
37
38
39var _display = DataTable.Responsive.display;
40var _original = _display.modal;
41var _modal = $(
42 '<div class="modal fade dtr-bs-modal" role="dialog">'+
43 '<div class="modal-dialog" role="document">'+
44 '<div class="modal-content">'+
45 '<div class="modal-header">'+
46 '<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>'+
47 '</div>'+
48 '<div class="modal-body"/>'+
49 '</div>'+
50 '</div>'+
51 '</div>'
52);
53
54_display.modal = function ( options ) {
55 return function ( row, update, render ) {
56 if ( ! $.fn.modal ) {
57 _original( row, update, render );
58 }
59 else {
60 if ( ! update ) {
61 if ( options && options.header ) {
62 var header = _modal.find('div.modal-header');
63 var button = header.find('button').detach();
64
65 header
66 .empty()
67 .append( '<h4 class="modal-title">'+options.header( row )+'</h4>' )
68 .append( button );
69 }
70
71 _modal.find( 'div.modal-body' )
72 .empty()
73 .append( render() );
74
75 _modal
76 .appendTo( 'body' )
77 .modal();
78 }
79 }
80 };
81};
82
83
84return DataTable.Responsive;
85}));
Note: See TracBrowser for help on using the repository browser.