MCPcopy Create free account
hub / github.com/OpenIntroStat/ims / selectRows

Function selectRows

libs/datatables-binding-0.18/datatables.js:1019–1033  ·  view source on GitHub ↗
(ignoreSelectable)

Source from the content-addressed store, hash-verified

1017 // Change selected1's value based on selectable1, then
1018 // refresh the row selection state according to values in selected1
1019 var selectRows = function(ignoreSelectable) {
1020 if (!ignoreSelectable) onlyKeepSelectableRows();
1021 table.$('tr.' + selClass).removeClass(selClass);
1022 if (selected1.length === 0) return;
1023 if (server) {
1024 table.rows({page: 'current'}).every(function() {
1025 if (inArray(DT_rows_current[this.index()], selected1)) {
1026 $(this.node()).addClass(selClass);
1027 }
1028 });
1029 } else {
1030 var selected0 = selected1.map(function(i) { return i - 1; });
1031 $(table.rows(selected0).nodes()).addClass(selClass);
1032 }
1033 }
1034 table.on('mousedown.dt', 'tbody tr', function(e) {
1035 var $this = $(this), thisRow = table.row(this);
1036 if (selMode === 'multiple') {

Callers 1

datatables.jsFile · 0.85

Calls 3

onlyKeepSelectableRowsFunction · 0.85
inArrayFunction · 0.85
$Function · 0.50

Tested by

no test coverage detected