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 2010/04/08 15:12:00 UTC

svn commit: r931923 - in /myfaces/tobago/trunk/theme: scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/

Author: lofwyr
Date: Thu Apr  8 13:12:00 2010
New Revision: 931923

URL: http://svn.apache.org/viewvc?rev=931923&view=rev
Log:
TOBAGO-870: Weight of scrollbars should be computed in the browser
 - using the values as interger in JavaScript

Modified:
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java
    myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java?rev=931923&r1=931922&r2=931923&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java Thu Apr  8 13:12:00 2010
@@ -309,9 +309,11 @@ public class PageRenderer extends PageRe
           "Tobago.calculateScrollbarWeights('" + clientId + ComponentUtils.SUB_SEPARATOR + "scrollbar-weight" + "');");
     } else {
       facesContext.getOnloadScripts().add(
-          "Tobago.Config.set('Tobago', 'verticalScrollbarWeight', '" + client.getVerticalScrollbarWeight() + "');");
+          "Tobago.Config.set('Tobago', 'verticalScrollbarWeight', '"
+              + client.getVerticalScrollbarWeight().getPixel() + "');");
       facesContext.getOnloadScripts().add(
-          "Tobago.Config.set('Tobago', 'horizontalScrollbarWeight', '" + client.getHorizontalScrollbarWeight() + "');");
+          "Tobago.Config.set('Tobago', 'horizontalScrollbarWeight', '"
+              + client.getHorizontalScrollbarWeight().getPixel() + "');");
     }
 
     if (component.getFacets().containsKey(Facets.RESIZE_ACTION)) {

Modified: myfaces/tobago/trunk/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/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js?rev=931923&r1=931922&r2=931923&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js Thu Apr  8 13:12:00 2010
@@ -716,7 +716,7 @@ Tobago.Sheet.prototype.adjustHeaderDiv =
     if (clientWidth == 0) {
       clientWidth = Math.min(contentWidth, boxSum);
     }
-    var minWidth = contentWidth - Tobago.Config.get("Tobago", "horizontalScrollbarWeight")
+    var minWidth = contentWidth - Tobago.Config.get("Tobago", "verticalScrollbarWeight")
                    - Tobago.Config.get("Sheet", "contentBorderWidth");
     minWidth = Math.max(minWidth, 0); // not less than 0
     headerDiv.style.width = Math.max(clientWidth, minWidth);