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 2016/12/22 10:39:27 UTC
svn commit: r1775614 -
/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/script/tobago-sheet.js
Author: lofwyr
Date: Thu Dec 22 10:39:27 2016
New Revision: 1775614
URL: http://svn.apache.org/viewvc?rev=1775614&view=rev
Log:
TOBAGO-1668: Unnecessary Error Logging
ignore empty [] array
Modified:
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/script/tobago-sheet.js
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/script/tobago-sheet.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/script/tobago-sheet.js?rev=1775614&r1=1775613&r2=1775614&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/script/tobago-sheet.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/script/tobago-sheet.js Thu Dec 22 10:39:27 2016
@@ -136,8 +136,8 @@ Tobago.Sheet.setup2 = function (sheets)
// if the hidden has a value, than also the colgroup/col are set correctly
var columnWidths = jQuery.parseJSON(hidden.val());
console.info("columnWidths: " + columnWidths); // @DEV_ONLY
- console.info(columnWidths); // @DEV_ONLY
- } else {
+ }
+ if (columnWidths.length == 0) {
// otherwise use the layout definition
var layout = $sheet.data("tobago-layout");
if (layout && layout.columns && layout.columns.length > 0) {
@@ -152,6 +152,7 @@ Tobago.Sheet.setup2 = function (sheets)
console.assert($headerCol.length - 1 == $bodyCol.length, "header and body column number doesn't match"); // @DEV_ONLY
var i;
+ var intValue;
var sumRelative = 0;
var widthRelative = $bodyTable.width();
for (i = 0; i < tokens.length; i++) {
@@ -159,7 +160,7 @@ Tobago.Sheet.setup2 = function (sheets)
if (typeof tokens[i] == "number") {
sumRelative += tokens[i];
} else if (typeof tokens[i] == "object" && tokens[i].measure != undefined) {
- var intValue = parseInt(tokens[i].measure);
+ intValue = parseInt(tokens[i].measure);
if (tokens[i].measure.lastIndexOf("px") > 0) {
widthRelative -= intValue;
} else if (tokens[i].measure.lastIndexOf("%") > 0) {
@@ -179,7 +180,7 @@ Tobago.Sheet.setup2 = function (sheets)
if (typeof tokens[i] == "number") {
colWidth = parseInt((tokens[i] * widthRelative) / sumRelative);
} else if (typeof tokens[i] == "object" && tokens[i].measure != undefined) {
- var intValue = parseInt(tokens[i].measure);
+ intValue = parseInt(tokens[i].measure);
if (tokens[i].measure.lastIndexOf("px") > 0) {
colWidth = intValue;
} else if (tokens[i].measure.lastIndexOf("%") > 0) {