Author: nbelaevski
Date: 2008-03-12 09:57:25 -0400 (Wed, 12 Mar 2008)
New Revision: 6754
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-03-12
13:51:35 UTC (rev 6753)
+++
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-03-12
13:57:25 UTC (rev 6754)
@@ -417,7 +417,7 @@
}
},
- _show: function(event, opts, synchronous) {
+ show: function(event, opts) {
var element = this.id;
if(this.invokeEvent("show",event,null,element)){
this.preventFocus();
@@ -610,30 +610,14 @@
Element.hide(eCdiv);
element.style.visibility = "";
- var showFunction = function() {
- Element.show(eCdiv);
+ Element.show(eCdiv);
- this.lastOnfocus();
-
- var event = {};
- event.parameters = opts || {};
- this.shown = true;
- }
+ this.lastOnfocus();
- if (synchronous) {
- showFunction.call(this);
- } else {
- setTimeout(showFunction.bind(this), 0);
- }
+ var event = {};
+ event.parameters = opts || {};
+ this.shown = true;
}
- },
-
- syncShow: function(event, opts) {
- this._show(event, opts, true);
- },
-
- show: function(event, opts) {
- this._show(event, opts, false);
},
startDrag: function(border) {
@@ -955,7 +939,7 @@
}
}
-Richfaces._showModalPanel = function (id, opts, event, sync) {
+Richfaces.showModalPanel = function (id, opts, event) {
var invoke =
(RichFaces.MSIE == RichFaces.navigatorType()) ?
@@ -980,25 +964,10 @@
panel = Richfaces.findModalPanel(id);
}
invoke(function() {
- if (sync) {
- panel.component.syncShow(event, opts);
- } else {
- panel.component.show(event, opts);
- }
+ panel.component.show(event, opts);
});
-
-
};
-Richfaces.showModalPanel = function (id, opts, event) {
- Richfaces._showModalPanel(id, opts, event, false);
-};
-
-Richfaces.syncShowModalPanel = function (id, opts, event) {
- Richfaces._showModalPanel(id, opts, event, true);
-};
-
-
Richfaces.hideModalPanel = function (id, opts, event) {
var panel = $(id);
if (!panel) {