You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2014/07/11 12:07:46 UTC
svn commit: r1609670 -
/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
Author: lofwyr
Date: Fri Jul 11 10:07:45 2014
New Revision: 1609670
URL: http://svn.apache.org/r1609670
Log:
TOBAGO-1413: Wrong size calucation after column resizing in sheet
Modified:
myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js?rev=1609670&r1=1609669&r2=1609670&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js Fri Jul 11 10:07:45 2014
@@ -332,7 +332,12 @@ Tobago.Sheet.setup2 = function (sheets)
var headerList = headerTable.find("col");
var bodyList = bodyTable.find("col");
var widths = ",";
- for (var i = 0; i < headerList.length; i++) {
+ var oldWidthList = [];
+ var i;
+ for (i = 0; i < bodyList.length; i++) {
+ oldWidthList[i] = bodyList.eq(i).width();
+ }
+ for (i = 0; i < headerList.length; i++) {
var newWidth = headerList.eq(i).width();
// for the hidden field
widths = widths + newWidth + ",";
@@ -344,7 +349,7 @@ Tobago.Sheet.setup2 = function (sheets)
// reset the width inside of the cells (TD) if the value was changed.
var tds = jQuery("td:nth-child(" + (i + 1) + ")", bodyTable);
if (tds.size() > 0) {
- var innerWidth = tds.children().eq(0).width() - oldWidth + newWidth;
+ var innerWidth = tds.children().eq(0).width() - oldWidthList[i] + newWidth;
// setting all sizes of the inner cells to the same value
tds.children().width(innerWidth);
// XXX later, if we have box-sizing: border-box we can set the width to 100%