@@ -509,10 +509,10 @@ Checkboxes.prototype = {
509
509
// Get cell data
510
510
var cellData = this . data ( ) ;
511
511
512
- // Determine if checkbox in the cell can be checked
512
+ // Determine if checkbox in the cell can be selected
513
513
var isCellSelectable = self . isCellSelectable ( colIdx , cellData ) ;
514
514
515
- // If checkbox is selected
515
+ // If checkbox is checked
516
516
if ( ctx . checkboxes . s . data [ colIdx ] . hasOwnProperty ( cellData ) ) {
517
517
self . updateCheckbox ( this , colIdx , true ) ;
518
518
@@ -919,7 +919,8 @@ Api.registerPlural( 'columns().checkboxes.select()', 'column().checkboxes.select
919
919
if ( typeof state === 'undefined' ) { state = true ; }
920
920
921
921
return this . iterator ( 'column-rows' , function ( ctx , colIdx , i , j , rowsIdx ) {
922
- if ( ctx . checkboxes ) {
922
+ // If Checkboxes extension is enabled for this column
923
+ if ( ctx . aoColumns [ colIdx ] . checkboxes ) {
923
924
// Prepare a list of all cells
924
925
var selector = [ ] ;
925
926
$ . each ( rowsIdx , function ( index , rowIdx ) {
@@ -933,7 +934,7 @@ Api.registerPlural( 'columns().checkboxes.select()', 'column().checkboxes.select
933
934
var rowsSelectableIdx = [ ] ;
934
935
selector = [ ] ;
935
936
$ . each ( cellsData , function ( index , cellData ) {
936
- // If checkbox in the cell can be checked
937
+ // If checkbox in the cell can be selected
937
938
if ( ctx . checkboxes . isCellSelectable ( colIdx , cellData ) ) {
938
939
selector . push ( { row : rowsIdx [ index ] , column : colIdx } ) ;
939
940
rowsSelectableIdx . push ( rowsIdx [ index ] ) ;
@@ -969,11 +970,12 @@ Api.registerPlural( 'cells().checkboxes.select()', 'cell().checkboxes.select()',
969
970
if ( typeof state === 'undefined' ) { state = true ; }
970
971
971
972
return this . iterator ( 'cell' , function ( ctx , rowIdx , colIdx ) {
972
- if ( ctx . checkboxes ) {
973
+ // If Checkboxes extension is enabled for this column
974
+ if ( ctx . aoColumns [ colIdx ] . checkboxes ) {
973
975
var cells = this . cells ( [ { row : rowIdx , column : colIdx } ] ) ;
974
976
var cellData = this . cell ( { row : rowIdx , column : colIdx } ) . data ( ) ;
975
977
976
- // If checkbox in the cell can be checked
978
+ // If checkbox in the cell can be selected
977
979
if ( ctx . checkboxes . isCellSelectable ( colIdx , cellData ) ) {
978
980
ctx . checkboxes . updateData ( cells , colIdx , state ) ;
979
981
ctx . checkboxes . updateCheckbox ( cells , colIdx , state ) ;
@@ -1003,7 +1005,8 @@ Api.registerPlural( 'cells().checkboxes.enable()', 'cell().checkboxes.enable()',
1003
1005
if ( typeof state === 'undefined' ) { state = true ; }
1004
1006
1005
1007
return this . iterator ( 'cell' , function ( ctx , rowIdx , colIdx ) {
1006
- if ( ctx . checkboxes ) {
1008
+ // If Checkboxes extension is enabled for this column
1009
+ if ( ctx . aoColumns [ colIdx ] . checkboxes ) {
1007
1010
var cell = this . cell ( { row : rowIdx , column : colIdx } ) ;
1008
1011
1009
1012
// Get cell data
0 commit comments