Author: nbelaevski
Date: 2007-12-10 09:36:13 -0500 (Mon, 10 Dec 2007)
New Revision: 4653
Modified:
branches/3.1.x/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
Log:
http://jira.jboss.com/jira/browse/RF-1567
Modified:
branches/3.1.x/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
---
branches/3.1.x/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-12-10
14:36:07 UTC (rev 4652)
+++
branches/3.1.x/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-12-10
14:36:13 UTC (rev 4653)
@@ -18,6 +18,7 @@
document.body.appendChild(garbageBin);
}
+ Event.unloadElementsCache(element);
// move the element to the garbage bin
garbageBin.appendChild(element);
garbageBin.innerHTML = '';
@@ -107,7 +108,7 @@
this.markerId = $(id);
- this.id = id + "Container";
+ this.id = $(id + "Container");
this.options = options;
@@ -182,8 +183,8 @@
this.eventFirstOnfocus = this.firstOnfocus.bindAsEventListener(this);
this.eventLastOnfocus = this.lastOnfocus.bindAsEventListener(this);
- this.firstHref = this.id + "FirstHref";
- this.lastHref = this.id + "LastHref";
+ this.firstHref = id + "FirstHref";
+ this.lastHref = id + "LastHref";
this.selectBehavior = options.selectBehavior;
},
@@ -206,7 +207,7 @@
this.borders = null;
if (this.floatedToBody) {
- var element = $(this.id);
+ var element = this.id;
var parent = element.parentNode;
if (parent) {
parent.removeChild(element);
@@ -244,10 +245,9 @@
}
var children = document.body.childNodes;
- var element = $(this.id);
for (var k = 0; k < children.length; k++) {
var child = children[k];
- if (child != element && child.getElementsByTagName) {
+ if (child != this.id && child.getElementsByTagName) {
var selects = child.getElementsByTagName("SELECT");
@@ -422,7 +422,7 @@
show: function(event, opts) {
this.preventFocus();
- var element = $(this.id);
+ var element = this.id;
if (!this.floatedToBody) {
this.parent = element.parentNode;
document.body.insertBefore(this.parent.removeChild(element), null);
@@ -441,12 +441,12 @@
var eIframe;
if (ModalPanel.disableSelects && !this.iframe) {
+ this.iframe = this.id.id + "IFrame";
+
new Insertion.Top(eCdiv,
- "<iframe src=\"javascript:''\" frameborder=\"0\"
scrolling=\"no\" id=\"" + this.id + "IFrame\"" +
+ "<iframe src=\"javascript:''\" frameborder=\"0\"
scrolling=\"no\" id=\"" + this.iframe + "\" " +
"style=\"position: absolute; width: 1px; height: 1px; background-color:
white; overflow-y: hidden; z-index: 1;\">" +
"</iframe>");
-
- this.iframe = this.id + "IFrame";
eIframe = $(this.iframe);
@@ -665,7 +665,7 @@
eCdiv.style.removeExpression("top");
}
- var element = $(this.id);
+ var element = this.id;
Element.hide(element);
if (this.floatedToBody && this.parent) {
@@ -838,8 +838,8 @@
if (e && target) {
var input = document.createElement("input");
input.type = "hidden";
- input.id = this.id + "OpenedState";
- input.name = this.id + "OpenedState";
+ input.id = this.id.id + "OpenedState";
+ input.name = this.id.id + "OpenedState";
input.value = this.shown ? "true" : "false";
target.appendChild(input);
@@ -848,8 +848,8 @@
for (var i = 0; i < keys.length; i++) {
input = document.createElement("input");
input.type = "hidden";
- input.id = this.id + "StateOption_" + keys[i];
- input.name = this.id + "StateOption_" + keys[i];
+ input.id = this.id.id + "StateOption_" + keys[i];
+ input.name = this.id.id + "StateOption_" + keys[i];
input.value = this.userOptions[keys[i]];
target.appendChild(input);