Author: konstantin.mishin
Date: 2007-07-26 12:21:22 -0400 (Thu, 26 Jul 2007)
New Revision: 1871
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
trunk/sandbox/ui/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-footer-cell.jspx
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-itself.jspx
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
trunk/sandbox/ui/scrollable-grid/src/test/java/org/richfaces/renderkit/html/ScrollableGridRendererTest.java
Log:
change name for CSS-classes
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-07-26
15:16:41 UTC (rev 1870)
+++
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-07-26
16:21:22 UTC (rev 1871)
@@ -325,7 +325,7 @@
ColumnWalker.iterateOverColumns(context, grid, cellRenderer, writer, state);
if(!state.isFrozenPart()){
writer.startElement("td", grid);
- getUtils().writeAttribute(writer, "class","ClientUI_Grid_BC " +
state.getColumnClass(state.getCellIndex()));
+ getUtils().writeAttribute(writer, "class","dr-sgrid-bc " +
state.getColumnClass(state.getCellIndex()));
writer.endElement("td");
}
writer.endElement(HTML.TR_ELEMENT);
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-07-26
15:16:41 UTC (rev 1870)
+++
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-07-26
16:21:22 UTC (rev 1871)
@@ -16,7 +16,7 @@
CLASSDEF: {
name: 'ClientUI.controls.grid.GridHeader',
parent: ClientUI.common.box.Box,
- sepStyleClass: "ClientUI_Grid_HSep"
+ sepStyleClass: "dr-sgrid-hsep"
}
});
@@ -392,7 +392,7 @@
},
OnCellMouseDown: function(event) {
var el = Event.element(event);
- while(el && !Element.hasClassName(el, "ClientUI_Grid_HC")) {
+ while(el && !Element.hasClassName(el, "dr-sgrid-hc")) {
el = el.parentNode;
}
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss 2007-07-26
15:16:41 UTC (rev 1870)
+++
trunk/sandbox/ui/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss 2007-07-26
16:21:22 UTC (rev 1871)
@@ -9,42 +9,29 @@
XPTable
*/
-<u:selector name=".ClientUI_Grid_HC .sort-asc">
+<u:selector name=".dr-sgrid-hc .sort-asc">
<u:style name="background-image">
<f:resource
f:key="/org/richfaces/renderkit/html/images/sort_asc.gif"/>
</u:style>
</u:selector>
-<u:selector name=".ClientUI_Grid_HC .sort-desc">
+<u:selector name=".dr-sgrid-hc .sort-desc">
<u:style name="background-image">
<f:resource
f:key="/org/richfaces/renderkit/html/images/sort_desc.gif"/>
</u:style>
</u:selector>
-<u:selector name=".ClientUI_Grid_HSep">
+<u:selector name=".dr-sgrid-hsep">
<u:style name="background-image">
<f:resource
f:key="/org/richfaces/renderkit/html/images/grid-split.gif"/>
</u:style>
</u:selector>
-<u:selector name=".CustomHeaderVSep">
- <u:style name="background-image">
- <f:resource
f:key="/org/richfaces/renderkit/html/images/grid-split.gif"/>
- </u:style>
-</u:selector>
-
-<u:selector name=".CustomHeaderHSep">
- <u:style name="background-image">
- <f:resource
f:key="/org/richfaces/renderkit/html/images/grid-split-h.gif"/>
- </u:style>
-</u:selector>
-
-
<f:verbatim>
<![CDATA[
-.ClientUI_Grid {
+.dr-sgrid {
font: menu;
background-color: white;
padding: 0px 0px;
@@ -62,7 +49,7 @@
/**
* Header row
*/
-.ClientUI_Grid_HR {
+.dr-sgrid-hr {
background-color: #ebeadb;
z-index:2;
}
@@ -70,7 +57,7 @@
/**
* Header cell
*/
-.ClientUI_Grid_HC {
+.dr-sgrid-hc {
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
overflow: hidden;
@@ -86,7 +73,7 @@
border-right: 1px solid #ebeadb;
}
-.ClientUI_Grid_HC .sort-asc, .ClientUI_Grid_HC .sort-desc {
+.dr-sgrid-hc .sort-asc, .dr-sgrid-hc .sort-desc {
background-position: right;
background-repeat: no-repeat;
width: 16px !important;;
@@ -97,7 +84,7 @@
/**
* Header cells separator
*/
-.ClientUI_Grid_HSep {
+.dr-sgrid-hsep {
/* background-image: url(grid-split.gif);*/
background-position: center;
background-repeat: repeat-y;
@@ -112,7 +99,7 @@
white-space: nowrap;
z-index: 60;
}
-.ClientUI_Grid_HSplit {
+.dr-sgrid-hsplit {
width:1px;
border-right:1px dashed #6593cf;
cursor: col-resize;
@@ -122,7 +109,7 @@
/**
* Header cell body
*/
-.ClientUI_Grid_HCBody {
+.dr-sgrid-hcbody {
cursor: default;
padding: 0px 0px;
white-space: nowrap;
@@ -133,22 +120,10 @@
font: normal 8pt arial;
}
-.ClientUI_Grid_HC_Over{
- border-bottom: 1px solid #fcc247;
-}
-
-.ClientUI_Grid_HC_Over .ClientUI_Grid_HCBody{
- background-color: #faf9f4;
- border-bottom: 1px solid #f9a900;
-}
-
-.ClientUI_HRFrm {
- z-index: 48;
-}
-.ClientUI_FrozenBox{
+.dr-sgrid-fb{
z-index: 50;
}
-.ClientUI_NormalBox {
+.dr-sgrid-nb {
z-index: 20;
}
@@ -161,7 +136,7 @@
/**
* Footer row
*/
-.ClientUI_Grid_FR {
+.dr-sgrid-fr {
background-color: #fcfaf6;
font: normal 8pt arial;
height: 22px;
@@ -171,7 +146,7 @@
/**
* Footer cell
*/
-.ClientUI_Grid_FC {
+.dr-sgrid-fc {
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
overflow: hidden;
@@ -190,7 +165,7 @@
/**
* Footer cell body
*/
-.ClientUI_Grid_FCBody {
+.dr-sgrid-fcbody {
cursor: default;
font: normal 8pt arial;
padding: 3px 5px;
@@ -200,7 +175,7 @@
overflow: hidden;
}
-.ClientUI_Grid_FCBody1{
+.dr-sgrid-fcbody1{
cursor: default;
font: normal 8pt arial;
padding: 0px 0px;
@@ -219,10 +194,10 @@
/**
* Body cell declaration
- * ClientUI_Grid_BC - reqired
- * ClientUI_Grid_BCDef - default, used if no custom styles defined in body template
+ * dr-sgrid-bc - reqired
+ * dr-sgrid-bcDef - default, used if no custom styles defined in body template
*/
-.ClientUI_Grid_BC {
+.dr-sgrid-bc {
box-sizing: border-box;
-moz-box-sizing: border-box;
-moz-outline: none;
@@ -231,17 +206,6 @@
border-right: 1px solid #f1efe2;
border-bottom: 1px solid #f1efe2;
}
-.ClientUI_Grid_BCIndex {
- background-color: #ebeadb;
- box-sizing: border-box;
- -moz-box-sizing: border-box;
- -moz-outline: none;
- -moz-user-focus: normal;
- cursor: default;
- border-left: 1px solid #f1efe2;
- border-bottom: 1px solid #cbc7b8;
- border-right: 1px solid #cbc7b8;
-}
/**
* Body row style
@@ -299,6 +263,7 @@
* Helper classes for grid template
*/
.ClientUI_Substrate {
+ z-index: 48;
filter:Alpha(opacity=0);
position:absolute;
top:0px;
@@ -317,34 +282,6 @@
overflow: hidden;
}
-.CustomHeaderVSep {
-
-/* background-image: url(themes/xp/grid-split.gif);*/
-
- background-position: top;
- background-repeat: repeat-y;
- font-size: 1px;
- top: 0px;
- width: 6px;
- height: 85%;
- z-index: 3;
-}
-
-.CustomHeaderHSep {
-
-/* background-image: url(themes/xp/grid-split-h.gif);*/
-
- background-position: center;
- background-repeat: repeat-x;
- font-size: 1px;
- top: 0px;
- left: 0px;
- width: 100%;
- height: 2px;
- z-index: 3;
- position: relative;
-}
-
.FirstClolumn {
font-weight: bold;
color: blue;
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx 2007-07-26
15:16:41 UTC (rev 1870)
+++
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx 2007-07-26
16:21:22 UTC (rev 1871)
@@ -11,7 +11,7 @@
component="javax.faces.component.UIComponent"
- <td class="ClientUI_Grid_BC Idg-column-cell
#{component.attributes['styleClass']}"
id="#{client_id}:c_#{cell_id}">
+ <td class="dr-sgrid-bc Idg-column-cell
#{component.attributes['styleClass']}"
id="#{client_id}:c_#{cell_id}">
<div id="#{client_id}:bc_#{cell_id}" class="ClientUI_Grid_BCBody
#{component.attributes['cellClass']}"
style="#{component.attributes['cellStyle']}">
<vcp:body/>
</div>
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-footer-cell.jspx
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-footer-cell.jspx 2007-07-26
15:16:41 UTC (rev 1870)
+++
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-footer-cell.jspx 2007-07-26
16:21:22 UTC (rev 1871)
@@ -11,9 +11,9 @@
component="javax.faces.component.UIComponent"
- <td class="ClientUI_Grid_FC Idg-footer-cell
#{component.attributes['footerClass']}">
- <span id="#{client_id}:fc_#{cell_index}"
class="ClientUI_Grid_FCBody1">
- <span class="ClientUI_Grid_FCBody">
+ <td class="dr-sgrid-fc Idg-footer-cell
#{component.attributes['footerClass']}">
+ <span id="#{client_id}:fc_#{cell_index}"
class="dr-sgrid-fcbody1">
+ <span class="dr-sgrid-fcbody">
<vcp:body/>
</span>
</span>
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx 2007-07-26
15:16:41 UTC (rev 1870)
+++
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx 2007-07-26
16:21:22 UTC (rev 1871)
@@ -12,7 +12,7 @@
component="javax.faces.component.UIComponent"
- <td class="ClientUI_Grid_HC Idg-header-cell
#{component.attributes['headerClass']}"
id="#{client_id}:hc_#{cell_index}" columnIndex="#{cell_index}"
sortable="#{component.attributes['sortable']}">
+ <td class="dr-sgrid-hc Idg-header-cell
#{component.attributes['headerClass']}"
id="#{client_id}:hc_#{cell_index}" columnIndex="#{cell_index}"
sortable="#{component.attributes['sortable']}">
<vcp:body/>
@@ -21,7 +21,7 @@
int offset = ((Integer)variables.getVariable("sepOffset")).intValue() - 3;
</jsp:scriptlet>
- <span column="#{cell_index}"
id="#{client_id}:hsep_#{cell_index}" style="left: #{offset}px;"
class="ClientUI_Grid_HSep" />
+ <span column="#{cell_index}"
id="#{client_id}:hsep_#{cell_index}" style="left: #{offset}px;"
class="dr-sgrid-hsep" />
</td>
</f:root>
\ No newline at end of file
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-itself.jspx
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-itself.jspx 2007-07-26
15:16:41 UTC (rev 1870)
+++
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-itself.jspx 2007-07-26
16:21:22 UTC (rev 1871)
@@ -12,7 +12,7 @@
component="javax.faces.component.UIComponent"
-<div id="#{client_id}:hcb_#{cell_index}"
class="ClientUI_Grid_HCBody">
+<div id="#{client_id}:hcb_#{cell_index}"
class="dr-sgrid-hcbody">
<vcp:body/>
<c:if test="#{sortAscending}">
<div align="right" id="#{client_id}:hsorta_#{cell_index}"
class="sort-asc" />
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-07-26
15:16:41 UTC (rev 1870)
+++
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-07-26
16:21:22 UTC (rev 1871)
@@ -66,12 +66,12 @@
</jsp:scriptlet>
- <div id="#{clientId}" style="width:
#{component.attributes['width']};height:
#{component.attributes['height']};" class="ClientUI_Grid
#{component.attributes['styleClass']}" >
- <div id="#{clientId}:cs" class="ClientUI_Grid_HSplit" />
+ <div id="#{clientId}" style="width:
#{component.attributes['width']};height:
#{component.attributes['height']};" class="dr-sgrid
#{component.attributes['styleClass']}" >
+ <div id="#{clientId}:cs" class="dr-sgrid-hsplit" />
<div id="#{clientId}_GridHeaderTemplate"
class="ClientUI_InlineBox" style="#{hStyle}; width:
#{component.attributes['width']};">
- <iframe id="#{clientId}:hs" class="ClientUI_HRFrm
ClientUI_Substrate" src="" scrolling="no"
frameborder="0" > <br/> </iframe>
+ <iframe id="#{clientId}:hs" class="ClientUI_Substrate"
src="" scrolling="no" frameborder="0" > <br/>
</iframe>
<div style="display: block; left: 0px; top: 0px; width:
#{sumWidth}px;">
- <span class="ClientUI_TmplBox ClientUI_FrozenBox"
id="#{clientId}:header:FrozenBox">
+ <span class="ClientUI_TmplBox dr-sgrid-fb"
id="#{clientId}:header:FrozenBox">
<table cellpadding="0" cellspacing="0"
style="border-collapse:collapse; table-layout:fixed">
<jsp:scriptlet>
@@ -81,7 +81,7 @@
</jsp:scriptlet>
<tbody>
- <tr class="ClientUI_Grid_HR
#{component.attributes['headerClass']}">
+ <tr class="dr-sgrid-hr
#{component.attributes['headerClass']}">
<jsp:scriptlet>
<![CDATA[
renderHeaders(context, component, true);
@@ -92,7 +92,7 @@
</table>
</span>
- <span class="ClientUI_TmplBox ClientUI_NormalBox"
id="#{clientId}:header:NormalBox">
+ <span class="ClientUI_TmplBox dr-sgrid-nb"
id="#{clientId}:header:NormalBox">
<table cellpadding="0" cellspacing="0"
style="border-collapse:collapse; table-layout:fixed">
<jsp:scriptlet>
@@ -102,7 +102,7 @@
</jsp:scriptlet>
<col width="1"/>
<tbody>
- <tr class="ClientUI_Grid_HR
#{component.attributes['headerClass']}">
+ <tr class="dr-sgrid-hr
#{component.attributes['headerClass']}">
<jsp:scriptlet>
<![CDATA[
renderHeaders(context, component, false);
@@ -123,7 +123,7 @@
<div id="#{clientId}:sb" style="position: absolute;"
><br/> </div>
</div>
<div id="#{clientId}:bc" style="display: block; width:
#{sumWidth}px;">
- <span class="ClientUI_TmplBox ClientUI_FrozenBox"
id="#{clientId}:body:FrozenBox">
+ <span class="ClientUI_TmplBox dr-sgrid-fb"
id="#{clientId}:body:FrozenBox">
<table id="#{clientId}:f" cellpadding="0"
cellspacing="0" style="border-collapse:collapse;
table-layout:fixed">
<jsp:scriptlet>
@@ -141,7 +141,7 @@
</table>
<span class="ClientUI_Grid_HO" id="#{clientId}:fho"
><br/></span>
</span>
- <span class="ClientUI_TmplBox ClientUI_NormalBox"
id="#{clientId}:body:NormalBox">
+ <span class="ClientUI_TmplBox dr-sgrid-nb"
id="#{clientId}:body:NormalBox">
<table id="#{clientId}:n" cellpadding="0"
cellspacing="0" style="border-collapse:collapse;
table-layout:fixed">
<jsp:scriptlet>
@@ -164,9 +164,9 @@
</div>
<div id="#{clientId}_GridFooterTemplate"
class="ClientUI_InlineBox" style="#{fStyle}; width:
#{component.attributes['width']};">
- <iframe id="#{clientId}:fs" class="ClientUI_FRFrm
ClientUI_Substrate" src="" scrolling="no"
frameborder="0" > <br/></iframe>
+ <iframe id="#{clientId}:fs" class="ClientUI_Substrate"
src="" scrolling="no" frameborder="0" >
<br/></iframe>
<div style="display: block; width: width: #{sumWidth}px;">
- <span class="ClientUI_TmplBox ClientUI_FrozenBox"
id="#{clientId}:footer:FrozenBox">
+ <span class="ClientUI_TmplBox dr-sgrid-fb"
id="#{clientId}:footer:FrozenBox">
<table cellpadding="0" cellspacing="0"
style="border-collapse:collapse; table-layout:fixed">
<jsp:scriptlet>
@@ -175,7 +175,7 @@
]]>
</jsp:scriptlet>
<tbody>
- <tr class="ClientUI_Grid_FR
#{component.attributes['footerClass']}">
+ <tr class="dr-sgrid-fr
#{component.attributes['footerClass']}">
<jsp:scriptlet>
<![CDATA[
renderFooters(context, component,true);
@@ -186,7 +186,7 @@
</table>
</span>
- <span class="ClientUI_TmplBox ClientUI_NormalBox"
id="#{clientId}:footer:NormalBox">
+ <span class="ClientUI_TmplBox dr-sgrid-nb"
id="#{clientId}:footer:NormalBox">
<table cellpadding="0" cellspacing="0"
style="border-collapse:collapse; table-layout:fixed">
<jsp:scriptlet>
@@ -196,7 +196,7 @@
</jsp:scriptlet>
<col width="1"/>
<tbody>
- <tr class="ClientUI_Grid_FR
#{component.attributes['footerClass']}">
+ <tr class="dr-sgrid-fr
#{component.attributes['footerClass']}">
<jsp:scriptlet>
<![CDATA[
renderFooters(context, component,false);
Modified:
trunk/sandbox/ui/scrollable-grid/src/test/java/org/richfaces/renderkit/html/ScrollableGridRendererTest.java
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/test/java/org/richfaces/renderkit/html/ScrollableGridRendererTest.java 2007-07-26
15:16:41 UTC (rev 1870)
+++
trunk/sandbox/ui/scrollable-grid/src/test/java/org/richfaces/renderkit/html/ScrollableGridRendererTest.java 2007-07-26
16:21:22 UTC (rev 1871)
@@ -120,7 +120,7 @@
assertEquals("div", div.getNodeName());
String classAttr = div.getAttributeValue("class");
- assertTrue(classAttr.contains("ClientUI_Grid"));
+ assertTrue(classAttr.contains("dr-sgrid"));
Iterator childIter= div.getChildElementsIterator();
String id = grid.getId();
@@ -155,7 +155,7 @@
res = false;
if(elemClassAttr.contains("ClientUI_InlineBox")){
res = true;
- }else if(elemClassAttr.contains("ClientUI_Grid_HSplit")){
+ }else if(elemClassAttr.contains("dr-sgrid-hsplit")){
res = true;
}
assertTrue(res);
@@ -205,9 +205,9 @@
assertNotNull(elemClassAttr);
if(element.getId().contains("FrozenBox")){
- assertTrue(elemClassAttr.contains("ClientUI_TmplBox
ClientUI_FrozenBox"));
+ assertTrue(elemClassAttr.contains("ClientUI_TmplBox dr-sgrid-fb"));
}else if(element.getId().contains("NormalBox")){
- assertTrue(elemClassAttr.contains("ClientUI_TmplBox
ClientUI_NormalBox"));
+ assertTrue(elemClassAttr.contains("ClientUI_TmplBox dr-sgrid-nb"));
}
@@ -216,13 +216,13 @@
HtmlElement hcell = page.getHtmlElementById(id + ":hc_" + i);
assertNotNull(hcell);
elemClassAttr = hcell.getAttributeValue("class");
- assertTrue(elemClassAttr.contains("ClientUI_Grid_HC Idg-header-cell"));
+ assertTrue(elemClassAttr.contains("dr-sgrid-hc Idg-header-cell"));
for (int j = 0; j < grid.getRows(); j++) {
HtmlElement bcell = page.getHtmlElementById(id + ":c_" + j +
"_" + i);
assertNotNull(bcell);
elemClassAttr = bcell.getAttributeValue("class");
- assertTrue(elemClassAttr.contains("ClientUI_Grid_BC
Idg-column-cell"));
+ assertTrue(elemClassAttr.contains("dr-sgrid-bc Idg-column-cell"));
}
}