diff options
author | Raimund Meyer <ray@raimundmeyer.de> | 2015-03-15 12:55:12 +0300 |
---|---|---|
committer | Atul Pratap Singh <atulpratapsingh05@gmail.com> | 2015-03-15 12:55:12 +0300 |
commit | 98231225e2c962ce224807546c62c6b241040550 (patch) | |
tree | 3875a2bce3a79e59b63b58b5b1f48c23d2a93016 /js/sql.js | |
parent | dc291426105f448b5039ae4392afaf2a2dc03ee1 (diff) |
Fix bug#4799 Position of sticky columns wrong when screen width too small
Signed-off-by: Atul Pratap Singh <atulpratapsingh05@gmail.com>
Diffstat (limited to 'js/sql.js')
-rw-r--r-- | js/sql.js | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -8,7 +8,7 @@ */ var $data_a; -var prevScrollX = 0, fixedTop; +var prevScrollX = 0; /** * decode a string URL_encoded @@ -771,14 +771,13 @@ function setStickyColumnsPosition($sticky_columns, $table_results, position, top * Initialize sticky columns */ function initStickyColumns($table_results) { - fixedTop = $('#floating_menubar').height(); var $sticky_columns = $('<table class="sticky_columns"></table>') .insertBefore($table_results) .css("position", "fixed") .css("z-index", "99") .css("width", $table_results.width()) .css("margin-left", $('#page_content').css("margin-left")) - .css("top", fixedTop) + .css("top", $('#floating_menubar').height()) .css("display", "none"); return $sticky_columns; } @@ -823,10 +822,10 @@ function handleStickyColumns($sticky_columns, $table_results) { //for horizontal scrolling if(prevScrollX != currentScrollX) { prevScrollX = currentScrollX; - setStickyColumnsPosition($sticky_columns, $table_results, "absolute", fixedTop + windowOffset - tableStartOffset); + setStickyColumnsPosition($sticky_columns, $table_results, "absolute", $('#floating_menubar').height() + windowOffset - tableStartOffset); //for vertical scrolling } else { - setStickyColumnsPosition($sticky_columns, $table_results, "fixed", fixedTop, $("#pma_navigation").width() - currentScrollX, $('#page_content').css("margin-left")); + setStickyColumnsPosition($sticky_columns, $table_results, "fixed", $('#floating_menubar').height(), $("#pma_navigation").width() - currentScrollX, $('#page_content').css("margin-left")); } $sticky_columns.show(); } else { |