jquery-datatables 1.10.16 → 1.10.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +2 -0
- data/app/assets/javascripts/datatables/dataTables.foundation.js +2 -2
- data/app/assets/javascripts/datatables/dataTables.uikit.js +1 -1
- data/app/assets/javascripts/datatables/extensions/AutoFill/autoFill.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/AutoFill/dataTables.autoFill.js +52 -12
- data/app/assets/javascripts/datatables/extensions/Buttons/buttons.colVis.js +4 -8
- data/app/assets/javascripts/datatables/extensions/Buttons/buttons.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Buttons/buttons.flash.js +17 -7
- data/app/assets/javascripts/datatables/extensions/Buttons/buttons.html5.js +33 -19
- data/app/assets/javascripts/datatables/extensions/Buttons/buttons.print.js +14 -3
- data/app/assets/javascripts/datatables/extensions/Buttons/dataTables.buttons.js +120 -53
- data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.semanicui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/ColReorder/dataTables.colReorder.js +76 -13
- data/app/assets/javascripts/datatables/extensions/FixedColumns/dataTables.fixedColumns.js +23 -17
- data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.semanicui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedHeader/dataTables.fixedHeader.js +26 -11
- data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.semanicui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/KeyTable/dataTables.keyTable.js +141 -75
- data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.semanicui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Responsive/dataTables.responsive.js +64 -26
- data/app/assets/javascripts/datatables/extensions/Responsive/responsive.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowGroup/dataTables.rowGroup.js +45 -13
- data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.semanicui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowReorder/dataTables.rowReorder.js +24 -6
- data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.semanicui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Scroller/dataTables.scroller.js +93 -87
- data/app/assets/javascripts/datatables/extensions/Scroller/scroller.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Scroller/scroller.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Scroller/scroller.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Scroller/scroller.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Scroller/scroller.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Scroller/scroller.semanticui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Select/dataTables.select.js +41 -14
- data/app/assets/javascripts/datatables/extensions/Select/select.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Select/select.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Select/select.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Select/select.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Select/select.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Select/select.semanticui.js +38 -0
- data/app/assets/javascripts/datatables/jquery.dataTables.js +125 -72
- data/app/assets/stylesheets/datatables/dataTables.bootstrap4.scss +4 -0
- data/app/assets/stylesheets/datatables/dataTables.foundation.scss +5 -5
- data/app/assets/stylesheets/datatables/dataTables.material.scss +1 -1
- data/app/assets/stylesheets/datatables/dataTables.uikit.scss +33 -22
- data/app/assets/stylesheets/datatables/extensions/AutoFill/autoFill.bootstrap.scss +9 -0
- data/app/assets/stylesheets/datatables/extensions/AutoFill/autoFill.bootstrap4.scss +9 -0
- data/app/assets/stylesheets/datatables/extensions/Buttons/buttons.dataTables.scss +3 -2
- data/app/assets/stylesheets/datatables/extensions/Buttons/buttons.jqueryui.scss +2 -4
- data/app/assets/stylesheets/datatables/extensions/Buttons/mixins.scss +5 -0
- data/app/assets/stylesheets/datatables/extensions/FixedColumns/fixedColumns.bootstrap4.scss +3 -6
- data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.bootstrap.scss +1 -1
- data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.bootstrap4.scss +1 -1
- data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.dataTables.scss +6 -5
- data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.foundation.scss +1 -1
- data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.semanticui.scss +1 -1
- data/app/assets/stylesheets/datatables/extensions/Scroller/scroller.bootstrap.scss +1 -1
- data/app/assets/stylesheets/datatables/extensions/Scroller/scroller.bootstrap4.scss +2 -4
- data/app/assets/stylesheets/datatables/jquery.dataTables.scss +5 -5
- data/jquery-datatables.gemspec +4 -2
- data/lib/generators/jquery/datatables/install_generator.rb +22 -6
- data/lib/generators/jquery/datatables/templates/{bootstrap.js.tt → javascripts/bootstrap.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{bootstrap4.js.tt → javascripts/bootstrap4.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{foundation.js.tt → javascripts/foundation.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/javascripts/initializer.js.tt +30 -0
- data/lib/generators/jquery/datatables/templates/{jqueryui.js.tt → javascripts/jqueryui.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{material.js.tt → javascripts/material.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{regular.js.tt → javascripts/regular.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{semanticui.js.tt → javascripts/semanticui.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{uikit.js.tt → javascripts/uikit.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{bootstrap.scss.tt → stylesheets/bootstrap.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{bootstrap4.scss.tt → stylesheets/bootstrap4.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{foundation.scss.tt → stylesheets/foundation.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{jqueryui.scss.tt → stylesheets/jqueryui.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{material.scss.tt → stylesheets/material.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{regular.scss.tt → stylesheets/regular.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{semanticui.scss.tt → stylesheets/semanticui.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{uikit.scss.tt → stylesheets/uikit.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/views/index.html.erb +17 -0
- data/lib/generators/jquery/datatables/templates/views/index.html.slim +12 -0
- data/lib/generators/jquery/datatables/templates/views/index.json.jbuilder +10 -0
- data/lib/jquery-datatables.rb +53 -5
- data/lib/jquery-datatables/engine.rb +2 -0
- data/lib/jquery-datatables/version.rb +1 -1
- metadata +86 -31
@@ -0,0 +1,38 @@
|
|
1
|
+
/*! Semanic UI styling wrapper for Select
|
2
|
+
* ©2018 SpryMedia Ltd - datatables.net/license
|
3
|
+
*/
|
4
|
+
|
5
|
+
(function( factory ){
|
6
|
+
if ( typeof define === 'function' && define.amd ) {
|
7
|
+
// AMD
|
8
|
+
define( ['jquery', 'datatables.net-se', 'datatables.net-select'], 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-se')(root, $).$;
|
21
|
+
}
|
22
|
+
|
23
|
+
if ( ! $.fn.dataTable.select ) {
|
24
|
+
require('datatables.net-select')(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
|
+
|
36
|
+
return $.fn.dataTable;
|
37
|
+
|
38
|
+
}));
|
@@ -1,15 +1,15 @@
|
|
1
|
-
/*! DataTables 1.10.
|
2
|
-
* ©2008-
|
1
|
+
/*! DataTables 1.10.17
|
2
|
+
* ©2008-2018 SpryMedia Ltd - datatables.net/license
|
3
3
|
*/
|
4
4
|
|
5
5
|
/**
|
6
6
|
* @summary DataTables
|
7
7
|
* @description Paginate, search and order HTML tables
|
8
|
-
* @version 1.10.
|
8
|
+
* @version 1.10.17
|
9
9
|
* @file jquery.dataTables.js
|
10
10
|
* @author SpryMedia Ltd
|
11
11
|
* @contact www.datatables.net
|
12
|
-
* @copyright Copyright 2008-
|
12
|
+
* @copyright Copyright 2008-2018 SpryMedia Ltd.
|
13
13
|
*
|
14
14
|
* This source file is free software, available under the following license:
|
15
15
|
* MIT license - http://datatables.net/license
|
@@ -909,8 +909,11 @@
|
|
909
909
|
var s = allSettings[i];
|
910
910
|
|
911
911
|
/* Base check on table node */
|
912
|
-
if (
|
913
|
-
|
912
|
+
if (
|
913
|
+
s.nTable == this ||
|
914
|
+
(s.nTHead && s.nTHead.parentNode == this) ||
|
915
|
+
(s.nTFoot && s.nTFoot.parentNode == this)
|
916
|
+
) {
|
914
917
|
var bRetrieve = oInit.bRetrieve !== undefined ? oInit.bRetrieve : defaults.bRetrieve;
|
915
918
|
var bDestroy = oInit.bDestroy !== undefined ? oInit.bDestroy : defaults.bDestroy;
|
916
919
|
|
@@ -967,11 +970,7 @@
|
|
967
970
|
|
968
971
|
// Backwards compatibility, before we apply all the defaults
|
969
972
|
_fnCompatOpts( oInit );
|
970
|
-
|
971
|
-
if ( oInit.oLanguage )
|
972
|
-
{
|
973
|
-
_fnLanguageCompat( oInit.oLanguage );
|
974
|
-
}
|
973
|
+
_fnLanguageCompat( oInit.oLanguage );
|
975
974
|
|
976
975
|
// If the length menu is given, but the init display length is not, use the length menu
|
977
976
|
if ( oInit.aLengthMenu && ! oInit.iDisplayLength )
|
@@ -1354,8 +1353,10 @@
|
|
1354
1353
|
// - fr - Swiss Franc
|
1355
1354
|
// - kr - Swedish krona, Norwegian krone and Danish krone
|
1356
1355
|
// - \u2009 is thin space and \u202F is narrow no-break space, both used in many
|
1356
|
+
// - Ƀ - Bitcoin
|
1357
|
+
// - Ξ - Ethereum
|
1357
1358
|
// standards as thousands separators.
|
1358
|
-
var _re_formatted_numeric = /[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi;
|
1359
|
+
var _re_formatted_numeric = /[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi;
|
1359
1360
|
|
1360
1361
|
|
1361
1362
|
var _empty = function ( d ) {
|
@@ -1730,33 +1731,43 @@
|
|
1730
1731
|
*/
|
1731
1732
|
function _fnLanguageCompat( lang )
|
1732
1733
|
{
|
1734
|
+
// Note the use of the Hungarian notation for the parameters in this method as
|
1735
|
+
// this is called after the mapping of camelCase to Hungarian
|
1733
1736
|
var defaults = DataTable.defaults.oLanguage;
|
1734
|
-
var zeroRecords = lang.sZeroRecords;
|
1735
1737
|
|
1736
|
-
|
1737
|
-
|
1738
|
-
|
1739
|
-
|
1740
|
-
defaults.sEmptyTable === "No data available in table" )
|
1741
|
-
{
|
1742
|
-
_fnMap( lang, lang, 'sZeroRecords', 'sEmptyTable' );
|
1738
|
+
// Default mapping
|
1739
|
+
var defaultDecimal = defaults.sDecimal;
|
1740
|
+
if ( defaultDecimal ) {
|
1741
|
+
_addNumericSort( defaultDecimal );
|
1743
1742
|
}
|
1744
1743
|
|
1745
|
-
|
1746
|
-
|
1747
|
-
defaults.sLoadingRecords === "Loading..." )
|
1748
|
-
{
|
1749
|
-
_fnMap( lang, lang, 'sZeroRecords', 'sLoadingRecords' );
|
1750
|
-
}
|
1744
|
+
if ( lang ) {
|
1745
|
+
var zeroRecords = lang.sZeroRecords;
|
1751
1746
|
|
1752
|
-
|
1753
|
-
|
1754
|
-
lang.
|
1755
|
-
|
1747
|
+
// Backwards compatibility - if there is no sEmptyTable given, then use the same as
|
1748
|
+
// sZeroRecords - assuming that is given.
|
1749
|
+
if ( ! lang.sEmptyTable && zeroRecords &&
|
1750
|
+
defaults.sEmptyTable === "No data available in table" )
|
1751
|
+
{
|
1752
|
+
_fnMap( lang, lang, 'sZeroRecords', 'sEmptyTable' );
|
1753
|
+
}
|
1756
1754
|
|
1757
|
-
|
1758
|
-
|
1759
|
-
|
1755
|
+
// Likewise with loading records
|
1756
|
+
if ( ! lang.sLoadingRecords && zeroRecords &&
|
1757
|
+
defaults.sLoadingRecords === "Loading..." )
|
1758
|
+
{
|
1759
|
+
_fnMap( lang, lang, 'sZeroRecords', 'sLoadingRecords' );
|
1760
|
+
}
|
1761
|
+
|
1762
|
+
// Old parameter name of the thousands separator mapped onto the new
|
1763
|
+
if ( lang.sInfoThousands ) {
|
1764
|
+
lang.sThousands = lang.sInfoThousands;
|
1765
|
+
}
|
1766
|
+
|
1767
|
+
var decimal = lang.sDecimal;
|
1768
|
+
if ( decimal && defaultDecimal !== decimal ) {
|
1769
|
+
_addNumericSort( decimal );
|
1770
|
+
}
|
1760
1771
|
}
|
1761
1772
|
}
|
1762
1773
|
|
@@ -3128,7 +3139,7 @@
|
|
3128
3139
|
}
|
3129
3140
|
}
|
3130
3141
|
|
3131
|
-
_fnCallbackFire( oSettings, 'aoRowCreatedCallback', null, [nTr, rowData, iRow] );
|
3142
|
+
_fnCallbackFire( oSettings, 'aoRowCreatedCallback', null, [nTr, rowData, iRow, cells] );
|
3132
3143
|
}
|
3133
3144
|
|
3134
3145
|
// Remove once webkit bug 131819 and Chromium bug 365619 have been resolved
|
@@ -3453,7 +3464,7 @@
|
|
3453
3464
|
// iRowCount and j are not currently documented. Are they at all
|
3454
3465
|
// useful?
|
3455
3466
|
_fnCallbackFire( oSettings, 'aoRowCallback', null,
|
3456
|
-
[nRow, aoData._aData, iRowCount, j] );
|
3467
|
+
[nRow, aoData._aData, iRowCount, j, iDataIndex] );
|
3457
3468
|
|
3458
3469
|
anRows.push( nRow );
|
3459
3470
|
iRowCount++;
|
@@ -3857,12 +3868,12 @@
|
|
3857
3868
|
{
|
3858
3869
|
ajaxData = ajax.data;
|
3859
3870
|
|
3860
|
-
var newData =
|
3871
|
+
var newData = typeof ajaxData === 'function' ?
|
3861
3872
|
ajaxData( data, oSettings ) : // fn can manipulate data or return
|
3862
3873
|
ajaxData; // an object object or array to merge
|
3863
3874
|
|
3864
3875
|
// If the function returned something, use that alone
|
3865
|
-
data =
|
3876
|
+
data = typeof ajaxData === 'function' && newData ?
|
3866
3877
|
newData :
|
3867
3878
|
$.extend( true, data, newData );
|
3868
3879
|
|
@@ -3926,7 +3937,7 @@
|
|
3926
3937
|
url: ajax || oSettings.sAjaxSource
|
3927
3938
|
} ) );
|
3928
3939
|
}
|
3929
|
-
else if (
|
3940
|
+
else if ( typeof ajax === 'function' )
|
3930
3941
|
{
|
3931
3942
|
// Is a function - let the caller define what needs to be done
|
3932
3943
|
oSettings.jqXHR = ajax.call( instance, data, callback, oSettings );
|
@@ -5360,14 +5371,18 @@
|
|
5360
5371
|
// both match, but we want to hide it completely. We want to also fix their
|
5361
5372
|
// width to what they currently are
|
5362
5373
|
_fnApplyToChildren( function(nSizer, i) {
|
5363
|
-
nSizer.innerHTML = '<div class="dataTables_sizing"
|
5374
|
+
nSizer.innerHTML = '<div class="dataTables_sizing">'+headerContent[i]+'</div>';
|
5375
|
+
nSizer.childNodes[0].style.height = "0";
|
5376
|
+
nSizer.childNodes[0].style.overflow = "hidden";
|
5364
5377
|
nSizer.style.width = headerWidths[i];
|
5365
5378
|
}, headerSrcEls );
|
5366
5379
|
|
5367
5380
|
if ( footer )
|
5368
5381
|
{
|
5369
5382
|
_fnApplyToChildren( function(nSizer, i) {
|
5370
|
-
nSizer.innerHTML = '<div class="dataTables_sizing"
|
5383
|
+
nSizer.innerHTML = '<div class="dataTables_sizing">'+footerContent[i]+'</div>';
|
5384
|
+
nSizer.childNodes[0].style.height = "0";
|
5385
|
+
nSizer.childNodes[0].style.overflow = "hidden";
|
5371
5386
|
nSizer.style.width = footerWidths[i];
|
5372
5387
|
}, footerSrcEls );
|
5373
5388
|
}
|
@@ -6561,7 +6576,7 @@
|
|
6561
6576
|
{
|
6562
6577
|
$(n)
|
6563
6578
|
.on( 'click.DT', oData, function (e) {
|
6564
|
-
n.blur(); // Remove focus outline for mouse users
|
6579
|
+
$(n).blur(); // Remove focus outline for mouse users
|
6565
6580
|
fn(e);
|
6566
6581
|
} )
|
6567
6582
|
.on( 'keypress.DT', oData, function (e){
|
@@ -7801,13 +7816,26 @@
|
|
7801
7816
|
}
|
7802
7817
|
}
|
7803
7818
|
else if ( order == 'current' || order == 'applied' ) {
|
7804
|
-
|
7805
|
-
displayMaster.slice()
|
7806
|
-
|
7807
|
-
|
7808
|
-
|
7809
|
-
|
7810
|
-
|
7819
|
+
if ( search == 'none') {
|
7820
|
+
a = displayMaster.slice();
|
7821
|
+
}
|
7822
|
+
else if ( search == 'applied' ) {
|
7823
|
+
a = displayFiltered.slice();
|
7824
|
+
}
|
7825
|
+
else if ( search == 'removed' ) {
|
7826
|
+
// O(n+m) solution by creating a hash map
|
7827
|
+
var displayFilteredMap = {};
|
7828
|
+
|
7829
|
+
for ( var i=0, ien=displayFiltered.length ; i<ien ; i++ ) {
|
7830
|
+
displayFilteredMap[displayFiltered[i]] = null;
|
7831
|
+
}
|
7832
|
+
|
7833
|
+
a = $.map( displayMaster, function (el) {
|
7834
|
+
return ! displayFilteredMap.hasOwnProperty(el) ?
|
7835
|
+
el :
|
7836
|
+
null;
|
7837
|
+
} );
|
7838
|
+
}
|
7811
7839
|
}
|
7812
7840
|
else if ( order == 'index' || order == 'original' ) {
|
7813
7841
|
for ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
|
@@ -7840,14 +7868,13 @@
|
|
7840
7868
|
* {array} - jQuery array of nodes, or simply an array of TR nodes
|
7841
7869
|
*
|
7842
7870
|
*/
|
7843
|
-
|
7844
|
-
|
7845
7871
|
var __row_selector = function ( settings, selector, opts )
|
7846
7872
|
{
|
7847
7873
|
var rows;
|
7848
7874
|
var run = function ( sel ) {
|
7849
7875
|
var selInt = _intVal( sel );
|
7850
7876
|
var i, ien;
|
7877
|
+
var aoData = settings.aoData;
|
7851
7878
|
|
7852
7879
|
// Short cut - selector is a number and no options provided (default is
|
7853
7880
|
// all records, so no need to check if the index is in there, since it
|
@@ -7872,23 +7899,26 @@
|
|
7872
7899
|
// Selector - function
|
7873
7900
|
if ( typeof sel === 'function' ) {
|
7874
7901
|
return $.map( rows, function (idx) {
|
7875
|
-
var row =
|
7902
|
+
var row = aoData[ idx ];
|
7876
7903
|
return sel( idx, row._aData, row.nTr ) ? idx : null;
|
7877
7904
|
} );
|
7878
7905
|
}
|
7879
7906
|
|
7880
|
-
// Get nodes in the order from the `rows` array with null values removed
|
7881
|
-
var nodes = _removeEmpty(
|
7882
|
-
_pluck_order( settings.aoData, rows, 'nTr' )
|
7883
|
-
);
|
7884
|
-
|
7885
7907
|
// Selector - node
|
7886
7908
|
if ( sel.nodeName ) {
|
7887
|
-
|
7888
|
-
|
7909
|
+
var rowIdx = sel._DT_RowIndex; // Property added by DT for fast lookup
|
7910
|
+
var cellIdx = sel._DT_CellIndex;
|
7911
|
+
|
7912
|
+
if ( rowIdx !== undefined ) {
|
7913
|
+
// Make sure that the row is actually still present in the table
|
7914
|
+
return aoData[ rowIdx ] && aoData[ rowIdx ].nTr === sel ?
|
7915
|
+
[ rowIdx ] :
|
7916
|
+
[];
|
7889
7917
|
}
|
7890
|
-
else if (
|
7891
|
-
return [
|
7918
|
+
else if ( cellIdx ) {
|
7919
|
+
return aoData[ cellIdx.row ] && aoData[ cellIdx.row ].nTr === sel ?
|
7920
|
+
[ cellIdx.row ] :
|
7921
|
+
[];
|
7892
7922
|
}
|
7893
7923
|
else {
|
7894
7924
|
var host = $(sel).closest('*[data-dt-row]');
|
@@ -7917,6 +7947,11 @@
|
|
7917
7947
|
// need to fall through to jQuery in case there is DOM id that
|
7918
7948
|
// matches
|
7919
7949
|
}
|
7950
|
+
|
7951
|
+
// Get nodes in the order from the `rows` array with null values removed
|
7952
|
+
var nodes = _removeEmpty(
|
7953
|
+
_pluck_order( settings.aoData, rows, 'nTr' )
|
7954
|
+
);
|
7920
7955
|
|
7921
7956
|
// Selector - jQuery selector string, array of nodes or jQuery object/
|
7922
7957
|
// As jQuery's .filter() allows jQuery objects to be passed in filter,
|
@@ -8111,7 +8146,13 @@
|
|
8111
8146
|
}
|
8112
8147
|
|
8113
8148
|
// Set
|
8114
|
-
ctx[0].aoData[ this[0] ]
|
8149
|
+
var row = ctx[0].aoData[ this[0] ];
|
8150
|
+
row._aData = data;
|
8151
|
+
|
8152
|
+
// If the DOM has an id, and the data source is an array
|
8153
|
+
if ( $.isArray( data ) && row.nTr.id ) {
|
8154
|
+
_fnSetObjectDataFn( ctx[0].rowId )( data, row.nTr.id );
|
8155
|
+
}
|
8115
8156
|
|
8116
8157
|
// Automatically invalidate
|
8117
8158
|
_fnInvalidate( ctx[0], this[0], 'data' );
|
@@ -8537,6 +8578,12 @@
|
|
8537
8578
|
_fnDrawHead( settings, settings.aoHeader );
|
8538
8579
|
_fnDrawHead( settings, settings.aoFooter );
|
8539
8580
|
|
8581
|
+
// Update colspan for no records display. Child rows and extensions will use their own
|
8582
|
+
// listeners to do this - only need to update the empty table item here
|
8583
|
+
if ( ! settings.aiDisplay.length ) {
|
8584
|
+
$(settings.nTBody).find('td[colspan]').attr('colspan', _fnVisbleColumns(settings));
|
8585
|
+
}
|
8586
|
+
|
8540
8587
|
_fnSaveState( settings );
|
8541
8588
|
};
|
8542
8589
|
|
@@ -8702,7 +8749,10 @@
|
|
8702
8749
|
|
8703
8750
|
// Selector - index
|
8704
8751
|
if ( $.isPlainObject( s ) ) {
|
8705
|
-
|
8752
|
+
// Valid cell index and its in the array of selectable rows
|
8753
|
+
return s.column !== undefined && s.row !== undefined && $.inArray( s.row, rows ) !== -1 ?
|
8754
|
+
[s] :
|
8755
|
+
[];
|
8706
8756
|
}
|
8707
8757
|
|
8708
8758
|
// Selector - jQuery filtered cells
|
@@ -8766,11 +8816,11 @@
|
|
8766
8816
|
}
|
8767
8817
|
|
8768
8818
|
// Row + column selector
|
8769
|
-
var columns = this.columns( columnSelector
|
8770
|
-
var rows = this.rows( rowSelector
|
8819
|
+
var columns = this.columns( columnSelector );
|
8820
|
+
var rows = this.rows( rowSelector );
|
8771
8821
|
var a, i, ien, j, jen;
|
8772
8822
|
|
8773
|
-
|
8823
|
+
this.iterator( 'table', function ( settings, idx ) {
|
8774
8824
|
a = [];
|
8775
8825
|
|
8776
8826
|
for ( i=0, ien=rows[idx].length ; i<ien ; i++ ) {
|
@@ -8781,10 +8831,11 @@
|
|
8781
8831
|
} );
|
8782
8832
|
}
|
8783
8833
|
}
|
8784
|
-
|
8785
|
-
return a;
|
8786
8834
|
}, 1 );
|
8787
8835
|
|
8836
|
+
// Now pass through the cell selector for options
|
8837
|
+
var cells = this.cells( a, opts );
|
8838
|
+
|
8788
8839
|
$.extend( cells.selector, {
|
8789
8840
|
cols: columnSelector,
|
8790
8841
|
rows: rowSelector,
|
@@ -9413,7 +9464,7 @@
|
|
9413
9464
|
* @type string
|
9414
9465
|
* @default Version number
|
9415
9466
|
*/
|
9416
|
-
DataTable.version = "1.10.
|
9467
|
+
DataTable.version = "1.10.17";
|
9417
9468
|
|
9418
9469
|
/**
|
9419
9470
|
* Private data store, containing all of the settings objects that are
|
@@ -12351,8 +12402,8 @@
|
|
12351
12402
|
* { "data": "engine" },
|
12352
12403
|
* { "data": "browser" },
|
12353
12404
|
* { "data": "platform.inner" },
|
12354
|
-
* { "data": "
|
12355
|
-
* { "data": "
|
12405
|
+
* { "data": "details.0" },
|
12406
|
+
* { "data": "details.1" }
|
12356
12407
|
* ]
|
12357
12408
|
* } );
|
12358
12409
|
* } );
|
@@ -14149,7 +14200,7 @@
|
|
14149
14200
|
* $.fn.dataTable.ext.type.detect.push(
|
14150
14201
|
* function ( data, settings ) {
|
14151
14202
|
* // Check the numeric part
|
14152
|
-
* if ( !
|
14203
|
+
* if ( ! data.substring(1).match(/[0-9]/) ) {
|
14153
14204
|
* return null;
|
14154
14205
|
* }
|
14155
14206
|
*
|
@@ -14732,7 +14783,8 @@
|
|
14732
14783
|
$.extend( _ext.type.order, {
|
14733
14784
|
// Dates
|
14734
14785
|
"date-pre": function ( d ) {
|
14735
|
-
|
14786
|
+
var ts = Date.parse( d );
|
14787
|
+
return isNaN(ts) ? -Infinity : ts;
|
14736
14788
|
},
|
14737
14789
|
|
14738
14790
|
// html
|
@@ -15048,6 +15100,7 @@
|
|
15048
15100
|
_fnRenderer: _fnRenderer,
|
15049
15101
|
_fnDataSource: _fnDataSource,
|
15050
15102
|
_fnRowAttributes: _fnRowAttributes,
|
15103
|
+
_fnExtend: _fnExtend,
|
15051
15104
|
_fnCalculateEnd: function () {} // Used by a lot of plug-ins, but redundant
|
15052
15105
|
// in 1.10, so this dead-end function is
|
15053
15106
|
// added to prevent errors
|
@@ -6,6 +6,7 @@ table.dataTable {
|
|
6
6
|
margin-bottom: 6px !important;
|
7
7
|
max-width: none !important;
|
8
8
|
border-collapse: separate !important;
|
9
|
+
border-spacing: 0;
|
9
10
|
|
10
11
|
td,
|
11
12
|
th {
|
@@ -155,6 +156,9 @@ div.dataTables_scrollBody {
|
|
155
156
|
margin-bottom: 0 !important;
|
156
157
|
|
157
158
|
thead { // Hide sort icons
|
159
|
+
.sorting:before,
|
160
|
+
.sorting_asc:before,
|
161
|
+
.sorting_desc:before,
|
158
162
|
.sorting:after,
|
159
163
|
.sorting_asc:after,
|
160
164
|
.sorting_desc:after {
|