Author: Alex.Kolonitsky
Date: 2009-09-01 11:25:18 -0400 (Tue, 01 Sep 2009)
New Revision: 15423
Modified:
branches/community/3.3.X/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js
branches/community/3.3.X/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx
Log:
ExtendedDataTable problem with scrolls in case summary width of columns is begger then
width of the table.
https://jira.jboss.org/jira/browse/RF-5751
Modified:
branches/community/3.3.X/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js
===================================================================
---
branches/community/3.3.X/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js 2009-09-01
15:14:35 UTC (rev 15422)
+++
branches/community/3.3.X/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js 2009-09-01
15:25:18 UTC (rev 15423)
@@ -298,9 +298,7 @@
this.footer = $(this.id +":footer");
if (ClientUILib.isOpera) {
//no overflow-x nor overflow-y in Opera
- this.scrollingDiv.setStyle({overflow: 'scroll',
- width: this.mainDiv.getWidth()
- });
+ this.scrollingDiv.setStyle({width: this.mainDiv.getWidth()});
this.table.setStyle({width: this.mainDiv.getWidth()});
};
@@ -401,7 +399,10 @@
cols[columnsNumber-1].width = null;
cols[cols.length-1].width = null;
var newHeight = mainDivHeight - header.getHeight() - footerHeight - 2;
- newHeight -= this.header.getCaptionHeight();
+ var caption = header.getCaption()
+ if (caption && caption.tagName == "caption") {
+ newHeight -= this.header.getCaptionHeight();
+ }
scrollingDiv.setStyle('height:'+ newHeight +'px;');
this._redrawTable(table);
header.adjustSeparators();
Modified:
branches/community/3.3.X/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx
===================================================================
---
branches/community/3.3.X/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx 2009-09-01
15:14:35 UTC (rev 15422)
+++
branches/community/3.3.X/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx 2009-09-01
15:25:18 UTC (rev 15423)
@@ -54,17 +54,16 @@
<div id="#{clientId}:od" class="extdt-outerdiv"
- style="width:100%; height:100%;overflow-y:hidden;overflow-x:auto;"
+ style="width:100%; height:100%;overflow: hidden;"
<div id="#{clientId}:dataTable_indicator"
class="drgind_fly drgind_default drag_indicator" style="display:
none;" >
<f:call name="encodeNamespace" />
-
- <script type="text/javascript">
- //<![CDATA[
- #{this:encodeDragDropChildScripts(context, component)};
- //]]>
- </script>
</div>
+ <script type="text/javascript">
+ //<![CDATA[
+ #{this:encodeDragDropChildScripts(context, component)};
+ //]]>
+ </script>
<span id="#{clientId}:dataTable_indicator_span" />
<div id="#{clientId}:innerd" class="extdt-innerdiv"
style="height:100%;width:100%;">
<div id="#{clientId}:cs" class="extdt-hsplit"
style="display: none;"/>
@@ -82,7 +81,7 @@
<tbody>
<tr>
<td colspan="#{columnsCount}" style="padding: 0px;">
- <div id="#{clientId}:sd" class="extdt-content"
style="height:50px;width:100%;">
+ <div id="#{clientId}:sd" class="extdt-content"
style="height:50px;width:100%;overflow:hidden;">
<jsp:scriptlet>
<![CDATA[
if (component.getRowCount() <= 0) {
@@ -103,7 +102,7 @@
}
]]>
</jsp:scriptlet>
- <table id="#{clientId}:n" width="100%"
+ <table id="#{clientId}:n" style="width:100%;
height:100%;overflow: hidden;"
class="extdt-table-layout rich-table
#{component.attributes['styleClass']}"
<f:call
name="utils.encodePassThruWithExclusions">