summaryrefslogtreecommitdiffstats
path: root/vid/src/main/webapp/static/fusion/raptor/js/persist_table_header.js
diff options
context:
space:
mode:
authorjimmydot <jf2512@att.com>2017-05-07 14:58:24 -0400
committerjimmydot <jf2512@att.com>2017-05-07 14:58:24 -0400
commit3982f4f67314ec37fd9b22ae54049958af777c1b (patch)
tree72111b7c13ee7529cce1ea4c8d83c89fdd164450 /vid/src/main/webapp/static/fusion/raptor/js/persist_table_header.js
parent00e0d25933699f9e39c3f0b86c983165a1e3e330 (diff)
[VID-6] Initial rebase push
Change-Id: I9077be9663754d9b22f77c6a7b3109b361b39346 Signed-off-by: jimmydot <jf2512@att.com>
Diffstat (limited to 'vid/src/main/webapp/static/fusion/raptor/js/persist_table_header.js')
-rw-r--r--vid/src/main/webapp/static/fusion/raptor/js/persist_table_header.js47
1 files changed, 0 insertions, 47 deletions
diff --git a/vid/src/main/webapp/static/fusion/raptor/js/persist_table_header.js b/vid/src/main/webapp/static/fusion/raptor/js/persist_table_header.js
deleted file mode 100644
index 2c90306f..00000000
--- a/vid/src/main/webapp/static/fusion/raptor/js/persist_table_header.js
+++ /dev/null
@@ -1,47 +0,0 @@
- function UpdateTableHeaders() {
- $("div.divTableWithFloatingHeader").each(function() {
- var originalHeaderRow = $(".tableFloatingHeaderOriginal", this);
- var floatingHeaderRow = $(".tableFloatingHeader", this);
- var offset = $(this).offset();
- var scrollTop = $(window).scrollTop();
- if ((scrollTop > offset.top) && (scrollTop < offset.top + $(this).height())) {
- floatingHeaderRow.css("visibility", "visible");
- floatingHeaderRow.css("top", Math.min(scrollTop - offset.top, $(this).height() - floatingHeaderRow.height()) + "px");
- floatingHeaderRow.css("z-index", "20");
-
- // Copy cell widths from original header
- $("th", floatingHeaderRow).each(function(index) {
- var cellWidth = $("th", originalHeaderRow).eq(index).css('width');
- $(this).css('width', cellWidth);
- });
-
- // Copy row width from whole table
- floatingHeaderRow.css("width", $(this).css("width"));
- }
- else {
- floatingHeaderRow.css("visibility", "hidden");
- floatingHeaderRow.css("top", "0px");
- }
- });
- }
-
- $(document).ready(function() {
- $("table.tableWithFloatingHeader").each(function() {
- $(this).wrap("<div class=\"divTableWithFloatingHeader\" style=\"position:relative\"></div>");
-
- var originalHeaderRow = $("tr:first", this)
- originalHeaderRow.before(originalHeaderRow.clone());
- var clonedHeaderRow = $("tr:first", this)
-
- clonedHeaderRow.addClass("tableFloatingHeader");
- clonedHeaderRow.css("position", "absolute");
- clonedHeaderRow.css("top", "0px");
- clonedHeaderRow.css("left", $(this).css("margin-left"));
- clonedHeaderRow.css("visibility", "hidden");
-
- originalHeaderRow.addClass("tableFloatingHeaderOriginal");
- });
- UpdateTableHeaders();
- $(window.parent).scroll(UpdateTableHeaders);
- $(window.parent).resize(UpdateTableHeaders);
- }); \ No newline at end of file