Can the modal window center function be changed to support small
browser window sizes? This is in the js file in wicket-extend.jar.
Wicket.Window.prototype.center = function() {
var scTop = 0;
var scLeft = 0;
if (Wicket.Browser.isIE() || Wicket.Browser.isGecko()) {
scLeft = Wicket.Window.getScrollX();
scTop = Wicket.Window.getScrollY();
}
var width = Wicket.Window.getViewportWidth();
var height = Wicket.Window.getViewportHeight();
var modalWidth = this.window.offsetWidth;
var modalHeight = this.window.offsetHeight;
var left = (width / 2) - (modalWidth / 2) + scLeft;
var top = (height / 2) - (modalHeight / 2) + scTop;
if (top < 0) {
top = 0;
}
if (left < 0) {
left = 0;
}
this.window.style.left = left + "px";
this.window.style.top = top + "px";
};
--
Terry Howe