Modify window size to exclude task bar area

pull/371/head
m-bene 2014-04-07 12:07:29 +02:00
parent 329f6ae5c4
commit 9edb55d9af
2 changed files with 34 additions and 0 deletions

View File

@ -71,6 +71,23 @@ var popupSizes = {
var popupOptions = "resizable,scrollbars,status=no";
function checkSize() {
if (window.outerHeight) {
var w = window.outerWidth;
var prevW = w;
var h = window.outerHeight;
var prevH = h;
if (h > screen.availHeight)
h = screen.availHeight;
if (w > screen.availWidth)
w = screen.availWidth;
if (w != prevW || h != prevH)
window.resizeTo(w,h);
}
}
window.addEvent( 'domready', checkSize);
// Deprecated
function newWindow( url, name, width, height )
{

View File

@ -71,6 +71,23 @@ var popupSizes = {
var popupOptions = "resizable,scrollbars,status=no";
function checkSize() {
if (window.outerHeight) {
var w = window.outerWidth;
var prevW = w;
var h = window.outerHeight;
var prevH = h;
if (h > screen.availHeight)
h = screen.availHeight;
if (w > screen.availWidth)
w = screen.availWidth;
if (w != prevW || h != prevH)
window.resizeTo(w,h);
}
}
window.addEvent( 'domready', checkSize);
// Deprecated
function newWindow( url, name, width, height )
{