Author: abelevich
Date: 2008-03-04 08:37:20 -0500 (Tue, 04 Mar 2008)
New Revision: 6527
Modified:
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js
Log:
fix IE bug if items.length == 0
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
13:21:47 UTC (rev 6526)
+++
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js 2008-03-04
13:37:20 UTC (rev 6527)
@@ -92,13 +92,13 @@
}
}
}
- if (this.iframe) {
- this.iframe.show();
- }
-
+
var items = this.getItems();
if (items.length != 0) {
this.listParent.show();
+ if (this.iframe) {
+ this.iframe.show();
+ }
}
this.listParent.fire("rich:onlistcall", {});
@@ -153,28 +153,28 @@
rowsAmount = this.getItems().length;
currentItemsHeight = itemHeight * rowsAmount;
- }
- if (this.height && (parseInt(this.height) < currentItemsHeight)) {
- if (this.height < currentItemsHeight) {
- height = currentItemsHeight;
- }
- } else {
- if (rowsAmount < this.defaultRowsAmount) {
- height = currentItemsHeight;
+
+ if (this.height && (parseInt(this.height) < currentItemsHeight)) {
+ if (this.height < currentItemsHeight) {
+ height = currentItemsHeight;
+ }
} else {
- height = itemHeight * this.defaultRowsAmount;
+ if (rowsAmount < this.defaultRowsAmount) {
+ height = currentItemsHeight;
+ } else {
+ height = itemHeight * this.defaultRowsAmount;
+ }
}
+ if (Prototype.Browser.IE) {
+ height = parseInt(height) + this.LAYOUT_BORDER_V + this.LAYOUT_PADDING_V;
+ }
+ height = parseInt(height) + "px";
+ this.list.style.height = height;
+ if (this.iframe) {
+ this.iframe.style.height = height;
+ }
+ this.setWidth(this.width);
}
- if (Prototype.Browser.IE) {
- height = parseInt(height) + this.LAYOUT_BORDER_V + this.LAYOUT_PADDING_V;
- }
- height = parseInt(height) + "px";
- this.list.style.height = height;
- if (this.iframe) {
- this.iframe.style.height = height;
- }
-
- this.setWidth(this.width);
},
/*setWidth : function(width) {
Show replies by date