Author: konstantin.mishin
Date: 2009-05-29 12:34:44 -0400 (Fri, 29 May 2009)
New Revision: 14411
Modified:
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/component/UITree.java
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
branches/community/3.3.X/ui/tree/src/main/resources/org/richfaces/renderkit/html/css/tree.xcss
branches/community/3.3.X/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js
branches/community/3.3.X/ui/tree/src/main/templates/htmlTree.jspx
branches/community/3.3.X/ui/tree/src/main/templates/htmlTreeNode.jspx
branches/community/3.3.X/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java
branches/community/3.3.X/ui/treeModel/src/test/java/org/richfaces/component/TreeModelComponentTest.java
Log:
RF-7224
Modified:
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/component/UITree.java
===================================================================
---
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/component/UITree.java 2009-05-29
16:30:33 UTC (rev 14410)
+++
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/component/UITree.java 2009-05-29
16:34:44 UTC (rev 14411)
@@ -122,9 +122,9 @@
public static final String SELECTION_INPUT_ATTRIBUTE = "_selectionInput";
- public final static String DEFAULT_SELECTED_CSS_CLASS = "dr-tree-i-sel";
+ public final static String DEFAULT_SELECTED_CSS_CLASS =
"rich-tree-node-selected";
- public final static String DEFAULT_HIGHLIGHTED_CSS_CLASS = "dr-tree-i-hl";
+ public final static String DEFAULT_HIGHLIGHTED_CSS_CLASS =
"rich-tree-node-highlighted";
private UITreeNode defaultFacet;
Modified:
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java
===================================================================
---
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java 2009-05-29
16:30:33 UTC (rev 14410)
+++
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java 2009-05-29
16:34:44 UTC (rev 14411)
@@ -148,16 +148,16 @@
if (tree.isShowConnectingLines()) {
if (Boolean.TRUE.equals(treeNode.getAttributes().get("isLastElement"))) {
- variables.setVariable("line", "dr-tree-h-ic-line-last");
+ variables.setVariable("line", "rich-tree-h-ic-line-last");
} else {
- variables.setVariable("line", "dr-tree-h-ic-line-node");
+ variables.setVariable("line", "rich-tree-h-ic-line-node");
}
if (tree.isExpanded() && !tree.isLeaf()) {
variables
- .setVariable("lineFirst", "dr-tree-h-ic-line-exp");
+ .setVariable("lineFirst", "rich-tree-h-ic-line-exp");
} else {
variables.setVariable("lineFirst",
- "dr-tree-h-ic-line-clp");
+ "rich-tree-h-ic-line-clp");
}
}
}
@@ -171,7 +171,6 @@
String resource;
String cssClass;
resource = UITree.DEFAULT_HIGHLIGHTED_CSS_CLASS;
- resource += " rich-tree-node-highlighted";
cssClass = tree.getHighlightedClass();
if (cssClass != null) {
resource += " " + cssClass;
@@ -183,7 +182,6 @@
variables.setVariable("highlightedClass", resource);
resource = UITree.DEFAULT_SELECTED_CSS_CLASS;
- resource += " rich-tree-node-selected";
cssClass = tree.getSelectedClass();
if (cssClass != null) {
resource += " " + cssClass;
Modified:
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
===================================================================
---
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2009-05-29
16:30:33 UTC (rev 14410)
+++
branches/community/3.3.X/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2009-05-29
16:34:44 UTC (rev 14411)
@@ -190,8 +190,8 @@
String styleClasses = "";
if (context.getRowKey() != null) {
- styleClasses = "dr-tree-layout-on dr-tree-h-ic-div rich-tree-node-children
rich-tree-node-cildren";
- if (!context.isLast() && showLines) styleClasses += "
dr-tree-h-ic-line";
+ styleClasses = "rich-tree-node-children";
+ if (!context.isLast() && showLines) styleClasses += "
rich-tree-h-ic-line";
}
if (styleClasses!="") getUtils().writeAttribute(writer, "class",
styleClasses);
}
@@ -248,7 +248,7 @@
ResponseWriter writer = context.getResponseWriter();
if (isLastElement && this.navigator.showLines) {
writer.startElement("p", tree);
- writer.writeAttribute("class", "dr-tree-last-node-marker",
null);
+ writer.writeAttribute("class", "rich-tree-last-node-marker",
null);
writer.endElement("p");
}
@@ -573,7 +573,7 @@
public String writeScriptElement(FacesContext context, UITree tree, String code) throws
IOException {
/*
- <div id="#{clientId}:script" class="dr-tree-h-script">
+ <div id="#{clientId}:script" class="rich-tree-h">
<script type="text/javascript">
</script>
</div>
@@ -583,7 +583,7 @@
ResponseWriter responseWriter = context.getResponseWriter();
responseWriter.startElement(HTML.DIV_ELEM, tree);
responseWriter.writeAttribute(HTML.id_ATTRIBUTE, scriptId, null);
- responseWriter.writeAttribute(HTML.class_ATTRIBUTE, "dr-tree-h-script",
null);
+ responseWriter.writeAttribute(HTML.class_ATTRIBUTE, "rich-tree-h", null);
responseWriter.startElement(HTML.SCRIPT_ELEM, tree);
responseWriter.writeAttribute(HTML.TYPE_ATTR, "text/javascript", null);
Modified:
branches/community/3.3.X/ui/tree/src/main/resources/org/richfaces/renderkit/html/css/tree.xcss
===================================================================
---
branches/community/3.3.X/ui/tree/src/main/resources/org/richfaces/renderkit/html/css/tree.xcss 2009-05-29
16:30:33 UTC (rev 14410)
+++
branches/community/3.3.X/ui/tree/src/main/resources/org/richfaces/renderkit/html/css/tree.xcss 2009-05-29
16:34:44 UTC (rev 14411)
@@ -4,67 +4,51 @@
xmlns="http://www.w3.org/1999/xhtml" >
<f:verbatim><![CDATA[
-.dr-tree {
-}
-
-.dr-tree-full-width {
+.rich-tree-node {
width: 100%;
}
-.dr-tree-layout-on {
+.rich-tree-node-children {
zoom: 1;
+ margin-left : 8px;
+ padding-left : 10px;
}
-.dr-tree-h-input, .dr-tree-h-script {
+.rich-tree-h {
display: none;
}
-.dr-tree-h-ic-div {
- margin-left : 8px;
- padding-left : 10px;
-}
-
-.dr-tree-h-ic {
+.rich-tree-node-icon, .rich-tree-node-icon-leaf, .rich-tree-node-handleicon {
width: 16px;
padding: 1px;
}
-.dr-tree-h-ic-img{
+.rich-tree-h-ic-img, .rich-tree-node-handleicon-collapsed,
.rich-tree-node-handleicon-expanded {
width : 16px;
height : 16px;
-}
-
-.dr-tree-h-ic-img-md{
margin: 0px;
display: block;
-}
-
-.dr-tree-h-ic-facets{
overflow: hidden;
}
-.dr-tree-h-ic-line {
+.rich-tree-h-ic-line {
background-position: left;
background-repeat: repeat-y;
}
-.dr-tree-h-ic-line-node, .dr-tree-h-ic-line-last, .dr-tree-h-ic-line-exp,
.dr-tree-h-ic-line-clp{
+.rich-tree-h-ic-line-node, .rich-tree-h-ic-line-last, .rich-tree-h-ic-line-exp,
.rich-tree-h-ic-line-clp{
background-position: center;
background-repeat: no-repeat;
}
-.dr-tree-h-text {
+.rich-tree-node-text {
width: 100%;
cursor: default;
padding : 1px 4px 1px 4px;
white-space: nowrap;
}
-.dr-tree-h-text-span {
- white-space: nowrap;
-}
-
-.dr-tree-i-sel {
+.rich-tree-node-selected {
padding : 0px 3px 0px 3px;
border : 1px solid;
background-color : transparent;
@@ -72,15 +56,15 @@
background-repeat: repeat-x;
}
-.dr-tree-i-hl {
+.rich-tree-node-highlighted {
text-decoration: underline;
}
-.dr-tree-pointer-cursor {
+.rich-tree-node-handleicon-collapsed, .rich-tree-node-handleicon-expanded {
cursor: pointer;
}
-.dr-tree-last-node-marker {
+.rich-tree-last-node-marker {
display: none;
}
@@ -91,60 +75,60 @@
]]>
</f:verbatim>
-<u:selector name=".dr-tree">
+<u:selector name=".rich-tree">
<u:style name="background-color" skin="overAllBackground" />
</u:selector>
-<u:selector name=".dr-tree-h-text">
+<u:selector name=".rich-tree-node-text">
<u:style name="color" skin="panelTextColor" />
<u:style name="font-size" skin="preferableDataSizeFont" />
<u:style name="font-family" skin="preferableDataFamilyFont"
/>
</u:selector>
-<u:selector name=".dr-tree-i-hl">
+<u:selector name=".rich-tree-node-highlighted">
<u:style name="color" skin="selectControlColor" />
</u:selector>
-<u:selector name=".dr-tree-i-sel">
+<u:selector name=".rich-tree-node-selected">
<u:style name="border-color" skin="headerBackgroundColor"
/>
<u:style name="color" skin="panelTextColor" />
</u:selector>
-<u:selector name=".dr-tree-h-ic-line">
+<u:selector name=".rich-tree-h-ic-line">
<u:style name="background-image">
<f:resource
f:key="org.richfaces.renderkit.html.images.TreeLineImage"/>
</u:style>
</u:selector>
-<u:selector name=".dr-tree-h-ic-line-node">
+<u:selector name=".rich-tree-h-ic-line-node">
<u:style name="background-image">
<f:resource
f:key="org.richfaces.renderkit.html.images.TreeLineNodeImage"/>
</u:style>
</u:selector>
-<u:selector name=".dr-tree-h-ic-line-last">
+<u:selector name=".rich-tree-h-ic-line-last">
<u:style name="background-image">
<f:resource
f:key="org.richfaces.renderkit.html.images.TreeLineLastImage"/>
</u:style>
</u:selector>
-<u:selector name="p.dr-tree-last-node-marker+* .dr-tree-h-ic-line-node">
+<u:selector name="p.rich-tree-last-node-marker+*
.rich-tree-h-ic-line-node">
<u:style name="background-image">
<f:resource
f:key="org.richfaces.renderkit.html.images.TreeLineLastImage"/>
</u:style>
</u:selector>
-<u:selector name="p.dr-tree-last-node-marker+*+div.dr-tree-h-ic-line">
+<u:selector
name="p.rich-tree-last-node-marker+*+div.rich-tree-h-ic-line">
<u:style name="background-image" value="none" />
</u:selector>
-<u:selector name=".dr-tree-h-ic-line-exp">
+<u:selector name=".rich-tree-h-ic-line-exp">
<u:style name="background-image">
<f:resource
f:key="org.richfaces.renderkit.html.images.TreeLineExpandedImage"/>
</u:style>
</u:selector>
-<u:selector name=".dr-tree-h-ic-line-clp">
+<u:selector name=".rich-tree-h-ic-line-clp">
<u:style name="background-image">
<f:resource
f:key="org.richfaces.renderkit.html.images.TreeLineCollapsedImage"/>
</u:style>
</u:selector>
-<u:selector name=".dr-tree-i-sel .dr-tree-i-hl">
+<u:selector name=".rich-tree-node-selected .rich-tree-node-highlighted">
<u:style name="color" skin="selectControlColor" />
</u:selector>
Modified:
branches/community/3.3.X/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js
===================================================================
---
branches/community/3.3.X/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js 2009-05-29
16:30:33 UTC (rev 14410)
+++
branches/community/3.3.X/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js 2009-05-29
16:34:44 UTC (rev 14411)
@@ -58,9 +58,9 @@
Tree.ID_ICON = "icon";
Tree.ID_TEXT = "text";
Tree.ID_MAIN_ROW = "mainRow";
-Tree.CLASS_ITEM_SELECTED = "dr-tree-i-sel";
-Tree.CLASS_ITEM_EXPANDED = "dr-tree-h-ic-line-exp";
-Tree.CLASS_ITEM_COLLAPSED = "dr-tree-h-ic-line-clp";
+Tree.CLASS_ITEM_SELECTED = "rich-tree-node-selected";
+Tree.CLASS_ITEM_EXPANDED = "rich-tree-h-ic-line-exp";
+Tree.CLASS_ITEM_COLLAPSED = "rich-tree-h-ic-line-clp";
Tree.CLASS_AJAX_SELECTED_LISTENER_FLAG = "ajax_selected_listener_flag";
Tree.addMethods({
Modified: branches/community/3.3.X/ui/tree/src/main/templates/htmlTree.jspx
===================================================================
--- branches/community/3.3.X/ui/tree/src/main/templates/htmlTree.jspx 2009-05-29 16:30:33
UTC (rev 14410)
+++ branches/community/3.3.X/ui/tree/src/main/templates/htmlTree.jspx 2009-05-29 16:34:44
UTC (rev 14411)
@@ -35,7 +35,7 @@
</jsp:scriptlet>
<div id="#{clientId}"
- style="#{component.attributes['style']}" class="dr-tree
rich-tree #{component.attributes['styleClass']}"
x:passThruWithExclusions="id,style,class,styleClass,rows">
+ style="#{component.attributes['style']}" class="rich-tree
#{component.attributes['styleClass']}"
x:passThruWithExclusions="id,style,class,styleClass,rows">
<f:call name="encodeAttributeParameters" />
Modified: branches/community/3.3.X/ui/tree/src/main/templates/htmlTreeNode.jspx
===================================================================
--- branches/community/3.3.X/ui/tree/src/main/templates/htmlTreeNode.jspx 2009-05-29
16:30:33 UTC (rev 14410)
+++ branches/community/3.3.X/ui/tree/src/main/templates/htmlTreeNode.jspx 2009-05-29
16:34:44 UTC (rev 14411)
@@ -33,13 +33,13 @@
<c:object var="leaf" type="boolean"
value="#{component.UITree.leaf}" />
- <table border="0" cellpadding="0" cellspacing="0"
id="#{clientId}" class="dr-tree-full-width rich-tree-node">
+ <table border="0" cellpadding="0" cellspacing="0"
id="#{clientId}" class="rich-tree-node">
<tbody>
<tr id="#{clientId}:mainRow"
onclick="#{component.attributes['onclick']} #{!leaf ?
this:getToggleScript(context, component, 'mainRow') : ''}"
x:passThruWithExclusions="id,onclick">
<f:call name="encodeAttributeParameters" />
- <td class="dr-tree-h-ic rich-tree-node-handleicon #{line}"
id="#{clientId}:handles">
+ <td class="rich-tree-node-handleicon #{line}"
id="#{clientId}:handles">
<jsp:scriptlet>
<![CDATA[
if (Boolean.TRUE.equals(component.getAttributes().get("isAjaxUpdateRoot"))
&& component.getUITree().isShowConnectingLines()) {
@@ -58,7 +58,7 @@
if (leaf) {
]]>
</jsp:scriptlet>
- <img id="#{clientId}:handle:img" src="#{spacer}"
alt="" class="dr-tree-h-ic-img-md dr-tree-h-ic-img" />
+ <img id="#{clientId}:handle:img" src="#{spacer}"
alt="" class="rich-tree-h-ic-img" />
<jsp:scriptlet>
<![CDATA[
} else {
@@ -74,7 +74,7 @@
]]>
</jsp:scriptlet>
<span id="#{clientId}:handle:img:collapsed"
- class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img
dr-tree-h-ic-facets rich-tree-node-handleicon-collapsed"
+ class="rich-tree-node-handleicon-collapsed"
style="#{this:getHandleCollapsedDisplayStyle(context,
component)}">
<jsp:scriptlet>
@@ -90,7 +90,7 @@
</jsp:scriptlet>
<img id="#{clientId}:handle:img:collapsed"
- src="#{collapsed}" class="dr-tree-pointer-cursor
dr-tree-h-ic-img-md dr-tree-h-ic-img rich-tree-node-handleicon-collapsed"
+ src="#{collapsed}"
class="rich-tree-node-handleicon-collapsed"
style="#{this:getHandleCollapsedDisplayStyle(context,
component)};border:0" alt="" />
<jsp:scriptlet>
@@ -108,7 +108,7 @@
</jsp:scriptlet>
<span id="#{clientId}:handle:img:expanded"
style="#{this:getHandleExpandedDisplayStyle(context, component)}"
- class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img
dr-tree-h-ic-facets rich-tree-node-handleicon-expanded">
+ class="rich-tree-node-handleicon-expanded">
<jsp:scriptlet>
<![CDATA[
@@ -123,7 +123,7 @@
</jsp:scriptlet>
<img id="#{clientId}:handle:img:expanded"
src="#{expanded}"
style="#{this:getHandleExpandedDisplayStyle(context,
component)};border:0"
- class="dr-tree-pointer-cursor dr-tree-h-ic-img-md dr-tree-h-ic-img
rich-tree-node-handleicon-expanded" alt="" />
+ class="rich-tree-node-handleicon-expanded" alt="" />
<jsp:scriptlet>
<![CDATA[
}
@@ -141,7 +141,7 @@
if
(org.richfaces.component.UITree.SWITCH_CLIENT.equals(component.getUITree().getSwitchType()))
{
]]>
</jsp:scriptlet>
- <input class="dr-tree-h-input" type="hidden"
id="#{clientId}NodeExpanded" name="#{clientId}NodeExpanded"
value="#{this:getExpandedValue(context,component)}" />
+ <input class="rich-tree-h" type="hidden"
id="#{clientId}NodeExpanded" name="#{clientId}NodeExpanded"
value="#{this:getExpandedValue(context,component)}" />
<jsp:scriptlet>
<![CDATA[
}
@@ -173,7 +173,7 @@
rich:onselected="#{component.attributes['onselected']}"
rich:onexpand="#{component.attributes['onexpand']}"
rich:oncollapse="#{component.attributes['oncollapse']}"
- class="dr-tree-h-ic #{iconClass} #{lineFirst}"
id="#{clientId}:icon">
+ class="#{iconClass} #{lineFirst}" id="#{clientId}:icon">
<jsp:scriptlet>
<![CDATA[
if (leaf) {
@@ -182,7 +182,7 @@
]]>
</jsp:scriptlet>
- <span class="dr-tree-h-ic-img-md dr-tree-h-ic-img
dr-tree-h-ic-facets">
+ <span class="rich-tree-h-ic-img">
<jsp:scriptlet>
<![CDATA[
renderChild(context, leafFacet);
@@ -194,7 +194,7 @@
} else {
]]>
</jsp:scriptlet>
- <img src="#{leafIcon}" alt=""
class="dr-tree-h-ic-img-md dr-tree-h-ic-img" />
+ <img src="#{leafIcon}" alt=""
class="rich-tree-h-ic-img" />
<jsp:scriptlet>
<![CDATA[
}
@@ -207,7 +207,7 @@
if (iconFacet != null && iconFacet.isRendered()) {
]]>
</jsp:scriptlet>
- <span class="dr-tree-h-ic-img-md dr-tree-h-ic-img
dr-tree-h-ic-facets">
+ <span class="rich-tree-h-ic-img">
<jsp:scriptlet>
<![CDATA[
renderChild(context, iconFacet);
@@ -219,7 +219,7 @@
} else {
]]>
</jsp:scriptlet>
- <img src="#{folderIcon}" alt=""
class="dr-tree-h-ic-img-md dr-tree-h-ic-img" />
+ <img src="#{folderIcon}" alt=""
class="rich-tree-h-ic-img" />
<jsp:scriptlet>
<![CDATA[
}
@@ -227,7 +227,7 @@
]]>
</jsp:scriptlet>
</td>
- <td class="dr-tree-h-text rich-tree-node-text
#{component.attributes['nodeClass']}"
+ <td class="rich-tree-node-text
#{component.attributes['nodeClass']}"
rich:selectedclass="#{selectedClass}"
rich:highlightedclass="#{highlightedClass}"
id="#{clientId}:text">
<vcp:body />
Modified:
branches/community/3.3.X/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java
===================================================================
---
branches/community/3.3.X/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java 2009-05-29
16:30:33 UTC (rev 14410)
+++
branches/community/3.3.X/ui/tree/src/test/java/org/richfaces/component/TreeComponentTest.java 2009-05-29
16:34:44 UTC (rev 14411)
@@ -254,10 +254,10 @@
private static Set styleClasses = new HashSet();
static {
- styleClasses.add("dr-tree-h-ic dr-tree-h-ic-line-last");
- styleClasses.add("dr-tree-h-ic dr-tree-h-ic-line-clp");
- styleClasses.add("dr-tree-h-text rich-tree-node");
- styleClasses.add("dr-tree-pointer-cursor");
+ styleClasses.add("rich-tree-node-icon-leaf rich-tree-h-ic-line-last");
+ styleClasses.add("rich-tree-h-ic rich-tree-h-ic-line-clp");
+ styleClasses.add("rich-tree-node");
+ styleClasses.add("rich-tree-node-handleicon-collapsed");
styleClasses.add("");
}
@@ -267,7 +267,7 @@
HtmlElement htmlTree = renderedView.getHtmlElementById(tree
.getClientId(facesContext));
- htmlTree.getAttributeValue("class").equals("dr-tree rich-tree ");
+ htmlTree.getAttributeValue("class").equals("rich-tree ");
// System.out.println(htmlTree.getHtmlElementsByAttribute("class",
// "highlightedclass", "selectedclass"));
Modified:
branches/community/3.3.X/ui/treeModel/src/test/java/org/richfaces/component/TreeModelComponentTest.java
===================================================================
---
branches/community/3.3.X/ui/treeModel/src/test/java/org/richfaces/component/TreeModelComponentTest.java 2009-05-29
16:30:33 UTC (rev 14410)
+++
branches/community/3.3.X/ui/treeModel/src/test/java/org/richfaces/component/TreeModelComponentTest.java 2009-05-29
16:34:44 UTC (rev 14411)
@@ -196,9 +196,9 @@
//System.out.println(element);
if (nextSibling == null) {
- assertTrue(handleCell.getAttributeValue("class").contains("dr-tree-h-ic-line-last"));
+ assertTrue(handleCell.getAttributeValue("class").contains("rich-tree-h-ic-line-last"));
} else {
- assertTrue(handleCell.getAttributeValue("class").contains("dr-tree-h-ic-line-node"));
+ assertTrue(handleCell.getAttributeValue("class").contains("rich-tree-h-ic-line-node"));
}
HtmlElement handleElement = (HtmlElement) handleCell.getFirstChild().getFirstChild();