[richfaces-svn-commits] JBoss Rich Faces SVN: r11906 - trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Fri Dec 19 07:01:09 EST 2008
Author: abelevich
Date: 2008-12-19 07:01:08 -0500 (Fri, 19 Dec 2008)
New Revision: 11906
Modified:
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
small fix
Modified: trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
--- trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-12-19 10:39:07 UTC (rev 11905)
+++ trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-12-19 12:01:08 UTC (rev 11906)
@@ -152,9 +152,13 @@
this.onScrollListener = this.onScroll.bindAsEventListener(this);
- if (options.popupClass)
- Element.addClassName(this.update.select(".dr-sb-ext-decor-3")[0], options.popupClass);
-
+// if (options.popupClass)
+// Element.addClassName(this.update.select(".dr-sb-ext-decor-3")[0], options.popupClass);
+ if (options.popupClass) {
+ var selected = Element.select(this.update,".dr-sb-ext-decor-3");
+ Element.addClassName(selected[0], options.popupClass);
+ }
+
this.onNothingLabelClick = this.hideNLabel.bindAsEventListener(this);
},
@@ -223,8 +227,12 @@
if (RichFaces.SAFARI == RichFaces.navigatorType()) {
this.wasScroll = false;
this.wasBlur = false;
- if (!this.overflow)
- this.overflow = this.update.select(".dr-sb-overflow")[0];
+// if (!this.overflow)
+// this.overflow = this.update.select(".dr-sb-overflow")[0];
+ if (!this.overflow) {
+ var selected = Element.select(this.update,".dr-sb-overflow");
+ this.overflow = selected[0];
+ }
Event.observe(this.overflow, "scroll", this.onScrollListener);
}
if (Element.getStyle(this.update, 'display')
@@ -515,8 +523,10 @@
countVisibleEntries: function() {
var entry = this.getEntry(this.index);
- var scroll = this.update.select("._suggestion_size_")[0]
- || this.update;
+// var scroll = this.update.select("._suggestion_size_")[0]
+// || this.update;
+ var selected = Element.select(this.update, "._suggestion_size_");
+ var scroll = selected[0] || this.update;
var entryPosition = this.calcEntryPosition(entry,scroll);
@@ -541,8 +551,10 @@
// Calc scroll position :
if (this.keyEvent) {
- var scroll = this.update.select("._suggestion_size_")[0]
- || this.update;
+// var scroll = this.update.select("._suggestion_size_")[0]
+// || this.update;
+ var selected = Element.select(this.update,"._suggestion_size_");
+ var scroll = selected[0] || this.update;
var entryPosition = this.calcEntryPosition(entry,scroll);
@@ -672,8 +684,10 @@
// TODO - get entry elements by tag name or class
var entryes = [];
if (this.options.entryClass) {
- entryes = this.update.select("."+this.options.entryClass)
- || [];
+ //entryes = this.update.select("."+this.options.entryClass)|| [];
+ var selected = Element.select(this.update, "."+this.options.entryClass);
+ entryes = selected || [];
+
} else if (this.update.firstChild
&& this.update.firstChild.firstChild
&& this.update.firstChild.firstChild.childNodes) {
@@ -693,8 +707,10 @@
}
this.stopIndicator();
- var scroll = this.update.select("._suggestion_size_")[0]
- || this.update;
+// var scroll = this.update.select("._suggestion_size_")[0]
+// || this.update;
+ var selected = Element.select(this.update,"._suggestion_size_");
+ var scroll = selected[0] || this.update;
scroll.scrollTop = -1;
scroll.scrollLeft = -1;
this.index = 0;
More information about the richfaces-svn-commits
mailing list