Make the headers of tables and pivot tables fixed (#651)

This commit is contained in:
x4base
2016-06-22 18:16:27 -05:00
committed by Maxime Beauchemin
parent 8ebe074954
commit ab71ee4f93
3 changed files with 27 additions and 3 deletions

View File

@@ -96,8 +96,18 @@ var toggleCheckbox = function (apiUrlPrefix, selector) {
});
};
/**
* Fix the height of the table body of a DataTable with scrollY set
*/
var fixDataTableBodyHeight = function ($tableDom, height) {
var headHeight = $tableDom.find('.dataTables_scrollHead').height();
$tableDom.find('.dataTables_scrollBody')
.css('max-height', height - headHeight);
};
module.exports = {
wrapSvgText: wrapSvgText,
showModal: showModal,
toggleCheckbox: toggleCheckbox
toggleCheckbox: toggleCheckbox,
fixDataTableBodyHeight: fixDataTableBodyHeight
};