Ishegatron has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/175935

Change subject: bug fix
......................................................................

bug fix

corrects mixmatched column widths

Change-Id: Id6401ff838f686387df9e8fb3de9f11d31485d9d
---
M modules/jquery.fixedheadertable.js
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FixedHeaderTable 
refs/changes/35/175935/1

diff --git a/modules/jquery.fixedheadertable.js 
b/modules/jquery.fixedheadertable.js
index 1c1824d..d07495c 100644
--- a/modules/jquery.fixedheadertable.js
+++ b/modules/jquery.fixedheadertable.js
@@ -364,8 +364,8 @@
             $thead.clone().appendTo($divHead.find('table'));
 
             $thead.find('tr th').each(function (index) {
-                var thisWidth = $(this).width() + 0.5;
-                $divHead.find('table tr th').eq(index).css('minWidth', 
thisWidth);
+                var thisWidth = parseInt(tableProps.tbody[index], 10);
+                $divHead.find('table tr th').eq(index).css({ 'min-width': 
thisWidth });
             });
         } else {
             $divHead = $wrapper.find('div.fht-thead');
@@ -512,7 +512,7 @@
             $cell = ($(this).find('div.fht-cell').length) ? 
$(this).find('div.fht-cell') : $('<div 
class="fht-cell"></div>').appendTo($(this));
             
             $cell.css({
-                'width': parseInt(cellArray[index], 10)
+                'min-width': parseInt(cellArray[index], 10) + 1
             });
 
             /*

-- 
To view, visit https://gerrit.wikimedia.org/r/175935
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id6401ff838f686387df9e8fb3de9f11d31485d9d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FixedHeaderTable
Gerrit-Branch: master
Gerrit-Owner: Ishegatron <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to