MCPcopy Create free account
hub / github.com/breck7/scroll / _fnRowAttributes

Function _fnRowAttributes

external/.datatables.js:2933–2960  ·  view source on GitHub ↗

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

(settings, row)

Source from the content-addressed store, hash-verified

2931 * @memberof DataTable#oApi
2932 */
2933 function _fnRowAttributes(settings, row) {
2934 var tr = row.nTr
2935 var data = row._aData
2936
2937 if (tr) {
2938 var id = settings.rowIdFn(data)
2939
2940 if (id) {
2941 tr.id = id
2942 }
2943
2944 if (data.DT_RowClass) {
2945 // Remove any classes added by DT_RowClass before
2946 var a = data.DT_RowClass.split(" ")
2947 row.__rowc = row.__rowc ? _unique(row.__rowc.concat(a)) : a
2948
2949 $(tr).removeClass(row.__rowc.join(" ")).addClass(data.DT_RowClass)
2950 }
2951
2952 if (data.DT_RowAttr) {
2953 $(tr).attr(data.DT_RowAttr)
2954 }
2955
2956 if (data.DT_RowData) {
2957 $(tr).data(data.DT_RowData)
2958 }
2959 }
2960 }
2961
2962 /**
2963 * Create the HTML header for the table

Callers 2

_fnInvalidateFunction · 0.85
_fnCreateTrFunction · 0.85

Calls 5

_uniqueFunction · 0.85
splitMethod · 0.80
concatMethod · 0.80
$Function · 0.70
joinMethod · 0.45

Tested by

no test coverage detected