jquery-datatables-rails 1.12.2 → 2.1.10.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/dataTables/extras/filler.png +0 -0
- data/app/assets/images/dataTables/extras/loading-background.png +0 -0
- data/app/assets/images/dataTables/sort_asc_disabled.png +0 -0
- data/app/assets/javascripts/dataTables/extras/dataTables.autoFill.js +851 -0
- data/app/assets/javascripts/dataTables/extras/{ColReorder.js → dataTables.colReorder.js} +558 -223
- data/app/assets/javascripts/dataTables/extras/dataTables.colVis.js +1096 -0
- data/app/assets/javascripts/dataTables/extras/{FixedColumns.js → dataTables.fixedColumns.js} +163 -113
- data/app/assets/javascripts/dataTables/extras/{FixedHeader.js → dataTables.fixedHeader.js} +306 -219
- data/app/assets/javascripts/dataTables/extras/{KeyTable.js → dataTables.keyTable.js} +155 -95
- data/app/assets/javascripts/dataTables/extras/{Scroller.js → dataTables.scroller.js} +469 -188
- data/app/assets/javascripts/dataTables/extras/{TableTools.js → dataTables.tableTools.js} +949 -341
- data/app/assets/javascripts/dataTables/jquery.dataTables.foundation.js +4 -4
- data/app/assets/javascripts/dataTables/jquery.dataTables.js +10711 -8427
- data/app/assets/media/dataTables/extras/swf/copy_csv_xls.swf +0 -0
- data/app/assets/media/dataTables/extras/swf/copy_csv_xls_pdf.swf +0 -0
- data/app/assets/stylesheets/dataTables/extras/dataTables.autoFill.css.scss +24 -0
- data/app/assets/stylesheets/dataTables/extras/dataTables.colReorder.css.scss +14 -0
- data/app/assets/stylesheets/dataTables/extras/dataTables.colVis.css.scss +184 -0
- data/app/assets/stylesheets/dataTables/extras/dataTables.colvis.jqueryui.css.scss +23 -0
- data/app/assets/stylesheets/dataTables/extras/dataTables.fixedColumns.css.scss +24 -0
- data/app/assets/stylesheets/dataTables/extras/dataTables.fixedHeader.css.scss +7 -0
- data/app/assets/stylesheets/dataTables/extras/dataTables.keyTable.css.scss +7 -0
- data/app/assets/stylesheets/dataTables/extras/dataTables.scroller.css.scss +44 -0
- data/app/assets/stylesheets/dataTables/extras/{TableTools.css.erb → dataTables.tableTools.css.scss} +30 -15
- data/app/assets/stylesheets/dataTables/jquery.dataTables.bootstrap.css.scss +6 -0
- data/app/assets/stylesheets/dataTables/jquery.dataTables.css.scss +363 -184
- data/app/assets/stylesheets/dataTables/src/jquery.dataTables_themeroller.css +307 -220
- data/lib/jquery/datatables/rails/version.rb +1 -1
- metadata +42 -22
- data/app/assets/javascripts/dataTables/extras/AutoFill.js +0 -820
- data/app/assets/javascripts/dataTables/extras/ColVis.js +0 -1005
- data/app/assets/javascripts/dataTables/extras/TableTools.min.js +0 -77
- data/app/assets/stylesheets/dataTables/extras/ColReorder.css.erb +0 -21
- data/app/assets/stylesheets/dataTables/extras/ColVis.css +0 -76
- data/app/assets/stylesheets/dataTables/extras/ColVisAlt.css.erb +0 -104
data/app/assets/javascripts/dataTables/extras/{FixedColumns.js → dataTables.fixedColumns.js}
RENAMED
@@ -1,28 +1,32 @@
|
|
1
|
+
/*! FixedColumns 3.0.1
|
2
|
+
* ©2010-2014 SpryMedia Ltd - datatables.net/license
|
3
|
+
*/
|
4
|
+
|
1
5
|
/**
|
2
6
|
* @summary FixedColumns
|
3
7
|
* @description Freeze columns in place on a scrolling DataTable
|
8
|
+
* @version 3.0.1
|
4
9
|
* @file dataTables.fixedColumns.js
|
5
|
-
* @
|
6
|
-
* @author Allan Jardine (www.sprymedia.co.uk)
|
7
|
-
* @license GPL v2 or BSD 3 point style
|
10
|
+
* @author SpryMedia Ltd (www.sprymedia.co.uk)
|
8
11
|
* @contact www.sprymedia.co.uk/contact
|
12
|
+
* @copyright Copyright 2010-2014 SpryMedia Ltd.
|
9
13
|
*
|
10
|
-
*
|
14
|
+
* This source file is free software, available under the following license:
|
15
|
+
* MIT license - http://datatables.net/license/mit
|
11
16
|
*
|
12
|
-
* This source file is
|
13
|
-
*
|
14
|
-
*
|
15
|
-
*
|
17
|
+
* This source file is distributed in the hope that it will be useful, but
|
18
|
+
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
19
|
+
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
|
20
|
+
*
|
21
|
+
* For details please refer to: http://www.datatables.net
|
16
22
|
*/
|
17
23
|
|
18
24
|
|
19
|
-
|
20
|
-
* $.fn.dataTable.FixedColumns
|
21
|
-
*/
|
22
|
-
var FixedColumns;
|
25
|
+
(function(window, document, undefined) {
|
23
26
|
|
24
|
-
(function(window, document, $, undefined) {
|
25
27
|
|
28
|
+
var factory = function( $, DataTable ) {
|
29
|
+
"use strict";
|
26
30
|
|
27
31
|
/**
|
28
32
|
* When making use of DataTables' x-axis scrolling feature, you may wish to
|
@@ -38,8 +42,12 @@ var FixedColumns;
|
|
38
42
|
*
|
39
43
|
* @class
|
40
44
|
* @constructor
|
41
|
-
* @
|
42
|
-
* @param {object}
|
45
|
+
* @global
|
46
|
+
* @param {object} dt DataTables instance. With DataTables 1.10 this can also
|
47
|
+
* be a jQuery collection, a jQuery selector, DataTables API instance or
|
48
|
+
* settings object.
|
49
|
+
* @param {object} [init={}] Configuration object for FixedColumns. Options are
|
50
|
+
* defined by {@link FixedColumns.defaults}
|
43
51
|
*
|
44
52
|
* @requires jQuery 1.7+
|
45
53
|
* @requires DataTables 1.8.0+
|
@@ -50,7 +58,7 @@ var FixedColumns;
|
|
50
58
|
* } );
|
51
59
|
* new $.fn.dataTable.fixedColumns( table );
|
52
60
|
*/
|
53
|
-
FixedColumns = function ( dt, init ) {
|
61
|
+
var FixedColumns = function ( dt, init ) {
|
54
62
|
var that = this;
|
55
63
|
|
56
64
|
/* Sanity check - you just know it will happen */
|
@@ -67,14 +75,20 @@ FixedColumns = function ( dt, init ) {
|
|
67
75
|
|
68
76
|
// Use the DataTables Hungarian notation mapping method, if it exists to
|
69
77
|
// provide forwards compatibility for camel case variables
|
70
|
-
if (
|
71
|
-
|
78
|
+
if ( $.fn.dataTable.camelToHungarian ) {
|
79
|
+
$.fn.dataTable.camelToHungarian( FixedColumns.defaults, init );
|
72
80
|
}
|
73
81
|
|
82
|
+
// v1.10 allows the settings object to be got form a number of sources
|
83
|
+
var dtSettings = $.fn.dataTable.Api ?
|
84
|
+
new $.fn.dataTable.Api( dt ).settings()[0] :
|
85
|
+
dt.fnSettings();
|
86
|
+
|
74
87
|
/**
|
75
88
|
* Settings object which contains customisable information for FixedColumns instance
|
76
89
|
* @namespace
|
77
90
|
* @extends FixedColumns.defaults
|
91
|
+
* @private
|
78
92
|
*/
|
79
93
|
this.s = {
|
80
94
|
/**
|
@@ -82,14 +96,14 @@ FixedColumns = function ( dt, init ) {
|
|
82
96
|
* @type object
|
83
97
|
* @default Obtained from DataTables instance
|
84
98
|
*/
|
85
|
-
"dt":
|
99
|
+
"dt": dtSettings,
|
86
100
|
|
87
101
|
/**
|
88
102
|
* Number of columns in the DataTable - stored for quick access
|
89
103
|
* @type int
|
90
104
|
* @default Obtained from DataTables instance
|
91
105
|
*/
|
92
|
-
"iTableColumns":
|
106
|
+
"iTableColumns": dtSettings.aoColumns.length,
|
93
107
|
|
94
108
|
/**
|
95
109
|
* Original outer widths of the columns as rendered by DataTables - used to calculate
|
@@ -112,6 +126,7 @@ FixedColumns = function ( dt, init ) {
|
|
112
126
|
/**
|
113
127
|
* DOM elements used by the class instance
|
114
128
|
* @namespace
|
129
|
+
* @private
|
115
130
|
*
|
116
131
|
*/
|
117
132
|
this.dom = {
|
@@ -249,12 +264,12 @@ FixedColumns = function ( dt, init ) {
|
|
249
264
|
};
|
250
265
|
|
251
266
|
/* Attach the instance to the DataTables instance so it can be accessed easily */
|
252
|
-
|
267
|
+
dtSettings._oFixedColumns = this;
|
253
268
|
|
254
269
|
/* Let's do it */
|
255
|
-
if ( !
|
270
|
+
if ( ! dtSettings._bInitComplete )
|
256
271
|
{
|
257
|
-
|
272
|
+
dtSettings.oApi._fnCallbackReg( dtSettings, 'aoInitComplete', function () {
|
258
273
|
that._fnConstruct( init );
|
259
274
|
}, 'FixedColumns' );
|
260
275
|
}
|
@@ -266,7 +281,7 @@ FixedColumns = function ( dt, init ) {
|
|
266
281
|
|
267
282
|
|
268
283
|
|
269
|
-
FixedColumns.prototype = {
|
284
|
+
FixedColumns.prototype = /** @lends FixedColumns.prototype */{
|
270
285
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
271
286
|
* Public methods
|
272
287
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
@@ -386,12 +401,12 @@ FixedColumns.prototype = {
|
|
386
401
|
// Its in the cloned table, so need to look up position
|
387
402
|
if ( node.nodeName.toLowerCase() === 'tr' ) {
|
388
403
|
idx = $(node).index();
|
389
|
-
return inst.fnGetPosition( $('tr', this.s.dt.nTBody)[ idx ] )
|
404
|
+
return inst.fnGetPosition( $('tr', this.s.dt.nTBody)[ idx ] );
|
390
405
|
}
|
391
406
|
else
|
392
407
|
{
|
393
408
|
var colIdx = $(node).index();
|
394
|
-
|
409
|
+
idx = $(node.parentNode).index();
|
395
410
|
var row = inst.fnGetPosition( $('tr', this.s.dt.nTBody)[ idx ] );
|
396
411
|
|
397
412
|
return [
|
@@ -441,82 +456,108 @@ FixedColumns.prototype = {
|
|
441
456
|
this.s = $.extend( true, this.s, FixedColumns.defaults, oInit );
|
442
457
|
|
443
458
|
/* Set up the DOM as we need it and cache nodes */
|
444
|
-
|
445
|
-
this.dom.
|
459
|
+
var classes = this.s.dt.oClasses;
|
460
|
+
this.dom.grid.dt = $(this.s.dt.nTable).parents('div.'+classes.sScrollWrapper)[0];
|
461
|
+
this.dom.scroller = $('div.'+classes.sScrollBody, this.dom.grid.dt )[0];
|
446
462
|
|
447
463
|
/* Set up the DOM that we want for the fixed column layout grid */
|
448
464
|
this._fnColCalc();
|
449
465
|
this._fnGridSetup();
|
450
466
|
|
451
467
|
/* Event handlers */
|
468
|
+
var mouseController;
|
452
469
|
|
453
470
|
// When the body is scrolled - scroll the left and right columns
|
454
|
-
$(this.dom.scroller)
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
{
|
467
|
-
// When scrolling the left column, scroll the body and right column
|
468
|
-
$(that.dom.grid.left.liner).on( 'scroll.DTFC', function () {
|
469
|
-
that.dom.scroller.scrollTop = that.dom.grid.left.liner.scrollTop;
|
470
|
-
if ( that.s.iRightColumns > 0 )
|
471
|
-
{
|
472
|
-
that.dom.grid.right.liner.scrollTop = that.dom.grid.left.liner.scrollTop;
|
471
|
+
$(this.dom.scroller)
|
472
|
+
.on( 'mouseover.DTFC touchstart.DTFC', function () {
|
473
|
+
mouseController = 'main';
|
474
|
+
} )
|
475
|
+
.on( 'scroll.DTFC', function () {
|
476
|
+
if ( mouseController === 'main' ) {
|
477
|
+
if ( that.s.iLeftColumns > 0 ) {
|
478
|
+
that.dom.grid.left.liner.scrollTop = that.dom.scroller.scrollTop;
|
479
|
+
}
|
480
|
+
if ( that.s.iRightColumns > 0 ) {
|
481
|
+
that.dom.grid.right.liner.scrollTop = that.dom.scroller.scrollTop;
|
482
|
+
}
|
473
483
|
}
|
474
484
|
} );
|
475
485
|
|
476
|
-
|
477
|
-
//
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
486
|
+
if ( that.s.iLeftColumns > 0 ) {
|
487
|
+
// When scrolling the left column, scroll the body and right column
|
488
|
+
$(that.dom.grid.left.liner)
|
489
|
+
.on( 'mouseover.DTFC touchstart.DTFC', function () {
|
490
|
+
mouseController = 'left';
|
491
|
+
} )
|
492
|
+
.on( 'scroll.DTFC', function () {
|
493
|
+
if ( mouseController === 'left' ) {
|
494
|
+
that.dom.scroller.scrollTop = that.dom.grid.left.liner.scrollTop;
|
495
|
+
if ( that.s.iRightColumns > 0 ) {
|
496
|
+
that.dom.grid.right.liner.scrollTop = that.dom.grid.left.liner.scrollTop;
|
497
|
+
}
|
498
|
+
}
|
499
|
+
} )
|
500
|
+
.on( "wheel.DTFC", function(e) {
|
501
|
+
// Pass horizontal scrolling through
|
502
|
+
var xDelta = -e.originalEvent.deltaX;
|
503
|
+
that.dom.scroller.scrollLeft -= xDelta;
|
504
|
+
} );
|
483
505
|
}
|
484
506
|
|
485
|
-
if ( that.s.iRightColumns > 0 )
|
486
|
-
{
|
507
|
+
if ( that.s.iRightColumns > 0 ) {
|
487
508
|
// When scrolling the right column, scroll the body and the left column
|
488
|
-
$(that.dom.grid.right.liner)
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
509
|
+
$(that.dom.grid.right.liner)
|
510
|
+
.on( 'mouseover.DTFC touchstart.DTFC', function () {
|
511
|
+
mouseController = 'right';
|
512
|
+
} )
|
513
|
+
.on( 'scroll.DTFC', function () {
|
514
|
+
if ( mouseController === 'right' ) {
|
515
|
+
that.dom.scroller.scrollTop = that.dom.grid.right.liner.scrollTop;
|
516
|
+
if ( that.s.iLeftColumns > 0 ) {
|
517
|
+
that.dom.grid.left.liner.scrollTop = that.dom.grid.right.liner.scrollTop;
|
518
|
+
}
|
519
|
+
}
|
520
|
+
} )
|
521
|
+
.on( "wheel.DTFC", function(e) {
|
522
|
+
// Pass horizontal scrolling through
|
523
|
+
var xDelta = -e.originalEvent.deltaX;
|
524
|
+
that.dom.scroller.scrollLeft -= xDelta;
|
525
|
+
} );
|
501
526
|
}
|
502
527
|
|
503
|
-
$(window).
|
528
|
+
$(window).on( 'resize.DTFC', function () {
|
504
529
|
that._fnGridLayout.call( that );
|
505
530
|
} );
|
506
531
|
|
507
532
|
var bFirstDraw = true;
|
508
|
-
this.s.dt.
|
509
|
-
|
533
|
+
var jqTable = $(this.s.dt.nTable);
|
534
|
+
|
535
|
+
jqTable
|
536
|
+
.on( 'draw.dt.DTFC', function () {
|
510
537
|
that._fnDraw.call( that, bFirstDraw );
|
511
538
|
bFirstDraw = false;
|
512
|
-
}
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
539
|
+
} )
|
540
|
+
.on( 'column-sizing.dt.DTFC', function () {
|
541
|
+
that._fnColCalc();
|
542
|
+
that._fnGridLayout( that );
|
543
|
+
} )
|
544
|
+
.on( 'column-visibility.dt.DTFC', function () {
|
545
|
+
that._fnColCalc();
|
546
|
+
that._fnGridLayout( that );
|
547
|
+
that._fnDraw( true );
|
548
|
+
} )
|
549
|
+
.on( 'destroy.dt.DTFC', function () {
|
550
|
+
jqTable.off( 'column-sizing.dt.DTFC destroy.dt.DTFC draw.dt.DTFC' );
|
551
|
+
|
552
|
+
$(that.dom.scroller).off( 'scroll.DTFC mouseover.DTFC' );
|
553
|
+
$(window).off( 'resize.DTFC' );
|
554
|
+
|
555
|
+
$(that.dom.grid.left.liner).off( 'scroll.DTFC wheel.DTFC mouseover.DTFC' );
|
556
|
+
$(that.dom.grid.left.wrapper).remove();
|
557
|
+
|
558
|
+
$(that.dom.grid.right.liner).off( 'scroll.DTFC wheel.DTFC mouseover.DTFC' );
|
559
|
+
$(that.dom.grid.right.wrapper).remove();
|
560
|
+
} );
|
520
561
|
|
521
562
|
/* Get things right to start with - note that due to adjusting the columns, there must be
|
522
563
|
* another redraw of the main table. It doesn't need to be a full redraw however.
|
@@ -557,7 +598,8 @@ FixedColumns.prototype = {
|
|
557
598
|
// table's border to the outerWidth, since we need to take
|
558
599
|
// account of it, but it isn't in any cell
|
559
600
|
if ( that.s.aiOuterWidths.length === 0 ) {
|
560
|
-
|
601
|
+
var border = $(that.s.dt.nTable).css('border-left-width');
|
602
|
+
iWidth += typeof border === 'string' ? 1 : parseInt( border, 10 );
|
561
603
|
}
|
562
604
|
|
563
605
|
that.s.aiOuterWidths.push( iWidth );
|
@@ -775,6 +817,7 @@ FixedColumns.prototype = {
|
|
775
817
|
*/
|
776
818
|
"_fnDraw": function ( bAll )
|
777
819
|
{
|
820
|
+
this._fnGridLayout();
|
778
821
|
this._fnCloneLeft( bAll );
|
779
822
|
this._fnCloneRight( bAll );
|
780
823
|
|
@@ -785,7 +828,7 @@ FixedColumns.prototype = {
|
|
785
828
|
}
|
786
829
|
|
787
830
|
/* Event triggering */
|
788
|
-
$(this).trigger( 'draw', {
|
831
|
+
$(this).trigger( 'draw.dtfc', {
|
789
832
|
"leftClone": this.dom.clone.left,
|
790
833
|
"rightClone": this.dom.clone.right
|
791
834
|
} );
|
@@ -800,8 +843,7 @@ FixedColumns.prototype = {
|
|
800
843
|
*/
|
801
844
|
"_fnCloneRight": function ( bAll )
|
802
845
|
{
|
803
|
-
if ( this.s.iRightColumns <= 0 )
|
804
|
-
{
|
846
|
+
if ( this.s.iRightColumns <= 0 ) {
|
805
847
|
return;
|
806
848
|
}
|
807
849
|
|
@@ -809,9 +851,10 @@ FixedColumns.prototype = {
|
|
809
851
|
i, jq,
|
810
852
|
aiColumns = [];
|
811
853
|
|
812
|
-
for ( i=this.s.iTableColumns-this.s.iRightColumns ; i<this.s.iTableColumns ; i++ )
|
813
|
-
|
814
|
-
|
854
|
+
for ( i=this.s.iTableColumns-this.s.iRightColumns ; i<this.s.iTableColumns ; i++ ) {
|
855
|
+
if ( this.s.dt.aoColumns[i].bVisible ) {
|
856
|
+
aiColumns.push( i );
|
857
|
+
}
|
815
858
|
}
|
816
859
|
|
817
860
|
this._fnClone( this.dom.clone.right, this.dom.grid.right, aiColumns, bAll );
|
@@ -826,8 +869,7 @@ FixedColumns.prototype = {
|
|
826
869
|
*/
|
827
870
|
"_fnCloneLeft": function ( bAll )
|
828
871
|
{
|
829
|
-
if ( this.s.iLeftColumns <= 0 )
|
830
|
-
{
|
872
|
+
if ( this.s.iLeftColumns <= 0 ) {
|
831
873
|
return;
|
832
874
|
}
|
833
875
|
|
@@ -835,9 +877,10 @@ FixedColumns.prototype = {
|
|
835
877
|
i, jq,
|
836
878
|
aiColumns = [];
|
837
879
|
|
838
|
-
for ( i=0 ; i<this.s.iLeftColumns ; i++ )
|
839
|
-
|
840
|
-
|
880
|
+
for ( i=0 ; i<this.s.iLeftColumns ; i++ ) {
|
881
|
+
if ( this.s.dt.aoColumns[i].bVisible ) {
|
882
|
+
aiColumns.push( i );
|
883
|
+
}
|
841
884
|
}
|
842
885
|
|
843
886
|
this._fnClone( this.dom.clone.left, this.dom.grid.left, aiColumns, bAll );
|
@@ -861,7 +904,7 @@ FixedColumns.prototype = {
|
|
861
904
|
for ( var i=0, iLen=aoOriginal.length ; i<iLen ; i++ )
|
862
905
|
{
|
863
906
|
var aRow = [];
|
864
|
-
aRow.nTr = $(aoOriginal[i].nTr).clone(true)[0];
|
907
|
+
aRow.nTr = $(aoOriginal[i].nTr).clone(true, true)[0];
|
865
908
|
|
866
909
|
for ( var j=0, jLen=this.s.iTableColumns ; j<jLen ; j++ )
|
867
910
|
{
|
@@ -873,7 +916,7 @@ FixedColumns.prototype = {
|
|
873
916
|
var iCloned = $.inArray( aoOriginal[i][j].cell, aCloned );
|
874
917
|
if ( iCloned === -1 )
|
875
918
|
{
|
876
|
-
var nClone = $(aoOriginal[i][j].cell).clone(true)[0];
|
919
|
+
var nClone = $(aoOriginal[i][j].cell).clone(true, true)[0];
|
877
920
|
aClones.push( nClone );
|
878
921
|
aCloned.push( aoOriginal[i][j].cell );
|
879
922
|
|
@@ -923,7 +966,7 @@ FixedColumns.prototype = {
|
|
923
966
|
{
|
924
967
|
oClone.header.parentNode.removeChild( oClone.header );
|
925
968
|
}
|
926
|
-
oClone.header = $(this.dom.header).clone(true)[0];
|
969
|
+
oClone.header = $(this.dom.header).clone(true, true)[0];
|
927
970
|
oClone.header.className += " DTFC_Cloned";
|
928
971
|
oClone.header.style.width = "100%";
|
929
972
|
oGrid.head.appendChild( oClone.header );
|
@@ -1028,6 +1071,7 @@ FixedColumns.prototype = {
|
|
1028
1071
|
/* Add in the tbody elements, cloning form the master table */
|
1029
1072
|
$('>tbody>tr', that.dom.body).each( function (z) {
|
1030
1073
|
var n = this.cloneNode(false);
|
1074
|
+
n.removeAttribute('id');
|
1031
1075
|
var i = that.s.dt.oFeatures.bServerSide===false ?
|
1032
1076
|
that.s.dt.aiDisplay[ that.s.dt._iDisplayStart+z ] : z;
|
1033
1077
|
for ( iIndex=0 ; iIndex<aiColumns.length ; iIndex++ )
|
@@ -1037,7 +1081,7 @@ FixedColumns.prototype = {
|
|
1037
1081
|
|
1038
1082
|
if ( aTds.length > 0 )
|
1039
1083
|
{
|
1040
|
-
nClone = $( aTds[iColumn] ).clone(true)[0];
|
1084
|
+
nClone = $( aTds[iColumn] ).clone(true, true)[0];
|
1041
1085
|
n.appendChild( nClone );
|
1042
1086
|
}
|
1043
1087
|
}
|
@@ -1080,7 +1124,7 @@ FixedColumns.prototype = {
|
|
1080
1124
|
{
|
1081
1125
|
oClone.footer.parentNode.removeChild( oClone.footer );
|
1082
1126
|
}
|
1083
|
-
oClone.footer = $(this.dom.footer).clone(true)[0];
|
1127
|
+
oClone.footer = $(this.dom.footer).clone(true, true)[0];
|
1084
1128
|
oClone.footer.className += " DTFC_Cloned";
|
1085
1129
|
oClone.footer.style.width = "100%";
|
1086
1130
|
oGrid.foot.appendChild( oClone.footer );
|
@@ -1205,13 +1249,13 @@ FixedColumns.prototype = {
|
|
1205
1249
|
* Statics
|
1206
1250
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
1207
1251
|
|
1208
|
-
|
1209
1252
|
/**
|
1210
1253
|
* FixedColumns default settings for initialisation
|
1254
|
+
* @name FixedColumns.defaults
|
1211
1255
|
* @namespace
|
1212
1256
|
* @static
|
1213
1257
|
*/
|
1214
|
-
FixedColumns.defaults = {
|
1258
|
+
FixedColumns.defaults = /** @lends FixedColumns.defaults */{
|
1215
1259
|
/**
|
1216
1260
|
* Number of left hand columns to fix in position
|
1217
1261
|
* @type int
|
@@ -1286,24 +1330,14 @@ FixedColumns.defaults = {
|
|
1286
1330
|
* Constants
|
1287
1331
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
1288
1332
|
|
1289
|
-
|
1290
|
-
/**
|
1291
|
-
* Name of this class
|
1292
|
-
* @constant CLASS
|
1293
|
-
* @type String
|
1294
|
-
* @default FixedColumns
|
1295
|
-
*/
|
1296
|
-
FixedColumns.prototype.CLASS = "FixedColumns";
|
1297
|
-
|
1298
|
-
|
1299
1333
|
/**
|
1300
1334
|
* FixedColumns version
|
1301
|
-
* @
|
1335
|
+
* @name FixedColumns.version
|
1302
1336
|
* @type String
|
1303
1337
|
* @default See code
|
1304
1338
|
* @static
|
1305
1339
|
*/
|
1306
|
-
FixedColumns.
|
1340
|
+
FixedColumns.version = "3.0.1";
|
1307
1341
|
|
1308
1342
|
|
1309
1343
|
|
@@ -1314,7 +1348,7 @@ FixedColumns.VERSION = "2.5.0.dev";
|
|
1314
1348
|
|
1315
1349
|
/**
|
1316
1350
|
* Event fired whenever FixedColumns redraws the fixed columns (i.e. clones the table elements from the main DataTable). This will occur whenever the DataTable that the FixedColumns instance is attached does its own draw.
|
1317
|
-
* @name FixedColumns#draw
|
1351
|
+
* @name FixedColumns#draw.dtfc
|
1318
1352
|
* @event
|
1319
1353
|
* @param {event} e jQuery event object
|
1320
1354
|
* @param {object} o Event parameters from FixedColumns
|
@@ -1325,6 +1359,22 @@ FixedColumns.VERSION = "2.5.0.dev";
|
|
1325
1359
|
|
1326
1360
|
// Make FixedColumns accessible from the DataTables instance
|
1327
1361
|
$.fn.dataTable.FixedColumns = FixedColumns;
|
1362
|
+
$.fn.DataTable.FixedColumns = FixedColumns;
|
1363
|
+
|
1364
|
+
|
1365
|
+
return FixedColumns;
|
1366
|
+
}; // /factory
|
1367
|
+
|
1368
|
+
|
1369
|
+
// Define as an AMD module if possible
|
1370
|
+
if ( typeof define === 'function' && define.amd ) {
|
1371
|
+
define( 'datatables-fixedcolumns', ['jquery', 'datatables'], factory );
|
1372
|
+
}
|
1373
|
+
else if ( jQuery && !jQuery.fn.dataTable.FixedColumns ) {
|
1374
|
+
// Otherwise simply initialise as normal, stopping multiple evaluation
|
1375
|
+
factory( jQuery, jQuery.fn.dataTable );
|
1376
|
+
}
|
1377
|
+
|
1328
1378
|
|
1379
|
+
})(window, document);
|
1329
1380
|
|
1330
|
-
})(window, document, jQuery);
|