wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lucio Crusca <lu...@sulweb.org>
Subject Re: ModalWindow positioning
Date Thu, 26 Jun 2014 00:07:03 GMT
In data mercoledì 25 giugno 2014 18:05:54, Lucio Crusca ha scritto:
> 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");
>   }
> };

No, this code works only in my development environment (localhost:8084). Once 
deployed to the real domain, the screen dims but the ModalWindow does not show 
up, even using the same browser I use in development tests (I guess it 
actually shows up but it falls outside the browser window, but I'm not sure).

There's no noticeable difference between development and production 
environments, except the Tomcat and Apache versions, but I fail to see how 
those could interfere with javascript. The only strange thing is that the JS 
console is showing an error in both cases, but in development it seems 
harmless:

Error: Permission denied to access property 'toString'

and this error has no reference to any particular line of code in any 
particular js file, so I don't even know if it is my mistake and where.

Any clues about why my code could behave differently in the same browser 
between development and deployment environments?



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


Mime
View raw message