Author: konstantin.mishin
Date: 2007-07-27 10:29:16 -0400 (Fri, 27 Jul 2007)
New Revision: 1894
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/GridBody.js
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.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.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-27
14:15:05 UTC (rev 1893)
+++
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-07-27
14:29:16 UTC (rev 1894)
@@ -273,9 +273,9 @@
UIScrollableGrid grid = state.getGrid();
writer.startElement("td", grid);
writer.startElement("div", grid);
- getUtils().writeAttribute(writer, "class",
"ClientUI_Grid_BCBody1");
+ getUtils().writeAttribute(writer, "class", "dr-sgrid-bcbody1");
writer.startElement("div", grid);
- getUtils().writeAttribute(writer, "class",
"ClientUI_Grid_BCBody");
+ getUtils().writeAttribute(writer, "class", "dr-sgrid-bcbody");
String divId = client_id + ":bc_" + cell_id;
getUtils().writeAttribute(writer, "id", divId);
if(!state.isFake()) {
@@ -316,7 +316,7 @@
writer.startElement(HTML.TR_ELEMENT, grid);
state.setFrozenColumnCount(GridUtils.getFrozenColumnsCount(grid));
getUtils().writeAttribute(writer, "id",row_id);
- getUtils().writeAttribute(writer, "class","ClientUI_Grid_BR " +
state.getRowClass(index));
+ getUtils().writeAttribute(writer, "class","dr-sgrid-rb " +
state.getRowClass(index));
if (log.isDebugEnabled()) {
log.debug("rowIndex : " + index);
@@ -379,7 +379,7 @@
row_id = baseClientId + ":f:" + state.getRowIndex();
writer.startElement("tr", grid);
getUtils().writeAttribute(writer,"id",row_id);
- getUtils().writeAttribute(writer,"class",
"ClientUI_Grid_BR");
+ getUtils().writeAttribute(writer,"class", "dr-sgrid-rb");
collection.add(row_id);
}else if(!state.isFrozenColumn() && !normalTRRendered){
@@ -393,7 +393,7 @@
writer.startElement("tr", grid);
getUtils().writeAttribute(writer,"id",row_id);
- getUtils().writeAttribute(writer,"class",
"ClientUI_Grid_BR");
+ getUtils().writeAttribute(writer,"class", "dr-sgrid-rb");
normalTRRendered = true;
collection.add(row_id);
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-07-27
14:15:05 UTC (rev 1893)
+++
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-07-27
14:29:16 UTC (rev 1894)
@@ -704,7 +704,7 @@
tbl = this.templNormal.getElement().rows[row].cells;
}
- var cell = document.getElementsByClassName("ClientUI_Grid_BCBody",
tbl[index]);
+ var cell = document.getElementsByClassName("dr-sgrid-bcbody", tbl[index]);
return (cell && cell.length && cell.length>0) ? cell[0].innerHTML :
"";
},
ensureVisible: function (index) {
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js
===================================================================
---
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-07-27
14:15:05 UTC (rev 1893)
+++
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-07-27
14:29:16 UTC (rev 1894)
@@ -268,8 +268,8 @@
while(j <= this.selection.ranges[i].indexes[1]) {
var fElement = $(this.prefix + ":f:" + j);
var nElement = $(this.prefix + ":n:" + j);
- Element.addClassName(fElement, "idg-row-selected-h");
- Element.addClassName(nElement, "idg-row-selected-h");
+ Element.addClassName(fElement, "dr-sgrid-row-selected");
+ Element.addClassName(nElement, "dr-sgrid-row-selected");
Element.addClassName(fElement, "Idg-row-selected");
Element.addClassName(nElement, "Idg-row-selected");
Element.addClassName(fElement, this.selectedClass);
@@ -477,8 +477,8 @@
this.selection.addId(rowIndex);
var fElement = $(this.prefix + ":f:" + rowIndex);
var nElement = $(this.prefix + ":n:" + rowIndex);
- Element.addClassName(fElement, "idg-row-selected-h");
- Element.addClassName(nElement, "idg-row-selected-h");
+ Element.addClassName(fElement, "dr-sgrid-row-selected");
+ Element.addClassName(nElement, "dr-sgrid-row-selected");
Element.addClassName(fElement, "Idg-row-selected");
Element.addClassName(nElement, "Idg-row-selected");
Element.addClassName(fElement, this.selectedClass);
@@ -489,8 +489,8 @@
this.selection.removeId(rowIndex);
var fElement = $(this.prefix + ":f:" + rowIndex);
var nElement = $(this.prefix + ":n:" + rowIndex);
- Element.removeClassName(fElement, "idg-row-selected-h");
- Element.removeClassName(nElement, "idg-row-selected-h");
+ Element.removeClassName(fElement, "dr-sgrid-row-selected");
+ Element.removeClassName(nElement, "dr-sgrid-row-selected");
Element.removeClassName(fElement, "Idg-row-selected");
Element.removeClassName(nElement, "Idg-row-selected");
Element.removeClassName(fElement, this.selectedClass);
@@ -502,8 +502,8 @@
if(this.activeRow != null) {
fElement = $(this.prefix + ":f:" + this.activeRow);
nElement = $(this.prefix + ":n:" + this.activeRow);
- Element.removeClassName(fElement, "idg-row-active-h");
- Element.removeClassName(nElement, "idg-row-active-h");
+ Element.removeClassName(fElement, "dr-sgrid-row-active");
+ Element.removeClassName(nElement, "dr-sgrid-row-active");
Element.removeClassName(fElement, "Idg-row-active");
Element.removeClassName(nElement, "Idg-row-active");
Element.removeClassName(fElement, this.activeClass);
@@ -511,8 +511,8 @@
}
fElement = $(this.prefix + ":f:" + rowIndex);
nElement = $(this.prefix + ":n:" + rowIndex);
- Element.addClassName(fElement, "idg-row-active-h");
- Element.addClassName(nElement, "idg-row-active-h");
+ Element.addClassName(fElement, "dr-sgrid-row-active");
+ Element.addClassName(nElement, "dr-sgrid-row-active");
Element.addClassName(fElement, "Idg-row-active");
Element.addClassName(nElement, "Idg-row-active");
Element.addClassName(fElement, this.activeClass);
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-27
14:15:05 UTC (rev 1893)
+++
trunk/sandbox/ui/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss 2007-07-27
14:29:16 UTC (rev 1894)
@@ -210,40 +210,28 @@
/**
* Body row style
*/
-.ClientUI_Grid_HO {
+.dr-sgrid-ho {
position: absolute;
height: 10px;
width: 10px;
}
-.ClientUI_Grid_BR {
+.dr-sgrid-rb {
font: normal 8pt arial;
white-space: nowrap;
box-sizing: border-box;
-moz-box-sizing: border-box;
}
-.idg-row-selected-h {
+.dr-sgrid-row-selected {
background-color: #DDDDFF;
}
-.idg-row-active-h {
+.dr-sgrid-row-active {
color : #0000AA;
}
-.ClientUI_Grid_BROdd {
- background-color: #FFFFFF;
- font: normal 8pt arial;
- z-index:2;
-}
-
-.ClientUI_Grid_BREven {
- background-color: #fcfaf6;
- font: normal 8pt arial;
- z-index:2;
-}
-
-.ClientUI_Grid_BCBody {
+.dr-sgrid-bcbody {
cursor: default;
font: normal 8pt arial;
white-space: nowrap;
@@ -262,7 +250,7 @@
/**
* Helper classes for grid template
*/
-.ClientUI_Substrate {
+.dr-sgrid-substrate {
z-index: 48;
filter:Alpha(opacity=0);
position:absolute;
@@ -271,30 +259,16 @@
display:block;
}
-.ClientUI_TmplBox {
+.dr-sgrid-tmplbox {
display: block;
float:left;
}
-.ClientUI_InlineBox {
+.dr-sgrid-inlinebox {
position: relative;
display: block;
overflow: hidden;
}
-
-.FirstClolumn {
- font-weight: bold;
- color: blue;
-}
-
-.RowIndexCell {
- background-color: #ebeadb;
- padding: 0 0 0 0;
- margin: 0 0 0 0;
- font: normal 8pt arial;
- border-bottom: 1px solid #cbc7b8;
- border-right: 1px solid #cbc7b8;
-}
]]>
</f:verbatim>
</f:template>
\ No newline at end of file
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-27
14:15:05 UTC (rev 1893)
+++
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx 2007-07-27
14:29:16 UTC (rev 1894)
@@ -12,7 +12,7 @@
<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']}">
+ <div id="#{client_id}:bc_#{cell_id}" class="dr-sgrid-bcbody
#{component.attributes['cellClass']}"
style="#{component.attributes['cellStyle']}">
<vcp:body/>
</div>
</td>
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-27
14:15:05 UTC (rev 1893)
+++
trunk/sandbox/ui/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-07-27
14:29:16 UTC (rev 1894)
@@ -68,10 +68,10 @@
<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_Substrate"
src="" scrolling="no" frameborder="0" > <br/>
</iframe>
+ <div id="#{clientId}_GridHeaderTemplate"
class="dr-sgrid-inlinebox" style="#{hStyle}; width:
#{component.attributes['width']};">
+ <iframe id="#{clientId}:hs" class="dr-sgrid-substrate"
src="" scrolling="no" frameborder="0" > <br/>
</iframe>
<div style="display: block; left: 0px; top: 0px; width:
#{sumWidth}px;">
- <span class="ClientUI_TmplBox dr-sgrid-fb"
id="#{clientId}:header:FrozenBox">
+ <span class="dr-sgrid-tmplbox dr-sgrid-fb"
id="#{clientId}:header:FrozenBox">
<table cellpadding="0" cellspacing="0"
style="border-collapse:collapse; table-layout:fixed">
<jsp:scriptlet>
@@ -92,7 +92,7 @@
</table>
</span>
- <span class="ClientUI_TmplBox dr-sgrid-nb"
id="#{clientId}:header:NormalBox">
+ <span class="dr-sgrid-tmplbox dr-sgrid-nb"
id="#{clientId}:header:NormalBox">
<table cellpadding="0" cellspacing="0"
style="border-collapse:collapse; table-layout:fixed">
<jsp:scriptlet>
@@ -118,12 +118,12 @@
- <div id="#{clientId}_GridBodyTemplate"
class="ClientUI_InlineBox" style="overflow: auto; width:
#{component.attributes['width']}; height:
#{component.attributes['height']};">
+ <div id="#{clientId}_GridBodyTemplate"
class="dr-sgrid-inlinebox" style="overflow: auto; width:
#{component.attributes['width']}; height:
#{component.attributes['height']};">
<div id="#{clientId}:scb" style="position: absolute; z-index:
0;">
<div id="#{clientId}:sb" style="position: absolute;"
><br/> </div>
</div>
<div id="#{clientId}:bc" style="display: block; width:
#{sumWidth}px;">
- <span class="ClientUI_TmplBox dr-sgrid-fb"
id="#{clientId}:body:FrozenBox">
+ <span class="dr-sgrid-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>
@@ -139,9 +139,9 @@
</jsp:scriptlet>
</tbody>
</table>
- <span class="ClientUI_Grid_HO" id="#{clientId}:fho"
><br/></span>
+ <span class="dr-sgrid-ho" id="#{clientId}:fho"
><br/></span>
</span>
- <span class="ClientUI_TmplBox dr-sgrid-nb"
id="#{clientId}:body:NormalBox">
+ <span class="dr-sgrid-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>
@@ -158,15 +158,15 @@
</jsp:scriptlet>
</tbody>
</table>
- <span class="ClientUI_Grid_HO" id="#{clientId}:nho"
><br/></span>
+ <span class="dr-sgrid-ho" id="#{clientId}:nho"
><br/></span>
</span>
</div>
</div>
- <div id="#{clientId}_GridFooterTemplate"
class="ClientUI_InlineBox" style="#{fStyle}; width:
#{component.attributes['width']};">
- <iframe id="#{clientId}:fs" class="ClientUI_Substrate"
src="" scrolling="no" frameborder="0" >
<br/></iframe>
+ <div id="#{clientId}_GridFooterTemplate"
class="dr-sgrid-inlinebox" style="#{fStyle}; width:
#{component.attributes['width']};">
+ <iframe id="#{clientId}:fs" class="dr-sgrid-substrate"
src="" scrolling="no" frameborder="0" >
<br/></iframe>
<div style="display: block; width: width: #{sumWidth}px;">
- <span class="ClientUI_TmplBox dr-sgrid-fb"
id="#{clientId}:footer:FrozenBox">
+ <span class="dr-sgrid-tmplbox dr-sgrid-fb"
id="#{clientId}:footer:FrozenBox">
<table cellpadding="0" cellspacing="0"
style="border-collapse:collapse; table-layout:fixed">
<jsp:scriptlet>
@@ -186,7 +186,7 @@
</table>
</span>
- <span class="ClientUI_TmplBox dr-sgrid-nb"
id="#{clientId}:footer:NormalBox">
+ <span class="dr-sgrid-tmplbox dr-sgrid-nb"
id="#{clientId}:footer:NormalBox">
<table cellpadding="0" cellspacing="0"
style="border-collapse:collapse; table-layout:fixed">
<jsp:scriptlet>
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-27
14:15:05 UTC (rev 1893)
+++
trunk/sandbox/ui/scrollable-grid/src/test/java/org/richfaces/renderkit/html/ScrollableGridRendererTest.java 2007-07-27
14:29:16 UTC (rev 1894)
@@ -153,7 +153,7 @@
String elemClassAttr = elem.getAttributeValue("class");
res = false;
- if(elemClassAttr.contains("ClientUI_InlineBox")){
+ if(elemClassAttr.contains("dr-sgrid-inlinebox")){
res = true;
}else if(elemClassAttr.contains("dr-sgrid-hsplit")){
res = true;
@@ -205,9 +205,9 @@
assertNotNull(elemClassAttr);
if(element.getId().contains("FrozenBox")){
- assertTrue(elemClassAttr.contains("ClientUI_TmplBox dr-sgrid-fb"));
+ assertTrue(elemClassAttr.contains("dr-sgrid-tmplbox dr-sgrid-fb"));
}else if(element.getId().contains("NormalBox")){
- assertTrue(elemClassAttr.contains("ClientUI_TmplBox dr-sgrid-nb"));
+ assertTrue(elemClassAttr.contains("dr-sgrid-tmplbox dr-sgrid-nb"));
}