From 061433ad6dc2af3a2be73d3c01452e7136dabad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Sun, 13 Jan 2008 21:21:53 +0000 Subject: #208197 by dvessel: back to cloning the table header only in tableheader.js (fixes radio button issues and Safari 2 crashing) --- misc/tableheader.js | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'misc') diff --git a/misc/tableheader.js b/misc/tableheader.js index ed607e0f0..3143e14fc 100644 --- a/misc/tableheader.js +++ b/misc/tableheader.js @@ -10,23 +10,12 @@ Drupal.behaviors.tableHeader = function (context) { var headers = []; $('table thead:not(.tableHeader-processed)', context).each(function () { - // Clone table and remove unwanted elements so it inherits original properties. - var headerClone = $(this.parentNode).clone(true).insertBefore(this.parentNode).addClass('sticky-header').css({ + // Clone thead so it inherits original jQuery properties. + var headerClone = $(this).clone(true).insertBefore(this.parentNode).wrap('').parent().css({ position: 'fixed', - visibility: 'hidden', top: '0px' }); - // Sets an id for cloned table header. - var headerID = headerClone.attr('id'); - if (headerID != '') { - headerClone.attr('id', headerID + '-header'); - } - - // Everything except thead must be removed. See theme_table(). - $('tbody', headerClone).remove(); - $('caption', headerClone).remove(); - var headerClone = $(headerClone)[0]; headers.push(headerClone); @@ -50,6 +39,7 @@ Drupal.behaviors.tableHeader = function (context) { e.vPosition = $(e.table).offset().top; e.hPosition = $(e.table).offset().left; e.vLength = $(e.table).height(); + e.resizeWidths = true; } // Track horizontal positioning relative to the viewport and set visibility. -- cgit v1.2.3