PageSourceSearch

https://iicrccert.org/js/responsive.bootstrap.js

js iicrccert.org collected 2026-10-05 10:54:21 UTC 1,892 bytes, 81 lines download raw bytes

1/*! Bootstrap integration for DataTables' Responsive
2 * ©2015-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-bs', '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-bs')(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					_modal.find('div.modal-header')
63						.empty()
64						.append( '<h4 class="modal-title">'+options.header( row )+'</h4>' );
65				}
66
67				_modal.find( 'div.modal-body' )
68					.empty()
69					.append( render() );
70
71				_modal
72					.appendTo( 'body' )
73					.modal();
74			}
75		}
76	};
77};
78
79
80return DataTable.Responsive;
81}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.