You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Matías Tito <mt...@zauber.com.ar> on 2009/04/21 15:53:15 UTC
ModalWindow Position
Hi, I have the following problem.
I add a ModalWindow in a Page. I want to change the initial top-position
of that. I try adding an AtributteModifier but it doesn't work.
Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: ModalWindow Position
Posted by "Mathias P.W Nilsson" <ma...@snyltarna.se>.
You could maybe make your own javascript for the modal window
Wicket.Window.prototype.center = function() {
// Set your window here.
};
--
View this message in context: http://www.nabble.com/ModalWindow-Position-tp23156615p23197519.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: ModalWindow Position
Posted by Steve Swinsburg <s....@lancaster.ac.uk>.
Hi,
I use a javascript function to move it and then a
target.appendJavascript() to call it. This is for an iframe but should
work for you. Every now and then I notice a very tiny delay in the
appearance of the ModalWindow and the movement of it to its final
location. if you can fix that let me know ;)
final AjaxLink link = new AjaxLink("modal-link") {
public void onClick(AjaxRequestTarget target) {
window.show(target);
target.appendJavascript("fixWindowVertical();");
}
};
/* fix vertical issue with Wicket Modal window in an iframe. puts it
50px below top of viewport rather than vertically centered. */
function fixWindowVertical() {
var myWindow=Wicket.Window.get();
if(myWindow) {
var top = getScroll() + 50;
myWindow.window.style.top = top + "px";
}
return false;
}
cheers,
Steve
On 21 Apr 2009, at 14:53, Matías Tito wrote:
> Hi, I have the following problem.
> I add a ModalWindow in a Page. I want to change the initial top-
> position
> of that. I try adding an AtributteModifier but it doesn't work.
>
> Thanks!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>