This commit is contained in:
James 2020-03-29 09:35:23 +01:00
parent c3d79d1e7b
commit 8a81683fbf

View File

@ -85,9 +85,11 @@ define(["jquery"], function ($) {
console.log("tt:"+tableTop+" st:"+scrollTop+" bt:"+buttonTop); console.log("tt:"+tableTop+" st:"+scrollTop+" bt:"+buttonTop);
if( scrollTop > tableTop ){ if( scrollTop > tableTop ){
$("#button_container").css('top', tableTop-(scrollTop-tableTop)); //$("#button_container").css('top', tableTop-(scrollTop-tableTop));
$("#button_container").css('position', 'fixed');
}else{ }else{
$("#button_container").css('top', tableTop); //$("#button_container").css('top', tableTop);
$("#button_container").css('position', 'absolute');
} }
/* /*
@ -100,14 +102,14 @@ define(["jquery"], function ($) {
}else{ }else{
$("#button_container").css('top', 0); $("#button_container").css('top', 0);
$("#heatcalc thead th").css('top', 0); $("#heatcalc thead th").css('top', 0);
} }
$('#heatcalc tbody th').css("left", $("#table_container").scrollLeft()); $('#heatcalc tbody th').css("left", $("#table_container").scrollLeft());
$('#heatcalc thead th:nth-child(1)').css("left", $("#table_container").scrollLeft()); $('#heatcalc thead th:nth-child(1)').css("left", $("#table_container").scrollLeft());
*/ */
} }
function draw_table(){ function draw_table(){
var prod_name = $("#hc_product option:selected").val(); var prod_name = $("#hc_product option:selected").val();
// creates the empty table // creates the empty table
@ -193,9 +195,9 @@ define(["jquery"], function ($) {
$("#hc_table td").on("mouseout", function() { $("#hc_table td").on("mouseout", function() {
$(this).closest("table").find("td,tr").removeClass("hover"); $(this).closest("table").find("td,tr").removeClass("hover");
}); });
} }
function populate_table(){ function populate_table(){
var prod_name = $("#hc_product option:selected").val(); var prod_name = $("#hc_product option:selected").val();
var dt=calc_dt(); var dt=calc_dt();
@ -245,9 +247,9 @@ define(["jquery"], function ($) {
}); });
}); });
}); });
} }
function calc_dt(){ function calc_dt(){
var mode=$("[name='mode']").val(); var mode=$("[name='mode']").val();
var t_flow=parseInt($("[name='t_flow']").val()); var t_flow=parseInt($("[name='t_flow']").val());
@ -265,7 +267,7 @@ define(["jquery"], function ($) {
$("[name='dt']").val(dt.toFixed(2)); $("[name='dt']").val(dt.toFixed(2));
return dt; return dt;
} }
}); });