* eMail: limit resizing of compose and view windows to available screen height

This commit is contained in:
Klaus Leithoff 2013-01-24 12:13:36 +00:00
parent 2620fa783a
commit 5b4deec193
3 changed files with 6 additions and 3 deletions

View File

@ -51,6 +51,7 @@ function initAll()
//alert(fm_height+' resize By:0,'+resizeHeight);
if (fm_height >= 750) window.resizeBy(0,resizeHeight);
}
if (egw_getWindowOuterHeight()>screen.availHeight) window.resizeBy(0,screen.availHeight-egw_getWindowOuterHeight());
//tab.init();
//alert(document.onkeydown);
var titletext = document.getElementById('fm_compose_subject').value;

View File

@ -1126,18 +1126,19 @@ function fm_readMessage(_url, _windowName, _node) {
}
} else {
window.setTimeout(function() {
//alert('Height:'+egw_getWindowOuterHeight());
if (!felamimail_abortView) {
// Remove the url which shall be opened as we do not want to open this
// message in the preview window
window.felamimail_readMessage = null;
egw_openWindowCentered(_url, _windowName, 750, egw_getWindowOuterHeight());
WinId = egw_openWindowCentered(_url, _windowName, 750, egw_getWindowOuterHeight());
// Refresh the folder state (count of unread emails)
egw_appWindow('felamimail').xajax_doXMLHTTP("felamimail.ajaxfelamimail.refreshFolder");
fm_msg_removeClass(windowArray[1], 'unseen');
//alert('Got:'+WinId.outerHeight);
}
}, 0);
}

View File

@ -41,6 +41,7 @@ function goToMessage(url) {
function initAll()
{
//tab.init();
//alert('ViewMessage:'+egw_getWindowOuterHeight()+' Available:'+screen.availHeight);
if (egw_getWindowOuterHeight()<750)
{
var fm_height = screen.availHeight/100*75;
@ -48,7 +49,7 @@ function initAll()
//alert(fm_height+' resize By:0,'+resizeHeight);
if (fm_height >= 750) window.resizeBy(0,resizeHeight);
}
if (egw_getWindowOuterHeight()>screen.availHeight) window.resizeBy(0,screen.availHeight-egw_getWindowOuterHeight());
var headerTable = document.getElementById('headerTable');
var headerDIV = document.getElementById('headerDIV');
if (headerTable) {