|
|
@ -287,28 +287,36 @@ function rcube_mail_ui()
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Update UI on window resize
|
|
|
|
* Update UI on window resize
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function resize()
|
|
|
|
function resize(e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (rcmail.env.task == 'mail') {
|
|
|
|
// resize in intervals to prevent lags and double onresize calls in Chrome (#1489005)
|
|
|
|
if (rcmail.env.action == 'show' || rcmail.env.action == 'preview')
|
|
|
|
var interval = e ? 10 : 0;
|
|
|
|
layout_messageview();
|
|
|
|
|
|
|
|
else if (rcmail.env.action == 'compose')
|
|
|
|
|
|
|
|
layout_composeview();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// make iframe footer buttons float if scrolling is active
|
|
|
|
if (rcmail.resize_timeout)
|
|
|
|
$('body.iframe .footerleft').each(function(){
|
|
|
|
window.clearTimeout(rcmail.resize_timeout);
|
|
|
|
var footer = $(this),
|
|
|
|
|
|
|
|
body = $(document.body),
|
|
|
|
rcmail.resize_timeout = window.setTimeout(function() {
|
|
|
|
floating = footer.hasClass('floating'),
|
|
|
|
if (rcmail.env.task == 'mail') {
|
|
|
|
overflow = body.outerHeight(true) > $(window).height();
|
|
|
|
if (rcmail.env.action == 'show' || rcmail.env.action == 'preview')
|
|
|
|
|
|
|
|
layout_messageview();
|
|
|
|
if (overflow != floating) {
|
|
|
|
else if (rcmail.env.action == 'compose')
|
|
|
|
var action = overflow ? 'addClass' : 'removeClass';
|
|
|
|
layout_composeview();
|
|
|
|
footer[action]('floating');
|
|
|
|
|
|
|
|
body[action]('floatingbuttons');
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// make iframe footer buttons float if scrolling is active
|
|
|
|
|
|
|
|
$('body.iframe .footerleft').each(function(){
|
|
|
|
|
|
|
|
var footer = $(this),
|
|
|
|
|
|
|
|
body = $(document.body),
|
|
|
|
|
|
|
|
floating = footer.hasClass('floating'),
|
|
|
|
|
|
|
|
overflow = body.outerHeight(true) > $(window).height();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (overflow != floating) {
|
|
|
|
|
|
|
|
var action = overflow ? 'addClass' : 'removeClass';
|
|
|
|
|
|
|
|
footer[action]('floating');
|
|
|
|
|
|
|
|
body[action]('floatingbuttons');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}, interval);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|