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

Function shiftSelRowsIndex

libs/datatables-binding-0.18/datatables.js:966–974  ·  view source on GitHub ↗
(start, end)

Source from the content-addressed store, hash-verified

964 // If user filter the table again between the start click and the end click, the behavior
965 // would be undefined, but it should not be a problem.
966 var shiftSelRowsIndex = function(start, end) {
967 var indexes = server ? DT_rows_all : table.rows({ search: 'applied' }).indexes().toArray();
968 start = indexes.indexOf(start); end = indexes.indexOf(end);
969 // if start is larger than end, we need to swap
970 if (start > end) {
971 var tmp = end; end = start; start = tmp;
972 }
973 return indexes.slice(start, end + 1);
974 }
975
976 var serverRowIndex = function(clientRowIndex) {
977 return server ? DT_rows_current[clientRowIndex] : clientRowIndex + 1;

Callers 1

datatables.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected