Author: vmolotkov
Date: 2008-01-15 12:18:36 -0500 (Tue, 15 Jan 2008)
New Revision: 5392
Modified:
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
Log:
component's structure is changed
Modified:
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
---
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-01-15
16:56:09 UTC (rev 5391)
+++
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-01-15
17:18:36 UTC (rev 5392)
@@ -3,7 +3,7 @@
Richfaces.ComboBox.prototype = {
- initialize: function(combobox, listId, parentListId, fieldId, buttonId, buttonBGId,
classes,
+ initialize: function(combobox, listId, parentListId, fieldId, buttonId, buttonBGId,
iframeId, classes,
listWidth, listHeight, itemsText, directInputSuggestions, filterNewValue,
selectFirstOnUpdate, onlistcall, onselected, defaultMessage, isDisabled, value,
showDelay, hideDelay) {
@@ -22,7 +22,7 @@
fieldDem.height = this.field.offsetHeight;
listWidth = (!listWidth) ? this.getCurrentWidth() : listWidth;
- this.comboList = new Richfaces.ComboBoxList(listId, parentListId, selectFirstOnUpdate,
classes.COMBO_LIST, listWidth,
+ this.comboList = new Richfaces.ComboBoxList(listId, parentListId, iframeId,
selectFirstOnUpdate, classes.COMBO_LIST, listWidth,
listHeight, itemsText, onlistcall, fieldDem, showDelay, hideDelay);
this.defaultMessage = defaultMessage;
if (value) {
@@ -341,11 +341,12 @@
Richfaces.ComboBoxList = Class.create();
Richfaces.ComboBoxList.prototype = {
- initialize: function(listId, parentListId, selectFirstOnUpdate, classes, width, height,
itemsText, onlistcall, fieldXY,
+ initialize: function(listId, parentListId, iframeId, selectFirstOnUpdate, classes,
width, height, itemsText, onlistcall, fieldXY,
showDelay, hideDelay) {
this.list = $(listId);
this.listParent = $(parentListId);
+ this.iframe = $(iframeId);
this.itemsText = itemsText;
@@ -480,12 +481,12 @@
},
setWidth : function(width) {
- var iframe = this.listParent.childNodes[0];
- var positionElem = this.listParent.childNodes[1];
+ //var positionElem = this.listParent.childNodes[1];
+ var positionElem = this.listParent.childNodes[0];
var combobox = this.listParent.parentNode;
combobox.style.width = width;
- iframe.style.width = width;
+ this.iframe.style.width = width;
positionElem.style.width = width;
this.list.style.width = parseInt(width) -
Richfaces.getBorderWidth(positionElem.firstChild, "lr") -
Richfaces.getPaddingWidth(positionElem.firstChild, "lr");
@@ -590,7 +591,7 @@
resetState : function() {
var tempList = this.list.cloneNode(false);
- this.listParent.childNodes[1].firstChild.replaceChild(tempList, this.list);
+ this.listParent.childNodes[0].firstChild.replaceChild(tempList, this.list);
this.list = $(tempList.id);
this.activeItem = null;
this.isList = false;
Modified: trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-15 16:56:09 UTC
(rev 5391)
+++ trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-15 17:18:36 UTC
(rev 5392)
@@ -193,7 +193,7 @@
}
]]>
</jsp:scriptlet>
- <div id="#{clientId}" class="rich-combobox-font rich-combobox-shell
#{styleClass}" style="width:#{listWidth}; #{style}"
+ <div id="#{clientId}" class="rich-combobox-font rich-combobox-shell
#{styleClass}" style="width:#{listWidth}; z-index:1;#{style}"
x:passThruWithExclusions="value,name,type,id,styleClass,class,style,size,autocomplete,disabled,onchange">
<div class="rich-combobox-font rich-combobox-shell"
style="width:#{width};z-index:1;">
<input id="comboboxField#{clientId}"
@@ -214,14 +214,13 @@
<input type="text" class="rich-combobox-strut
rich-combobox-font" style="width:#{width}"/>
</div>
-
- <div id="listParent#{clientId}" class="rich-combobox-list-cord
#{listClass}" style="display:none; #{listStyle};">
- <iframe class="rich-combobox-list-scroll rich-combobox-list-position"
frameborder="0"
style="width:#{listWidth};z-index:2;background-color:white;"/>
- <div id="listPosition#{clientId}"
class="rich-combobox-list-position"
style="width:#{listWidth};z-index:3;">
- <div id="listDecoration#{clientId}"
class="rich-combobox-list-decoration">
- <div id="list#{clientId}" class="rich-combobox-list-scroll"
style="width:#{listWidth};">
- <f:call name="encodeItems"/>
- </div>
+ </div>
+ <iframe id="iframe#{clientId}" class="rich-combobox-list-scroll
rich-combobox-list-position" frameborder="0"
style="width:#{listWidth};z-index:2;background-color:white;"/>
+ <div id="listParent#{clientId}" class="rich-combobox-list-cord
#{listClass}" style="display:none; #{listStyle};z-index:3;">
+ <div id="listPosition#{clientId}"
class="rich-combobox-list-position" style="width:#{listWidth};">
+ <div id="listDecoration#{clientId}"
class="rich-combobox-list-decoration">
+ <div id="list#{clientId}" class="rich-combobox-list-scroll"
style="width:#{listWidth};">
+ <f:call name="encodeItems"/>
</div>
</div>
</div>
@@ -275,6 +274,7 @@
"comboboxField#{clientId}",
"comboboxButton#{clientId}",
"comboBoxButtonBG#{clientId}",
+ "iframe#{clientId}",
Richfaces.ComboBox.CLASSES,
"#{listWidth}", "#{listHeight}",
#{this:getItemsTextAsJSArray(context, component)},