In data mercoledì 25 giugno 2014 09:49:51, Martin Grigorov ha scritto:
> Hi,
> 
> What exactly you tried and it didn't work ?

I added the code below, but please note that I'm no JS wizard, so it's likely 
my code wouldn't work anyway, but the point is I don't even get JS errors and 
the ModalWindow behaves just like my code wasn't there, so either my code is 
being actually skipped or it is the exact equivalent of what the default 
wicket code does (unlikely):

Wicket.Window.prototype.center = function() {
  var myWindow = Wicket.Window.get();
  if (myWindow) {
    myWindow.css("position", "fixed");
    myWindow.css("top", Math.max(0, (($(window).height() - 
$(myWindow).outerHeight()) / 2)) + "px");
    myWindow.css("left", Math.max(0, (($(window).width() - 
$(myWindow).outerWidth()) / 2)) + "px");
  }
}; 

I add this code in by including a js file in renderHead of my page and I 
confirm 
the code is there when I look at page source in the browser.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to