> For extra credit... what is the easiest way to make the modal window
> background darker? Do I need to extend the modal window and include a
> different CSS file? what is the best practice for this kind of thing?
>
> thanks!
> ryan
Making the background darker is a bit tricky but it can be done in the
following way. Note that this has only been tested on a modalwindow
with a panel, not with a page as content.
In the parent page include the following javascript.
/**
* Changes the style of the mask used by the modal window.
*/
function changeMaskStyle(style)
{
var myWindow=Wicket.Window.get();
if(myWindow)
{
while(myWindow.oldWindow)
myWindow=myWindow.oldWindow;
if(myWindow.mask)
{
if(myWindow.mask.element)
myWindow.mask.element.className=style;
}
}
}
In the ajax call that shows the modalwindow do this:
target.appendJavascript("changeMaskStyle('wicket-mask-extra-dark');");
Don't forget to change it back when you close the modalwindow
target.appendJavascript("changeMaskStyle('wicket-mask-dark');"); //or
transparant
Somewhere in your css include this:
div.wicket-mask-extra-dark {
position: fixed;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
opacity: 0.9;
-moz-opacity:0.9;
background-color: black;
filter: alpha(opacity=90);
background-image: url('transparent2.png');
}
Unless i am forgetting something that should be it :)
Maurice
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]