diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2012-07-06 12:53:07 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2012-07-06 12:53:07 +0200 |
commit | 98d096004d7222df2ec944d136ef6356df173f7b (patch) | |
tree | 7c6080bd032e301184fb2da7d50b3b50928dc55f /skins/larry/ui.js | |
parent | 30eb9eee28f962048d638e6d13598e33fcf29ddc (diff) |
Improve iframe form buttons display: fix iframe heights and make footer buttons float if scrolling is active
Diffstat (limited to 'skins/larry/ui.js')
-rw-r--r-- | skins/larry/ui.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/skins/larry/ui.js b/skins/larry/ui.js index 894278a9a..780ce7a62 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -218,6 +218,7 @@ function rcube_mail_ui() // don't use $(window).resize() due to some unwanted side-effects window.onresize = resize; + resize(); } /** @@ -255,6 +256,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'); + } + }) + } /** |