Author: pyaschenko
Date: 2009-05-26 09:39:31 -0400 (Tue, 26 May 2009)
New Revision: 14330
Modified:
branches/community/3.3.X/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
branches/community/3.3.X/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/css/suggestionbox.xcss
branches/community/3.3.X/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
branches/community/3.3.X/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/popup.jspx
branches/community/3.3.X/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/table.jspx
branches/community/3.3.X/ui/suggestionbox/src/test/java/org/richfaces/component/SuggestionBoxComponentTest.java
Log:
https://jira.jboss.org/jira/browse/RF-7223
Modified:
branches/community/3.3.X/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
===================================================================
---
branches/community/3.3.X/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2009-05-26
13:35:23 UTC (rev 14329)
+++
branches/community/3.3.X/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2009-05-26
13:39:31 UTC (rev 14330)
@@ -245,7 +245,7 @@
getUtils().encodeId(context, component);
StringBuffer clazz = new StringBuffer(
- "dr-sb-common-container rich-sb-common-container ");
+ "rich-sb-common-container ");
clazz.append(suggestionBox.getPopupClass() + " ").
append(suggestionBox.getStyleClass());
writer.writeAttribute("class", clazz, "popupClass");
@@ -875,9 +875,9 @@
ResponseWriter writer = context.getResponseWriter();
UISuggestionBox suggestionBox = (UISuggestionBox)component;
final String startHtml =
- "<tr id=\"" + suggestionBox.getClientId(context) +
"NothingLabel\" class=\"dr-sb-int rich-sb-int " +
suggestionBox.getRowClasses() +
+ "<tr id=\"" + suggestionBox.getClientId(context) +
"NothingLabel\" class=\"rich-sb-int " + suggestionBox.getRowClasses()
+
"\" style=\"display: none;\">" +
- "<td nowrap=\"nowrap\" class=\"dr-sb-cell-padding
rich-sb-cell-padding\" style=\"" + this.cellPadding(context, component) +
"\">";
+ "<td nowrap=\"nowrap\" class=\"rich-sb-cell-padding\"
style=\"" + this.cellPadding(context, component) + "\">";
final String endHtml = "</td></tr>";
UIComponent nothingLabelFacet = component.getFacet("nothingLabel");
@@ -915,6 +915,6 @@
if (null == rowClass)
rowClass = "";
- return "dr-sb-int rich-sb-int " + entryClass + " " +
rowClass;
+ return "rich-sb-int " + entryClass + " " + rowClass;
}
}
Modified:
branches/community/3.3.X/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/css/suggestionbox.xcss
===================================================================
---
branches/community/3.3.X/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/css/suggestionbox.xcss 2009-05-26
13:35:23 UTC (rev 14329)
+++
branches/community/3.3.X/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/css/suggestionbox.xcss 2009-05-26
13:39:31 UTC (rev 14330)
@@ -6,39 +6,39 @@
<f:verbatim>
-.dr-sb-common-container {
+.rich-sb-common-container {
position: absolute;
text-align: left;
background-color: inherit;
}
-.dr-sb-ext-decor-1 {
+.rich-sb-ext-decor-1 {
position: absolute;
height: 100%;
width: 100%;
z-index: 2;
}
-.dr-sb-ext-decor-2 {
+.rich-sb-ext-decor-2 {
border: 1px solid;
height: 100%;
width: 100%;
}
-.dr-sb-ext-decor-3 {
+.rich-sb-ext-decor-3 {
height: 100%;
width: 100%;
}
-.dr-sb-overflow {
+.rich-sb-overflow {
overflow : auto;
}
-.dr-sb-int-decor-table {
+.rich-sb-int-decor-table {
width: 100%;
}
-.dr-sb-shadow {
+.rich-sb-shadow {
position: absolute;
height: 100%;
width: 100%;
@@ -46,40 +46,40 @@
z-index: 1;
}
-.dr-sb-int-sel {
+.rich-sb-int-sel {
cursor: default;
background-position: left top;
background-repeat: repeat-x;
}
-.dr-sb-cell-padding {
+.rich-sb-cell-padding {
padding: 1px 3px 1px 5px;
}
-.dr-sb-int {
+.rich-sb-int {
cursor : pointer;
}
</f:verbatim>
-<u:selector name=".dr-sb-ext-decor-2">
+<u:selector name=".rich-sb-ext-decor-2">
<u:style name="border-color" skin="panelBorderColor" />
<u:style name="background-color"
skin="additionalBackgroundColor" />
</u:selector>
-<u:selector name=".dr-sb-shadow">
+<u:selector name=".rich-sb-shadow">
<u:style name="background-color" skin="shadowBackgroundColor"
/>
<u:style name="border-color" skin="shadowBackgroundColor"
/>
<u:style name="opacity" skin="shadowOpacity" />
</u:selector>
-<u:selector name=".dr-sb-int">
+<u:selector name=".rich-sb-int">
<u:style name="font-size" skin="generalSizeFont" />
<u:style name="font-family" skin="generalFamilyFont" />
<u:style name="color" skin="generalTextColor" />
</u:selector>
-<u:selector name=".dr-sb-int-sel">
+<u:selector name=".rich-sb-int-sel">
<u:style name="background-color" skin="headerBackgroundColor"
/>
<u:style name="font-size" skin="generalSizeFont" />
<u:style name="font-family" skin="generalFamilyFont" />
Modified:
branches/community/3.3.X/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
---
branches/community/3.3.X/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2009-05-26
13:35:23 UTC (rev 14329)
+++
branches/community/3.3.X/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2009-05-26
13:39:31 UTC (rev 14330)
@@ -71,7 +71,7 @@
this.options.param = this.options.param || this.element.name;
this.options.selectedClasses = (this.options.selectedClass
- || "dr-sb-int-sel rich-sb-int-sel").split(' ');
+ || "rich-sb-int-sel").split(' ');
this.options.selectValueClass = this.options.selectValueClass
|| " ";
this.options.tokens = $A(options.tokens) || [];
@@ -153,9 +153,9 @@
this.onScrollListener = this.onScroll.bindAsEventListener(this);
// if (options.popupClass)
-// Element.addClassName(this.update.select(".dr-sb-ext-decor-3")[0],
options.popupClass);
+// Element.addClassName(this.update.select(".rich-sb-ext-decor-3")[0],
options.popupClass);
if (options.popupClass) {
- var selected = Element.select(this.update,".dr-sb-ext-decor-3");
+ var selected = Element.select(this.update,".rich-sb-ext-decor-3");
Element.addClassName(selected[0], options.popupClass);
}
@@ -231,9 +231,9 @@
this.wasScroll = false;
this.wasBlur = false;
// if (!this.overflow)
-// this.overflow = this.update.select(".dr-sb-overflow")[0];
+// this.overflow = this.update.select(".rich-sb-overflow")[0];
if (!this.overflow) {
- var selected = Element.select(this.update,".dr-sb-overflow");
+ var selected = Element.select(this.update,".rich-sb-overflow");
this.overflow = selected[0];
}
Event.observe(this.overflow, "scroll", this.onScrollListener);
@@ -515,7 +515,7 @@
while (item && (item != scroll)) {
// Avoid bug in Safari. Details:
http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in...
if (RichFaces.SAFARI == RichFaces.navigatorType() && "TR" ==
item.tagName.toUpperCase()) {
- realOffset += item.select(".dr-sb-cell-padding")[0].offsetTop;
+ realOffset += item.select(".rich-sb-cell-padding")[0].offsetTop;
}
else
realOffset += item.offsetTop;
@@ -525,7 +525,7 @@
var entryOffsetHeight;
if (RichFaces.SAFARI == RichFaces.navigatorType()) {
- var tdElement = item.select(".dr-sb-cell-padding")[0];
+ var tdElement = item.select(".rich-sb-cell-padding")[0];
entryOffsetHeight = tdElement.offsetTop + tdElement.offsetHeight;
} else
entryOffsetHeight = entry.offsetHeight;
@@ -555,7 +555,7 @@
for (var i = 0; i < this.options.selectedClasses.length; i++)
Element.addClassName(entry, this.options.selectedClasses[i]);
- var cells = entry.select(".dr-sb-cell-padding");
+ var cells = entry.select(".rich-sb-cell-padding");
for (var i = 0; i < cells.length; i++) {
Element.addClassName(cells[i], this.options.selectValueClass);
}
@@ -584,7 +584,7 @@
if (this.prevIndex >= 0) {
var prevEntry = this.getEntry(this.prevIndex);
if (prevEntry) {
- var prevCells = prevEntry.select(".dr-sb-cell-padding");
+ var prevCells =
prevEntry.select(".rich-sb-cell-padding");
for (var i = 0; i < prevCells.length; i++) {
Element.removeClassName(prevCells[i], this.options.selectValueClass);
}
Modified:
branches/community/3.3.X/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/popup.jspx
===================================================================
---
branches/community/3.3.X/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/popup.jspx 2009-05-26
13:35:23 UTC (rev 14329)
+++
branches/community/3.3.X/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/popup.jspx 2009-05-26
13:39:31 UTC (rev 14330)
@@ -4,19 +4,19 @@
xmlns="http://www.w3.org/1999/xhtml"
component="org.richfaces.component.UISuggestionBox">
- <div class="dr-sb-ext-decor-1 rich-sb-ext-decor-1">
- <div class="dr-sb-ext-decor-2 rich-sb-ext-decor-2">
+ <div class="rich-sb-ext-decor-1">
+ <div class="rich-sb-ext-decor-2">
<f:attribute name="style">
<f:call name="bgcolor"/>
<f:call name="border"/>
</f:attribute>
<table border="0" cellpadding="0"
cellspacing="1"
- class="dr-sb-ext-decor-3 rich-sb-ext-decor-3">
+ class="rich-sb-ext-decor-3">
<tbody>
<tr>
<td>
- <div class="_suggestion_size_ dr-sb-overflow
rich-sb-overflow">
+ <div class="_suggestion_size_
rich-sb-overflow">
<f:attribute name="style">
<f:call name="overflowSize"/>
</f:attribute>
@@ -42,7 +42,7 @@
</div>
</div>
- <div class="dr-sb-shadow rich-sb-shadow">
+ <div class="rich-sb-shadow">
<f:attribute name="style">
<f:call name="opacityStyle"/>
<f:call name="shadowDepth"/>
Modified:
branches/community/3.3.X/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/table.jspx
===================================================================
---
branches/community/3.3.X/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/table.jspx 2009-05-26
13:35:23 UTC (rev 14329)
+++
branches/community/3.3.X/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/table.jspx 2009-05-26
13:39:31 UTC (rev 14330)
@@ -11,7 +11,7 @@
<f:parameter
value="styleClass,class,onclick,onselect,width,height,rows,frame,bgcolor,border,rules,cellpadding,cellspacing"/>
</f:call>
<f:attribute name="class">
- <f:verbatim value="dr-sb-int-decor-table rich-sb-int-decor-table
"/>
+ <f:verbatim value="rich-sb-int-decor-table "/>
<f:verbatim property="styleClass"/>
</f:attribute>
<colgroup>
@@ -60,7 +60,7 @@
property="fetchValue"/></td>
</f:if>
<u:insertChildren context="columns">
- <td nowrap="nowrap" class="dr-sb-cell-padding
rich-sb-cell-padding">
+ <td nowrap="nowrap"
class="rich-sb-cell-padding">
<f:attribute name="style"><f:call
name="cellPadding"/></f:attribute>
<u:insertChild/></td>
</u:insertChildren>
Modified:
branches/community/3.3.X/ui/suggestionbox/src/test/java/org/richfaces/component/SuggestionBoxComponentTest.java
===================================================================
---
branches/community/3.3.X/ui/suggestionbox/src/test/java/org/richfaces/component/SuggestionBoxComponentTest.java 2009-05-26
13:35:23 UTC (rev 14329)
+++
branches/community/3.3.X/ui/suggestionbox/src/test/java/org/richfaces/component/SuggestionBoxComponentTest.java 2009-05-26
13:39:31 UTC (rev 14330)
@@ -125,7 +125,6 @@
assertEquals("div", div.getNodeName());
String classAttr = div.getAttributeValue("class");
- assertTrue(classAttr.contains("dr-sb-common-container"));
assertTrue(classAttr.contains("rich-sb-common-container"));
HtmlElement table = page.getHtmlElementById(sb.getClientId(facesContext) +
":suggest");