Author: nbelaevski
Date: 2008-04-25 11:30:20 -0400 (Fri, 25 Apr 2008)
New Revision: 8183
Modified:
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-3266
http://jira.jboss.com/jira/browse/RF-3251
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 2008-04-25
14:44:53 UTC (rev 8182)
+++
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-04-25
15:30:20 UTC (rev 8183)
@@ -175,10 +175,6 @@
eCdiv.mpUseExpr = true;
}
- if (this.options.onhide && this.options.onhide != ""){
- this.eventOnHide = new Function("event",this.options.onhide);
- }
-
ModalPanel.panels.push(this);
this.eventFirstOnfocus = this.firstOnfocus.bindAsEventListener(this);
@@ -659,7 +655,9 @@
var event = {};
event.parameters = opts || {};
- if (this.eventOnHide) this.eventOnHide(event);
+ if (this.options && this.options.onhide) {
+ this.options.onhide(event);
+ }
var forms = eCdiv.getElementsByTagName("form");
if (this.options.keepVisualState && forms) {
Modified: trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
===================================================================
--- trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2008-04-25
14:44:53 UTC (rev 8182)
+++ trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2008-04-25
15:30:20 UTC (rev 8183)
@@ -188,8 +188,8 @@
});
</script>
</div>
+ <script type="text/javascript" >
+ #{this:getShowScript(context, component)}
+ </script>
</div>
- <script type="text/javascript" >
- #{this:getShowScript(context, component)}
- </script>
</f:template>