Author: sergeyhalipov
Date: 2007-07-31 10:01:34 -0400 (Tue, 31 Jul 2007)
New Revision: 1951
Modified:
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
Added user class rich-sb-int-sel.
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 2007-07-31
13:59:59 UTC (rev 1950)
+++
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2007-07-31
14:01:34 UTC (rev 1951)
@@ -29,8 +29,8 @@
this.options = options || {};
this.options.param = this.options.param || this.element.name;
- this.options.selectedClass = this.options.selectedClass
- || "dr-sb-int-sel";
+ this.options.selectedClasses = (this.options.selectedClass
+ || "dr-sb-int-sel rich-sb-int-sel").split(' ');
this.options.selectValueClass = this.options.selectValueClass
|| " ";
this.options.tokens = $A(options.tokens) || [];
@@ -444,7 +444,8 @@
+ this.prevIndex);
if (this.prevIndex != this.index) {
var entry = this.getEntry(this.index);
- Element.addClassName(entry, this.options.selectedClass);
+ for (var i = 0; i < this.options.selectedClasses.length; i++)
+ Element.addClassName(entry, this.options.selectedClasses[i]);
var cells =
document.getElementsByClassName("dr-sb-cell-padding" , entry);
for (var i = 0; i < cells.length; i++) {
@@ -477,7 +478,8 @@
for (var i = 0; i < prevCells.length; i++) {
Element.removeClassName(prevCells[i], this.options.selectValueClass);
}
- Element.removeClassName(prevEntry, this.options.selectedClass);
+ for (var i = 0; i < this.options.selectedClasses.length; i++)
+ Element.removeClassName(prevEntry,
this.options.selectedClasses[i]);
}
}
}
Show replies by date