Author: abelevich
Date: 2008-03-04 08:21:47 -0500 (Tue, 04 Mar 2008)
New Revision: 6526
Modified:
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js
Log:
RF-2377
Modified:
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js
===================================================================
---
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js 2008-03-04
11:32:29 UTC (rev 6525)
+++
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js 2008-03-04
13:21:47 UTC (rev 6526)
@@ -2,7 +2,7 @@
Richfaces.ComboBoxList = Class.create();
Richfaces.ComboBoxList.prototype = {
- initialize: function(listId, parentListId, selectFirstOnUpdate, classes, width, height,
itemsText, onlistcall, fieldId, shadowId,
+ initialize: function(listId, parentListId, selectFirstOnUpdate, classes, width, height,
itemsText, onlistcall, fieldId, shadowId,decorationId,
showDelay, hideDelay) {
this.list = $(listId);
@@ -95,7 +95,11 @@
if (this.iframe) {
this.iframe.show();
}
- this.listParent.show();
+
+ var items = this.getItems();
+ if (items.length != 0) {
+ this.listParent.show();
+ }
this.listParent.fire("rich:onlistcall", {});
},
@@ -129,8 +133,19 @@
if (item) {
//FIXME
this.listParent.style.visibility = "hidden";
+ //this.shadowElem.style.visibility = "hidden";
this.listParent.show();
+ if (this.shadowElem) {
+ if (!Richfaces.browser.isIE6) {
+ // shadow offset
+ this.shadowElem.style.width = (parseInt(this.width) + 7) + "px";
+ this.shadowElem.style.height = (parseInt(height) + 9)+ "px";
+ } else {
+ this.shadowElem.style.visibility = "hidden";
+ }
+ }
+
var itemHeight = item.offsetHeight;
this.listParent.hide();
@@ -159,16 +174,6 @@
this.iframe.style.height = height;
}
- if (this.shadowElem) {
- if (!Richfaces.browser.isIE6) {
- // shadow offset
- this.shadowElem.style.width = (parseInt(this.width) + 7) + "px";
- this.shadowElem.style.height = (parseInt(height) + 9)+ "px";
- } else {
- this.shadowElem.style.visibility = "hidden";
- }
- }
-
this.setWidth(this.width);
},
Show replies by date