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 2018/12/12 15:33:12 UTC

[myfaces-tobago] branch tobago-4.x updated: TOBAGO-1966: with columns contains "auto" ist not displayed

This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch tobago-4.x
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/tobago-4.x by this push:
     new 99ab0ab  TOBAGO-1966: <tc:sheet> with columns contains "auto" ist not displayed
99ab0ab is described below

commit 99ab0ab38c8d6608ba04fd0e9524d9528a6dd0db
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Wed Dec 12 16:22:16 2018 +0100

    TOBAGO-1966: <tc:sheet> with columns contains "auto" ist not displayed
    
    (cherry picked from commit 7bee817f6f520ed69534ca5fe370bb99fbf62b32)
---
 .../standard/tobago-bootstrap/_version/js/tobago-sheet.js      | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-sheet.js b/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-sheet.js
index df5f018..50926d0 100644
--- a/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-sheet.js
+++ b/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/resources/tobago/standard/tobago-bootstrap/_version/js/tobago-sheet.js
@@ -161,6 +161,8 @@ Tobago.Sheet.setup2 = function (sheets) {
               } else if (tokens[i].measure.lastIndexOf("%") > 0) {
                 widthRelative -= parseInt($bodyTable.width() / 100 * intValue);
               }
+            } else {
+              console.debug("auto? = " + tokens[i]); // @DEV_ONLY
             }
           }
         }
@@ -181,9 +183,13 @@ Tobago.Sheet.setup2 = function (sheets) {
               } else if (tokens[i].measure.lastIndexOf("%") > 0) {
                 colWidth = parseInt($bodyTable.width() / 100 * intValue);
               }
+            } else {
+              console.debug("auto? = " + tokens[i]); // @DEV_ONLY
+            }
+            if (colWidth > 0) { // because tokens[i] == "auto"
+              $headerCol.eq(headerBodyColCount).attr("width", colWidth);
+              $bodyCol.eq(headerBodyColCount).attr("width", colWidth);
             }
-            $headerCol.eq(headerBodyColCount).attr("width", colWidth);
-            $bodyCol.eq(headerBodyColCount).attr("width", colWidth);
             headerBodyColCount++;
           }
         }