Author: sergeyhalipov
Date: 2007-08-03 11:58:44 -0400 (Fri, 03 Aug 2007)
New Revision: 2055
Modified:
trunk/ui/modal-panel/src/main/config/component/modalPanel.xml
trunk/ui/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
Log:
http://jira.jboss.com/jira/browse/RF-532
Modified: trunk/ui/modal-panel/src/main/config/component/modalPanel.xml
===================================================================
--- trunk/ui/modal-panel/src/main/config/component/modalPanel.xml 2007-08-03 15:57:16 UTC
(rev 2054)
+++ trunk/ui/modal-panel/src/main/config/component/modalPanel.xml 2007-08-03 15:58:44 UTC
(rev 2055)
@@ -197,7 +197,17 @@
<description>
</description>
<defaultvalue>false</defaultvalue>
- </property>
+ </property>
+ <property>
+ <name>tridentIVEngineSelectBehavior</name>
+ <classname>java.lang.String</classname>
+ <description>
+ How to handle HTML SELECT-based controls in IE 6?
+ - "disable" - default, handle as usual, use
disabled="true" to hide SELECT controls
+ - "hide" - use visibility="hidden" to hide SELECT
controls
+ </description>
+
<defaultvalue><![CDATA["disable"]]></defaultvalue>
+ </property>
</component>
</components>
Modified: trunk/ui/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java
===================================================================
---
trunk/ui/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java 2007-08-03
15:57:16 UTC (rev 2054)
+++
trunk/ui/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java 2007-08-03
15:58:44 UTC (rev 2055)
@@ -79,6 +79,9 @@
public abstract boolean isKeepVisualState();
public abstract void setKeepVisualState(boolean keepVisualState);
+
+ public abstract String getTridentIVEngineSelectBehavior();
+ public abstract void setTridentIVEngineSelectBehavior(String
tridentIVEngineSelectBehavior);
public boolean getRendersChildren() {
return true;
Modified:
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
---
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-08-03
15:57:16 UTC (rev 2054)
+++
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-08-03
15:58:44 UTC (rev 2055)
@@ -171,6 +171,8 @@
this.firstHref = this.markerId + "FirstHref";
this.lastHref = this.markerId + "LastHref";
+
+ this.selectBehavior = options.selectBehavior;
},
destroy: function() {
@@ -222,32 +224,62 @@
for (var i = 0; i < selects.length; i++) {
var elt = selects[i];
-
- if (enable) {
- if (elt._mdwCount) {
- elt._mdwCount -= 1;
-
- if (elt._mdwCount == 0) {
- if (elt._mdwDisabled) {
- elt._mdwDisabled = undefined;
- } else {
- elt.disabled = false;
+
+ if (this.selectBehavior && "hide" == this.selectBehavior) {
+ if (enable) {
+ if (elt._mdwCount) {
+ elt._mdwCount -= 1;
+
+ if (elt._mdwCount == 0) {
+ if (elt._mdwHidden) {
+ Element.setStyle(elt, { "visibility" : elt._mdwHidden });
+ elt._mdwHidden = undefined;
+ } else {
+ Element.setStyle(elt, { "visibility" : "" });
+ }
+
+ elt._mdwCount = undefined;
}
-
- elt._mdwCount = undefined;
}
+ } else {
+ if (elt._mdwCount) {
+ elt._mdwCount += 1;
+ } else {
+ if (elt.style.visibility && "" != elt.style.visibility) {
+ elt._mdwHidden = elt.style.visibility;
+ }
+ Element.setStyle(elt, { "visibility" : "hidden" });
+
+ elt._mdwCount = 1;
+ }
}
} else {
- if (elt._mdwCount) {
- elt._mdwCount += 1;
+ if (enable) {
+ if (elt._mdwCount) {
+ elt._mdwCount -= 1;
+
+ if (elt._mdwCount == 0) {
+ if (elt._mdwDisabled) {
+ elt._mdwDisabled = undefined;
+ } else {
+ elt.disabled = false;
+ }
+
+ elt._mdwCount = undefined;
+ }
+ }
} else {
- if (elt.disabled) {
- elt._mdwDisabled = true;
+ if (elt._mdwCount) {
+ elt._mdwCount += 1;
} else {
- elt.disabled = true;
+ if (elt.disabled) {
+ elt._mdwDisabled = true;
+ } else {
+ elt.disabled = true;
+ }
+
+ elt._mdwCount = 1;
}
-
- elt._mdwCount = 1;
}
}
}
Modified: trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
===================================================================
--- trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-08-03
15:57:16 UTC (rev 2054)
+++ trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-08-03
15:58:44 UTC (rev 2055)
@@ -135,7 +135,8 @@
onhide: #{onhide},
keepVisualState: #{component.keepVisualState},
- showWhenRendered: #{component.showWhenRendered}
+ showWhenRendered: #{component.showWhenRendered},
+ selectBehavior: "#{component.tridentIVEngineSelectBehavior}"
});
</script>
</div>