MCPcopy Create free account
hub / github.com/blockstrap/framework / _fnRowAttributes

Function _fnRowAttributes

blockstrap/js/dependencies/tables.js:1625–1651  ·  view source on GitHub ↗

* Add attributes to a row based on the special `DT_*` parameters in a data * source object. * @param {object} DataTables row object for the row to be modified * @memberof DataTable#oApi

( row )

Source from the content-addressed store, hash-verified

1623 * @memberof DataTable#oApi
1624 */
1625 function _fnRowAttributes( row )
1626 {
1627 var tr = row.nTr;
1628 var data = row._aData;
1629
1630 if ( tr ) {
1631 if ( data.DT_RowId ) {
1632 tr.id = data.DT_RowId;
1633 }
1634
1635 if ( data.DT_RowClass ) {
1636 // Remove any classes added by DT_RowClass before
1637 var a = data.DT_RowClass.split(' ');
1638 row.__rowc = row.__rowc ?
1639 _unique( row.__rowc.concat( a ) ) :
1640 a;
1641
1642 $(tr)
1643 .removeClass( row.__rowc.join(' ') )
1644 .addClass( data.DT_RowClass );
1645 }
1646
1647 if ( data.DT_RowData ) {
1648 $(tr).data( data.DT_RowData );
1649 }
1650 }
1651 }
1652
1653
1654 /**

Callers 2

_fnInvalidateRowFunction · 0.85
_fnCreateTrFunction · 0.85

Calls 1

_uniqueFunction · 0.85

Tested by

no test coverage detected