diff --git a/src/js/datatable.js b/src/js/datatable.js index 74ee9a9871a22706b2ed8cac64e0b7bc3b801308..dccaef55b5260cdb3e0e8f05f8f9c06e1b1ed8a0 100644 --- a/src/js/datatable.js +++ b/src/js/datatable.js @@ -48,6 +48,7 @@ checkable: false, // added check icon to the head of rows checkByClickRow: true, // change check status by click anywhere on a row checkedClass: 'active', // apply CSS class to an checked row + checkboxName: null, // Sort options sortable: false, // enable sorter @@ -352,6 +353,7 @@ $rightRow, // $tr, $td, + $cTd, row, rowLen = rows.length, rowCol, @@ -389,7 +391,12 @@ $tr = i < data.flexStart ? $leftRow : ((i >= data.flexStart && i <= data.flexEnd) ? $flexRow : $rightRow); if(i === 0 && checkable) { - $tr.append(''); + $cTd = $(''); + if(options.checkboxName) + { + $cTd.append(''); + } + $tr.append($cTd); } if(cols[i].ignore) continue; @@ -466,10 +473,11 @@ $datatable.append('
'); } - var $oldFooter = $datatable.children('.datatable-footer'); + var $oldFooter = $datatable.children('.datatable-footer').detach(); if (data.footer) { $datatable.append($('