svn path=/Website/trunk/; revision=31041
This commit is contained in:
2016-10-11 11:33:49 +00:00
parent 95bef3926c
commit 3d903c4a5f
3 changed files with 21 additions and 13 deletions

View File

@@ -91,7 +91,7 @@ function loadGraph(nr, params)
if (params.view_names[nr].hastext2 == 0)
fclt_text[2] = "";
var safe_text = [];
var safe_text = [];
for (var i = 0; i < fclt_text.length; i++)
{
safe_text[i] = safe.url(fclt_text[i]);

View File

@@ -2,22 +2,28 @@
$("div.divrstable").each(function() {
var originalHeaderRow = $(".tableFloatingHeaderOriginal", this);
var floatingHeaderRow = $(".tableFloatingHeader", this);
var firstFrame = $(this).offset();
var secondFrame = $(window.frameElement).offset();
var insideFrame = $(this).offset();
var outsideFrame = $(window.frameElement).offset();
var scrollTop = $(window.parent).scrollTop();
offset = firstFrame.top + secondFrame.top;
var offset = insideFrame.top + outsideFrame.top;
// if browser is IE then correct the top positioning
var IEcorr = (/*@cc_on!@*/false || !!document.documentMode)?-4:0;
if ((scrollTop > offset) && (scrollTop < offset + $(this).height())) {
floatingHeaderRow.css("visibility", "visible");
floatingHeaderRow.css("top", Math.min(scrollTop - offset, $(this).height() - floatingHeaderRow.height()) + "px");
floatingHeaderRow.css("top", (IEcorr + Math.min(scrollTop - offset, $(this).height() - floatingHeaderRow.height())) + "px");
// Copy cell widths from original header
// Copy cell widths from original header cells
$("th", floatingHeaderRow).each(function(index) {
var cellWidth = $("th", originalHeaderRow).eq(index).css('width');
$(this).css('width', cellWidth);
});
$("td", floatingHeaderRow).each(function(index) {
var cellWidth = $("td", originalHeaderRow).eq(index).css('width');
$(this).css('width', cellWidth);
});
// Copy row width from whole table
floatingHeaderRow.css("width", $(this).css("width"));
floatingHeaderRow.css("width", $(this).css("width")-1);
}
else {
floatingHeaderRow.css("visibility", "hidden");
@@ -34,13 +40,14 @@
var originalHeaderRow = $("thead:first", this)
originalHeaderRow.before(originalHeaderRow.clone());
var clonedHeaderRow = $("thead:first", this)
// if browser is IE then correct the left margin
var corr = (/*@cc_on!@*/false || !!document.documentMode)?-2:1;
clonedHeaderRow.addClass("tableFloatingHeader");
clonedHeaderRow.css("position", "absolute");
clonedHeaderRow.css("top", "0px");
clonedHeaderRow.css("left", $(this).css("margin-left"));
clonedHeaderRow.css("left", corr);
clonedHeaderRow.css("visibility", "hidden");
clonedHeaderRow.css("opacity", "1.0");
clonedHeaderRow.css("opacity", "0.90");
originalHeaderRow.addClass("tableFloatingHeaderOriginal");
});

View File

@@ -12,7 +12,7 @@
*/
FCLTHeader.Requires({js: ["../res/res_plan.js", "date.js"]});
FCLTHeader.Requires({js: ["../res/res_plan.js", "date.js", "floatThead.js"]});
// params: res_van, res_tot (en vis)
// Wijzigt(!) plan_rooms_info en voegt overal een will_fit aan toe
@@ -298,12 +298,12 @@ __Log("start make_plan_room");
class="compressed planbord planbord<%=hour_px%> multiday"
<%=onclick%>
<%=onmouse%>
>
><thead>
<tr style='height:36px;vertical-align:top;'>
<td><label><!--silence--></label></td>
<td align='right' class="capaciteit"><label><!--silence--></label></td>
<% Response.Write(res.build_planbord_tijdbalk(params.res_van, nr_days, hour_px, S("res_t1"), S("res_t2"), params.fnStep)); %>
</tr>
</tr></thead><tbody>
<%
var any_nofit = false;
@@ -382,6 +382,7 @@ __Log("start make_plan_room");
<td></td>
<% Response.Write(res.build_planbord_tijdbalk(params.res_van, nr_days, hour_px, S("res_t1"), S("res_t2"))); %>
</tr>
</tbody>
</table>
<% if (!params.noclicker) { %>
<script>