From af32a2f5ece250427aa753b236e48784ffa07aba Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Fri, 6 Jul 2012 12:53:07 +0200 Subject: Improve iframe form buttons display: fix iframe heights and make footer buttons float if scrolling is active --- skins/larry/ui.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'skins/larry/ui.js') diff --git a/skins/larry/ui.js b/skins/larry/ui.js index 6cc4d1d7e..1022ee53e 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -220,6 +220,7 @@ function rcube_mail_ui() // don't use $(window).resize() due to some unwanted side-effects window.onresize = resize; + resize(); } /** @@ -257,6 +258,20 @@ function rcube_mail_ui() if (rcmail.env.task == 'mail' && rcmail.env.action == 'compose') { layout_composeview(); } + + // 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'); + } + }) + } /** -- cgit v1.2.3