diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-13 21:21:53 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-13 21:21:53 +0000 |
commit | 061433ad6dc2af3a2be73d3c01452e7136dabad2 (patch) | |
tree | 00612dd6f2332bc405adc9a59fdf491fb96193db /misc | |
parent | e78d7eb2359d46cb458af534082198d39e2d3f4c (diff) | |
download | brdo-061433ad6dc2af3a2be73d3c01452e7136dabad2.tar.gz brdo-061433ad6dc2af3a2be73d3c01452e7136dabad2.tar.bz2 |
#208197 by dvessel: back to cloning the table header only in tableheader.js (fixes radio button issues and Safari 2 crashing)
Diffstat (limited to 'misc')
-rw-r--r-- | misc/tableheader.js | 16 |
1 files changed, 3 insertions, 13 deletions
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('<table class="sticky-header"></table>').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. |