You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Kurtsson (JIRA)" <ji...@apache.org> on 2011/04/14 15:18:05 UTC
[jira] [Commented] (WICKET-1771) Cant close an old ModalWindow and
open a new in one AjaxRequest
[ https://issues.apache.org/jira/browse/WICKET-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13019821#comment-13019821 ]
Martin Kurtsson commented on WICKET-1771:
-----------------------------------------
I temporarily fixed it using jQuery and this code:
final ModalWindow window = new ModalWindow("modal") {
@Override
protected String getCloseJavacript() {
return "Wicket.Window.Mask.element = undefined;"
+ "$('.wicket-modal').empty().remove();"
+ "$('.wicket-mask-dark').empty().remove();";
}
};
HavenĀ“t tested it very well yet but it seems to work fine.
> Cant close an old ModalWindow and open a new in one AjaxRequest
> ---------------------------------------------------------------
>
> Key: WICKET-1771
> URL: https://issues.apache.org/jira/browse/WICKET-1771
> Project: Wicket
> Issue Type: Improvement
> Components: wicket-extensions
> Environment: Windows XP
> Reporter: Martin Sachs
> Priority: Minor
>
> I have a ModalWindow for some confirmation action. After that confirmation, i want to close the window and open an other modalwindow. The ConfirmWindow can be also opened from a ModalWindow. So i need this extra ModalWindow.
> The Problem: The Close javascript uses a timeout, but the open -javascript dont.
> My fix for this solution:
> private String getWindowOpenJavascript(){...
> postProcessSettings(buffer);
> buffer.append("window.current.setTimeout(function() {
> Wicket.Window.create(settings).show();
> }, 0);\n");
> return buffer.toString();
> ..
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira