mirror of
https://github.com/DataTables/DataTables.git
synced 2025-04-08 00:54:11 +02:00
Site: DataTables 1.10.0-beta.1 blog post
This commit is contained in:
parent
87e0d43844
commit
6c3337e300
@ -1 +1 @@
|
|||||||
efedff77e37c7a32cca9710ee7e008968047801e
|
d214c81afce3a8f594dac5102b473c451162789f
|
||||||
|
@ -354,13 +354,6 @@ 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;
|
||||||
}
|
}
|
||||||
|
90
media/js/jquery.dataTables.js
vendored
90
media/js/jquery.dataTables.js
vendored
@ -1,15 +1,15 @@
|
|||||||
/*! DataTables 1.10.0-beta.2.dev
|
/*! DataTables 1.10.0-dev
|
||||||
* ©2008-2014 SpryMedia Ltd - datatables.net/license
|
* ©2008-2013 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-beta.2.dev
|
* @version 1.10.0-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-2014 SpryMedia Ltd.
|
* @copyright Copyright 2008-2013 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,33 +2552,27 @@
|
|||||||
} )
|
} )
|
||||||
.append( $('<label/>' ).append( str ) );
|
.append( $('<label/>' ).append( str ) );
|
||||||
|
|
||||||
var searchFn = function() {
|
|
||||||
/* Update all other filter input elements for the new display */
|
|
||||||
var n = features.f;
|
|
||||||
var val = !this.value ? "" : this.value; // mental IE8 fix :-(
|
|
||||||
|
|
||||||
/* Now do the filter */
|
|
||||||
if ( val != previousSearch.sSearch ) {
|
|
||||||
_fnFilterComplete( settings, {
|
|
||||||
"sSearch": val,
|
|
||||||
"bRegex": previousSearch.bRegex,
|
|
||||||
"bSmart": previousSearch.bSmart ,
|
|
||||||
"bCaseInsensitive": previousSearch.bCaseInsensitive
|
|
||||||
} );
|
|
||||||
|
|
||||||
// Need to redraw, without resorting
|
|
||||||
settings._iDisplayStart = 0;
|
|
||||||
_fnDraw( settings );
|
|
||||||
}
|
|
||||||
};
|
|
||||||
var jqFilter = $('input[type="search"]', filter)
|
var jqFilter = $('input[type="search"]', filter)
|
||||||
.val( previousSearch.sSearch.replace('"','"') )
|
.val( previousSearch.sSearch.replace('"','"') )
|
||||||
.bind(
|
.bind( 'keyup.DT search.DT input.DT paste.DT cut.DT', function(e) {
|
||||||
'keyup.DT search.DT input.DT paste.DT cut.DT',
|
/* Update all other filter input elements for the new display */
|
||||||
_fnDataSource( settings ) === 'ssp' ?
|
var n = features.f;
|
||||||
_fnThrottle( searchFn, 400 ):
|
var val = !this.value ? "" : this.value; // mental IE8 fix :-(
|
||||||
searchFn
|
|
||||||
)
|
/* Now do the filter */
|
||||||
|
if ( val != previousSearch.sSearch ) {
|
||||||
|
_fnFilterComplete( settings, {
|
||||||
|
"sSearch": val,
|
||||||
|
"bRegex": previousSearch.bRegex,
|
||||||
|
"bSmart": previousSearch.bSmart ,
|
||||||
|
"bCaseInsensitive": previousSearch.bCaseInsensitive
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Need to redraw, without resorting
|
||||||
|
settings._iDisplayStart = 0;
|
||||||
|
_fnDraw( settings );
|
||||||
|
}
|
||||||
|
} )
|
||||||
.bind( 'keypress.DT', function(e) {
|
.bind( 'keypress.DT', function(e) {
|
||||||
/* Prevent form submission */
|
/* Prevent form submission */
|
||||||
if ( e.keyCode == 13 ) {
|
if ( e.keyCode == 13 ) {
|
||||||
@ -3504,7 +3498,6 @@
|
|||||||
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;
|
||||||
@ -3615,7 +3608,6 @@
|
|||||||
|
|
||||||
// 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 );
|
||||||
|
|
||||||
@ -3647,12 +3639,10 @@
|
|||||||
* 3. Apply the measurements
|
* 3. Apply the measurements
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// "Hide" the header and footer that we used for the sizing. We need to keep
|
// "Hide" the header and footer that we used for the sizing. We want to also fix their width
|
||||||
// the content of the cell so that the width applied to the header and body
|
// to what they currently are
|
||||||
// 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 = '<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+headerContent[i]+'</div>';
|
nSizer.innerHTML = "";
|
||||||
nSizer.style.width = headerWidths[i];
|
nSizer.style.width = headerWidths[i];
|
||||||
}, headerSrcEls );
|
}, headerSrcEls );
|
||||||
|
|
||||||
@ -3964,40 +3954,28 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
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 = freq || 200,
|
frequency = 200,
|
||||||
last,
|
last,
|
||||||
timer;
|
timer;
|
||||||
|
|
||||||
return function () {
|
return function () {
|
||||||
var
|
var
|
||||||
that = this,
|
now = +new Date(),
|
||||||
now = +new Date(),
|
|
||||||
args = arguments;
|
args = arguments;
|
||||||
|
|
||||||
if ( last && now < last + frequency ) {
|
if ( last && now < last + frequency ) {
|
||||||
clearTimeout( timer );
|
clearTimeout( timer );
|
||||||
|
|
||||||
timer = setTimeout( function () {
|
timer = setTimeout( function () {
|
||||||
last = undefined;
|
last = now;
|
||||||
fn.apply( that, args );
|
fn();
|
||||||
}, frequency );
|
}, frequency );
|
||||||
}
|
}
|
||||||
else if ( last ) {
|
|
||||||
last = now;
|
|
||||||
fn.apply( that, args );
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
last = now;
|
last = now;
|
||||||
|
fn();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -7921,7 +7899,7 @@
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Remove column
|
// Remove column
|
||||||
$( _pluck( settings.aoData, 'anCells', column ) ).detach();
|
$( _pluck( settings.aoData, 'anCells', column ) ).remove();
|
||||||
|
|
||||||
col.bVisible = false;
|
col.bVisible = false;
|
||||||
_fnDrawHead( settings, settings.aoHeader );
|
_fnDrawHead( settings, settings.aoHeader );
|
||||||
@ -8674,7 +8652,7 @@
|
|||||||
* @type string
|
* @type string
|
||||||
* @default Version number
|
* @default Version number
|
||||||
*/
|
*/
|
||||||
DataTable.version = "1.10.0-beta.2.dev";
|
DataTable.version = "1.10.0-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