Author: nbelaevski
Date: 2008-01-31 09:28:27 -0500 (Thu, 31 Jan 2008)
New Revision: 5748
Modified:
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
Log:
http://jira.jboss.com/jira/browse/RF-2095
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-01-31
14:18:58 UTC (rev 5747)
+++
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-01-31
14:28:27 UTC (rev 5748)
@@ -425,7 +425,7 @@
}
},
- show: function(event, opts) {
+ _show: function(event, opts, synchronous) {
var element = this.id;
if(this.invokeEvent("show",event,null,element)){
this.preventFocus();
@@ -619,15 +619,34 @@
this.header.doPosition();
}
- element.style.visibility = "";
-
- this.lastOnfocus();
+ Element.hide(eCdiv);
+ element.style.visibility = "";
+
+ var showFunction = function() {
+ Element.show(eCdiv);
+
+ this.lastOnfocus();
- var event = {};
- event.parameters = opts || {};
- this.shown = true;
+ var event = {};
+ event.parameters = opts || {};
+ this.shown = true;
+ }
+
+ if (synchronous) {
+ showFunction.call(this);
+ } else {
+ setTimeout(showFunction.bind(this), 0);
+ }
}
},
+
+ syncShow: function(event, opts) {
+ this._show(event, opts, true);
+ },
+
+ show: function(event, opts) {
+ this._show(event, opts, false);
+ },
startDrag: function(border) {
//for (var k = 0; k < this.borders.length; k++ ) {