1/*! Bootstrap integration for DataTables' Responsive 2 * ©2015 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; 41 42_display.modal = function ( options ) { 43 return function ( row, update, render ) { 44 if ( ! $.fn.modal ) { 45 _original( row, update, render ); 46 } 47 else { 48 if ( ! update ) { 49 var modal = $( 50 '<div class="modal fade" role="dialog">'+ 51 '<div class="modal-dialog" role="document">'+ 52 '<div class="modal-content">'+ 53 '<div class="modal-header">'+ 54 '<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>'+ 55 '</div>'+ 56 '<div class="modal-body"/>'+ 57 '</div>'+ 58 '</div>'+ 59 '</div>' 60 ); 61 62 if ( options && options.header ) { 63 modal.find('div.modal-header') 64 .append( '<h4 class="modal-title">'+options.header( row )+'</h4>' ); 65 } 66 67 modal.find( 'div.modal-body' ).append( render() ); 68 modal 69 .appendTo( 'body' ) 70 .modal(); 71 } 72 } 73 }; 74}; 75 76 77return DataTable.Responsive; 78}));
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.