David B
01/31/2022, 10:40 PMDavid B
01/31/2022, 10:48 PM60vh
) and added the overflow-y: scroll
David B
01/31/2022, 10:59 PM*.<http://netsuite.com/*|netsuite.com/*>
pagesmichoel
01/31/2022, 11:02 PMDavid B
02/01/2022, 1:28 AMjen
02/03/2022, 9:27 PMjen
02/03/2022, 9:27 PMfunction freezeHeaders() {
//console.log('----- FREEZE HEADERS: start');
var current_context = nlapiGetContext();
var execution_context = current_context.getExecutionContext();
var user = current_context.user;
// Not for (certain user with id 12345)
if(user != 12345) {
//console.log('----- FREEZE HEADERS: user: ' + user);
jQuery(function () {
const windowHeight = jQuery(window).height();
//console.log('----- FREEZE HEADERS: windowHeight: ' + windowHeight);
jQuery('.uir-machine-table-container')
.filter((index, elem) => jQuery(elem).height() > windowHeight)
.css('height', '90vh')
.bind('scroll', (event) => {
const headerElem = jQuery(event.target).find('.uir-machine-headerrow');
//console.log('----- FREEZE HEADERS: before changing css');
headerElem.css('transform', 'translate(0, ' + (event.target.scrollTop - 1) + 'px)');
// console.log('----- FREEZE HEADERS: after changing css');
});
});
}
}
David B
02/04/2022, 12:43 AM-1
is for in:headerElem.css('transform', 'translate(0, ' + (event.target.scrollTop - 1) + 'px)');
David B
02/04/2022, 12:47 AM