(ignoreSelectable)
| 1198 | // Change selected3's value based on selectable3, then |
| 1199 | // refresh the cell selection state according to values in selected3 |
| 1200 | var selectCells = function(ignoreSelectable) { |
| 1201 | if (!ignoreSelectable) onlyKeepSelectableCells(); |
| 1202 | table.$('td.' + selClass).removeClass(selClass); |
| 1203 | if (selected3.length === 0) return; |
| 1204 | if (server) { |
| 1205 | table.cells({page: 'current'}).every(function() { |
| 1206 | var info = tweakCellIndex(this); |
| 1207 | if (findIndex([info.row, info.col], selected3) > -1) |
| 1208 | $(this.node()).addClass(selClass); |
| 1209 | }); |
| 1210 | } else { |
| 1211 | selected3.map(function(ij) { |
| 1212 | $(table.cell(ij[0] - 1, ij[1]).node()).addClass(selClass); |
| 1213 | }); |
| 1214 | } |
| 1215 | }; |
| 1216 | table.on('click.dt', 'tbody td', function() { |
| 1217 | var $this = $(this), info = tweakCellIndex(table.cell(this)); |
| 1218 | if ($this.hasClass(selClass)) { |
no test coverage detected