[richfaces-svn-commits] JBoss Rich Faces SVN: r11724 - in trunk/ui/combobox/src/main: templates and 1 other directory.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Thu Dec 11 13:57:53 EST 2008
Author: abelevich
Date: 2008-12-11 13:57:52 -0500 (Thu, 11 Dec 2008)
New Revision: 11724
Modified:
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/comboboxstyles.js
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js
trunk/ui/combobox/src/main/templates/combobox.jspx
Log:
https://jira.jboss.org/jira/browse/RF-5360
Modified: trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
--- trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-12-11 17:00:16 UTC (rev 11723)
+++ trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-12-11 18:57:52 UTC (rev 11724)
@@ -17,9 +17,10 @@
this.tempItem;
this.BUTTON_WIDTH = 17; //px
- this.classes = Richfaces.mergeStyles(userStyles,commonStyles);
+ this.classes = Richfaces.mergeStyles(userStyles,commonStyles.getCommonStyles());
+
this.button = document.getElementById(buttonId);
this.buttonBG = document.getElementById(buttonBGId);
Modified: trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/comboboxstyles.js
===================================================================
--- trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/comboboxstyles.js 2008-12-11 17:00:16 UTC (rev 11723)
+++ trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/comboboxstyles.js 2008-12-11 18:57:52 UTC (rev 11724)
@@ -1,8 +1,12 @@
if (!window.Richfaces) window.Richfaces = {};
-if (!Richfaces.ComboBox) Richfaces.ComboBox = {};
+Richfaces.ComboBoxStyles = Class.create();
-Richfaces.ComboBox.classes = {
- button : { classes : {
+Richfaces.ComboBoxStyles.prototype = {
+
+ initialize : function () {
+ this.commonStyles = {
+
+ button : { classes : {
normal : "rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive",
active : "rich-combobox-font rich-combobox-button-icon rich-combobox-button",
disabled : "rich-combobox-font-disabled rich-combobox-button-icon-disabled rich-combobox-button-disabled",
@@ -13,6 +17,13 @@
active: "",
disabled: ""}
},
+
+
+
+
+
+
+
buttonbg : {
classes : {
@@ -26,6 +37,7 @@
active: "",
disabled: ""}
},
+
field : {classes: {
normal : "rich-combobox-font-inactive rich-combobox-input-inactive",
@@ -45,6 +57,12 @@
classes :{
active : "rich-combobox-list-cord rich-combobox-list-scroll rich-combobox-list-decoration rich-combobox-list-position"},
style : {active: ""
+
+
+
+
+
+
}
},
@@ -52,4 +70,20 @@
selected : "rich-combobox-item rich-combobox-item-selected"
}
}
-}
\ No newline at end of file
+
+
+
+
+
+ }
+ },
+
+ getCommonStyles : function() {
+ return this.commonStyles;
+ }
+
+
+};
+
+
+
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-12-11 17:00:16 UTC (rev 11723)
+++ trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combolist.js 2008-12-11 18:57:52 UTC (rev 11724)
@@ -98,7 +98,7 @@
var items = this.getItems();
if (items.length != 0) {
if (this.iframe) {
- this.iframe.style.display="";
+ Element.hide(this.iframe);
}
this.listParent.style.display = "";
if (this.selectFirstOnUpdate) {
@@ -146,14 +146,17 @@
this.outjectListFromBody(this.listParentContainer, this.listParent);
this.resetState();
if (this.iframe) {
- this.iframe.style.display= "none";
+ Element.hide(this.iframe);
+ //this.iframe.style.display= "none";
}
var component = this.listParent.parentNode;
component.style.position = "static";
component.style.zIndex = 0;
- this.listParent.style.display = "none";
+ //this.listParent.style.display = "none";
+ Element.hide(this.listParent);
+
},
visible : function() {
@@ -221,7 +224,12 @@
var docHeight = Richfaces.getDocumentHeight();
var comBottom = fieldTop + fieldHeight;
- var listHeight = parseInt(this.list.style.height) + Richfaces.getBorderWidth(this.list.parentNode, "tb");
+
+ var listHeight = parseInt(this.list.style.height);
+ if (this.list.parentNode) {
+ listHeight += Richfaces.getBorderWidth(this.list.parentNode, "tb");
+ }
+
var topPosition = comBottom;
var showPoint = fieldHeight;
Modified: trunk/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/ui/combobox/src/main/templates/combobox.jspx 2008-12-11 17:00:16 UTC (rev 11723)
+++ trunk/ui/combobox/src/main/templates/combobox.jspx 2008-12-11 18:57:52 UTC (rev 11724)
@@ -341,7 +341,7 @@
"#{clientId}comboboxButton",
"#{clientId}comboBoxButtonBG",
"#{clientId}shadow",
- Richfaces.ComboBox.classes,
+ new Richfaces.ComboBoxStyles(),
comboboxUserStyles,
"#{listWidth}", "#{listHeight}",
#{this:getItemsTextAsJSArray(context, component,items)},
More information about the richfaces-svn-commits
mailing list