mirror of
https://github.com/DataTables/DataTables.git
synced 2025-03-02 03:29:14 +01:00
Dev: require() bash function now in the include file
This commit is contained in:
parent
6c3337e300
commit
2665e8459d
@ -1 +1 @@
|
|||||||
d214c81afce3a8f594dac5102b473c451162789f
|
22eb613114730631469410198ef1d44ffdb11176
|
||||||
|
@ -354,6 +354,13 @@ table.dataTable td {
|
|||||||
*margin-top: -1px;
|
*margin-top: -1px;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
|
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th > div.dataTables_sizing,
|
||||||
|
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td > div.dataTables_sizing {
|
||||||
|
height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
.dataTables_wrapper.no-footer .dataTables_scrollBody {
|
.dataTables_wrapper.no-footer .dataTables_scrollBody {
|
||||||
border-bottom: 1px solid #111111;
|
border-bottom: 1px solid #111111;
|
||||||
}
|
}
|
||||||
|
58
media/js/jquery.dataTables.js
vendored
58
media/js/jquery.dataTables.js
vendored
@ -1,15 +1,15 @@
|
|||||||
/*! DataTables 1.10.0-dev
|
/*! DataTables 1.10.0-beta.2.dev
|
||||||
* ©2008-2013 SpryMedia Ltd - datatables.net/license
|
* ©2008-2014 SpryMedia Ltd - datatables.net/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary DataTables
|
* @summary DataTables
|
||||||
* @description Paginate, search and order HTML tables
|
* @description Paginate, search and order HTML tables
|
||||||
* @version 1.10.0-dev
|
* @version 1.10.0-beta.2.dev
|
||||||
* @file jquery.dataTables.js
|
* @file jquery.dataTables.js
|
||||||
* @author SpryMedia Ltd (www.sprymedia.co.uk)
|
* @author SpryMedia Ltd (www.sprymedia.co.uk)
|
||||||
* @contact www.sprymedia.co.uk/contact
|
* @contact www.sprymedia.co.uk/contact
|
||||||
* @copyright Copyright 2008-2013 SpryMedia Ltd.
|
* @copyright Copyright 2008-2014 SpryMedia Ltd.
|
||||||
*
|
*
|
||||||
* This source file is free software, available under the following license:
|
* This source file is free software, available under the following license:
|
||||||
* MIT license - http://datatables.net/license
|
* MIT license - http://datatables.net/license
|
||||||
@ -2552,9 +2552,7 @@
|
|||||||
} )
|
} )
|
||||||
.append( $('<label/>' ).append( str ) );
|
.append( $('<label/>' ).append( str ) );
|
||||||
|
|
||||||
var jqFilter = $('input[type="search"]', filter)
|
var searchFn = function() {
|
||||||
.val( previousSearch.sSearch.replace('"','"') )
|
|
||||||
.bind( 'keyup.DT search.DT input.DT paste.DT cut.DT', function(e) {
|
|
||||||
/* Update all other filter input elements for the new display */
|
/* Update all other filter input elements for the new display */
|
||||||
var n = features.f;
|
var n = features.f;
|
||||||
var val = !this.value ? "" : this.value; // mental IE8 fix :-(
|
var val = !this.value ? "" : this.value; // mental IE8 fix :-(
|
||||||
@ -2572,7 +2570,15 @@
|
|||||||
settings._iDisplayStart = 0;
|
settings._iDisplayStart = 0;
|
||||||
_fnDraw( settings );
|
_fnDraw( settings );
|
||||||
}
|
}
|
||||||
} )
|
};
|
||||||
|
var jqFilter = $('input[type="search"]', filter)
|
||||||
|
.val( previousSearch.sSearch.replace('"','"') )
|
||||||
|
.bind(
|
||||||
|
'keyup.DT search.DT input.DT paste.DT cut.DT',
|
||||||
|
_fnDataSource( settings ) === 'ssp' ?
|
||||||
|
_fnThrottle( searchFn, 400 ):
|
||||||
|
searchFn
|
||||||
|
)
|
||||||
.bind( 'keypress.DT', function(e) {
|
.bind( 'keypress.DT', function(e) {
|
||||||
/* Prevent form submission */
|
/* Prevent form submission */
|
||||||
if ( e.keyCode == 13 ) {
|
if ( e.keyCode == 13 ) {
|
||||||
@ -3498,6 +3504,7 @@
|
|||||||
headerSrcEls, footerSrcEls,
|
headerSrcEls, footerSrcEls,
|
||||||
headerCopy, footerCopy,
|
headerCopy, footerCopy,
|
||||||
headerWidths=[], footerWidths=[],
|
headerWidths=[], footerWidths=[],
|
||||||
|
headerContent=[],
|
||||||
idx, correction, sanityWidth,
|
idx, correction, sanityWidth,
|
||||||
zeroOut = function(nSizer) {
|
zeroOut = function(nSizer) {
|
||||||
var style = nSizer.style;
|
var style = nSizer.style;
|
||||||
@ -3608,6 +3615,7 @@
|
|||||||
|
|
||||||
// Read all widths in next pass
|
// Read all widths in next pass
|
||||||
_fnApplyToChildren( function(nSizer) {
|
_fnApplyToChildren( function(nSizer) {
|
||||||
|
headerContent.push( nSizer.innerHTML );
|
||||||
headerWidths.push( _fnStringToCss( $(nSizer).css('width') ) );
|
headerWidths.push( _fnStringToCss( $(nSizer).css('width') ) );
|
||||||
}, headerSrcEls );
|
}, headerSrcEls );
|
||||||
|
|
||||||
@ -3639,10 +3647,12 @@
|
|||||||
* 3. Apply the measurements
|
* 3. Apply the measurements
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// "Hide" the header and footer that we used for the sizing. We want to also fix their width
|
// "Hide" the header and footer that we used for the sizing. We need to keep
|
||||||
// to what they currently are
|
// the content of the cell so that the width applied to the header and body
|
||||||
|
// both match, but we want to hide it completely. We want to also fix their
|
||||||
|
// width to what they currently are
|
||||||
_fnApplyToChildren( function(nSizer, i) {
|
_fnApplyToChildren( function(nSizer, i) {
|
||||||
nSizer.innerHTML = "";
|
nSizer.innerHTML = '<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+headerContent[i]+'</div>';
|
||||||
nSizer.style.width = headerWidths[i];
|
nSizer.style.width = headerWidths[i];
|
||||||
}, headerSrcEls );
|
}, headerSrcEls );
|
||||||
|
|
||||||
@ -3954,14 +3964,23 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function _fnThrottle( fn ) {
|
/**
|
||||||
|
* Throttle the calls to a function. Arguments and context are maintained for
|
||||||
|
* the throttled function
|
||||||
|
* @param {function} fn Function to be called
|
||||||
|
* @param {int} [freq=200] call frequency in mS
|
||||||
|
* @returns {function} wrapped function
|
||||||
|
* @memberof DataTable#oApi
|
||||||
|
*/
|
||||||
|
function _fnThrottle( fn, freq ) {
|
||||||
var
|
var
|
||||||
frequency = 200,
|
frequency = freq || 200,
|
||||||
last,
|
last,
|
||||||
timer;
|
timer;
|
||||||
|
|
||||||
return function () {
|
return function () {
|
||||||
var
|
var
|
||||||
|
that = this,
|
||||||
now = +new Date(),
|
now = +new Date(),
|
||||||
args = arguments;
|
args = arguments;
|
||||||
|
|
||||||
@ -3969,13 +3988,16 @@
|
|||||||
clearTimeout( timer );
|
clearTimeout( timer );
|
||||||
|
|
||||||
timer = setTimeout( function () {
|
timer = setTimeout( function () {
|
||||||
last = now;
|
last = undefined;
|
||||||
fn();
|
fn.apply( that, args );
|
||||||
}, frequency );
|
}, frequency );
|
||||||
}
|
}
|
||||||
|
else if ( last ) {
|
||||||
|
last = now;
|
||||||
|
fn.apply( that, args );
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
last = now;
|
last = now;
|
||||||
fn();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -7899,7 +7921,7 @@
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Remove column
|
// Remove column
|
||||||
$( _pluck( settings.aoData, 'anCells', column ) ).remove();
|
$( _pluck( settings.aoData, 'anCells', column ) ).detach();
|
||||||
|
|
||||||
col.bVisible = false;
|
col.bVisible = false;
|
||||||
_fnDrawHead( settings, settings.aoHeader );
|
_fnDrawHead( settings, settings.aoHeader );
|
||||||
@ -8652,7 +8674,7 @@
|
|||||||
* @type string
|
* @type string
|
||||||
* @default Version number
|
* @default Version number
|
||||||
*/
|
*/
|
||||||
DataTable.version = "1.10.0-dev";
|
DataTable.version = "1.10.0-beta.2.dev";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private data store, containing all of the settings objects that are
|
* Private data store, containing all of the settings objects that are
|
||||||
|
Loading…
x
Reference in New Issue
Block a user