I always forget I should not change the subject, sorry... I send the message 
again with the unchanged subject so that it remains attached to the rest of 
this thread.

In data mercoledì 25 giugno 2014 14:54:23, Martin Grigorov ha scritto:
> also try: this.window

Ok thanks, "this.window" seems to be the correct one in my case, but I suspect 
other variants are needed to be as much cross browser as possible.

Just in case others need it, my current working code is:

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

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

Reply via email to