Author: knopp
Date: Thu Sep 18 17:44:48 2008
New Revision: 696886
URL: http://svn.apache.org/viewvc?rev=696886&view=rev
Log:
WICKET-1502
Modified:
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
Modified:
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js?rev=696886&r1=696885&r2=696886&view=diff
==============================================================================
---
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
(original)
+++
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
Thu Sep 18 17:44:48 2008
@@ -242,11 +242,13 @@
return win;
}
+
/**
* Closes the current wicket open window. This method is supposed to
* be called from inside the window (therefore it checks window.parent).
*/
Wicket.Window.close = function() {
+
var win;
try {
win = window.parent.Wicket.Window;
@@ -300,7 +302,7 @@
title: null, /* window title. if null and window
content is iframe, title of iframe document will be used. */
- onCloseButton: function() {
+ onCloseButton: function() {
/* On firefox on Linux, at least, we need to
blur() textfields, etc.
* to get it to update its DOM model. Otherwise
you'll lose any changes
* made to the current form component you're
editing.
@@ -441,7 +443,7 @@
this.bind(this.topRight, this.onMove);
this.bind(this.top, this.onMove);
}
-
+
this.caption.getElementsByTagName("a")[0].onclick =
this.settings.onCloseButton.bind(this);
},
@@ -1251,9 +1253,9 @@
this.document = doc;
// disable user interaction
- this.hideSelectBoxes();
- this.disableTabs();
- this.disableFocus();
+ setTimeout(function() {this.hideSelectBoxes()}.bind(this), 300);
+ setTimeout(function() {this.disableTabs()}.bind(this), 400);
+ setTimeout(function() {this.disableFocus()}.bind(this), 1000);
},
/**
@@ -1545,3 +1547,4 @@
document.cookie = name + "=" + escape(value) +
((expiredays==null) ? "" : ";expires="+exdate);
}
};
+