PNBR#56300 Scrollen in Reserveringen gaat erg hakkelend en traag in Internet Explorer

svn path=/Website/branches/v2018.2/; revision=40709
This commit is contained in:
Alex Tiehuis
2019-01-29 14:40:04 +00:00
parent d3d6752caf
commit 5161e54bb3

View File

@@ -528,12 +528,50 @@ function do_fcltfilters()
}
}
var is_internet_explorer = (navigator.userAgent.indexOf("MSIE ") != -1 || !!navigator.userAgent.match(/Trident.*rv\:11\./));
var elems = { hiddenHeight: function() {return (this.$floatingHeaderRow.hasClass("float-alone") ? 0 : (this.$originalHeaderRow.length? this.fcltHeight+this.histHeight : 0));},
headFootRowHeight: function() {return (this.$originalHeaderRow.length? this.$floatingHeaderRow.height()+this.footHeight : this.fcltHeight+this.histHeight+this.fcltPaddingTopBottom());},
fcltPaddingTopBottom: function() {return (parseInt(this.$fcltFrameHeader.css("paddingTop"), 10)+parseInt(this.$fcltFrameHeader.css("paddingBottom"), 10));}
};
function updateTableHeaders(event) {
$("div.divrstable, body#showbody, body#editbody").each(function() {
if (is_internet_explorer && $(".tableFloatingHeader", this).hasClass("float-alone"))
{ // Prevent floating headers and footer in case of Internet Explorer: legacy 2018.1
var $originalHeaderRow = $(".tableFloatingHeaderOriginal", this);
var $floatingHeaderRow = $(".tableFloatingHeader", this);
// Copy cell widths from original header cells
var $originalHeaderRowChildren = $originalHeaderRow.find("TH, TD");
$floatingHeaderRow.find("TH, TD").each(function(index) {
var cellWidth = $originalHeaderRowChildren.eq(index).width();
$(this).css("width", cellWidth);
});
var insideFrame = $(this).offset();
var outsideFrame = $(window.frameElement).offset();
var scrollTop = $(window.parent).scrollTop() + $(window).scrollTop();
var offset = 0;
if (insideFrame) offset += insideFrame.top;
if (outsideFrame && $(window.parent).scrollTop() != 0) offset += outsideFrame.top;
if ((scrollTop > offset) && (scrollTop < offset + $(this).height()))
{
$originalHeaderRow.css("visibility", "visible");
$floatingHeaderRow.css("top", (Math.min(scrollTop - offset, $(this).height() - $floatingHeaderRow.height())) + "px");
}
else
{
$originalHeaderRow.css("visibility", "hidden");
$floatingHeaderRow.css("top", "0px");
}
}
else
{
elems.$originalHeaderRow = $(".tableFloatingHeaderOriginal", this);
elems.$floatingHeaderRow = $(".tableFloatingHeader", this);
elems.$floatingFooterTd = $("td.rsfooter", this);
@@ -650,6 +688,7 @@ function updateTableHeaders(event) {
elems.$fixedFooterTd.css({height: 0, paddingTop: 0, paddingBottom: 0});
}
}
}
});
}
@@ -658,7 +697,7 @@ $(function() {
setTimeout( do_fcltfilters, 250); // Heel klein beetje uitstellen zodat eventuele
// suggests geinitialiseerd zijn
$("table:not(.tab_cat_sched) > thead:not(.float-alone)").each(function() {
$("table:not(.tab_cat_sched) > thead").each(function () {
$(this).parent("table").wrap("<div class=\"divrstable\" style=\"position:relative\"></div>");
var $originalHeaderRow = $(this);