Explorar el Código

Fixing table header see BT#4527

Julio Montoya hace 12 años
padre
commit
be9d6e1ae6
Se han modificado 1 ficheros con 12 adiciones y 1 borrados
  1. 12 1
      main/attendance/attendance_sheet.php

+ 12 - 1
main/attendance/attendance_sheet.php

@@ -82,7 +82,18 @@ if (api_is_allowed_to_edit(null, true)) {
             var scrollTop = $(window).scrollTop();
             if ((scrollTop > offset.top) && (scrollTop < offset.top + $(this).height())) {
                 floatingHeaderRow.css("visibility", "hidden");
-                floatingHeaderRow.css("top", Math.min(scrollTop - offset.top, $(this).height() - floatingHeaderRow.height()) + "px");
+                var topbar = 0;
+                if ($("#topbar").length != 0) {
+                    topbar = $("#topbar").height();
+                }
+                
+                if ($(".subnav").length != 0) {
+                    topbar = topbar + $(".subnav").height();
+                }
+                
+                var top_value = Math.min(scrollTop - offset.top, $(this).height() - floatingHeaderRow.height()) + topbar;
+                
+                floatingHeaderRow.css("top",  top_value + "px");
 
                 // Copy cell widths from original header
                 $("th", floatingHeaderRow).each(function(index) {