diff options
Diffstat (limited to 'skins/larry')
-rw-r--r-- | skins/larry/mail.css | 2 | ||||
-rw-r--r-- | skins/larry/templates/message.html | 2 | ||||
-rw-r--r-- | skins/larry/templates/messagepreview.html | 2 | ||||
-rw-r--r-- | skins/larry/ui.js | 65 |
4 files changed, 46 insertions, 25 deletions
diff --git a/skins/larry/mail.css b/skins/larry/mail.css index b5f0822a3..b2f1d786a 100644 --- a/skins/larry/mail.css +++ b/skins/larry/mail.css @@ -868,7 +868,7 @@ div.more-headers { } div.hide-headers { - background-position: center -1600px; + background-position: center -1590px; } #all-headers { diff --git a/skins/larry/templates/message.html b/skins/larry/templates/message.html index 0e19afa40..ba8fc0f29 100644 --- a/skins/larry/templates/message.html +++ b/skins/larry/templates/message.html @@ -88,7 +88,7 @@ </div><!-- end mainscreen --> -<div id="attachmentmenu" class="popupmenu dropdown"> +<div id="attachmentmenu" class="popupmenu"> <ul class="toolbarmenu"> <li><roundcube:button command="open-attachment" id="attachmenuopen" type="link" label="open" class="icon" classAct="icon active" innerclass="icon extwin" /></li> <li><roundcube:button command="download-attachment" id="attachmenudownload" type="link" label="download" class="icon" classAct="icon active" innerclass="icon download" /></li> diff --git a/skins/larry/templates/messagepreview.html b/skins/larry/templates/messagepreview.html index b2af03485..f69f65125 100644 --- a/skins/larry/templates/messagepreview.html +++ b/skins/larry/templates/messagepreview.html @@ -62,7 +62,7 @@ </div> </div> -<div id="attachmentmenu" class="popupmenu dropdown"> +<div id="attachmentmenu" class="popupmenu"> <ul class="toolbarmenu"> <li><roundcube:button command="open-attachment" id="attachmenuopen" type="link" label="open" class="icon" classAct="icon active" innerclass="icon extwin" /></li> <li><roundcube:button command="download-attachment" id="attachmenudownload" type="link" label="download" class="icon" classAct="icon active" innerclass="icon download" /></li> diff --git a/skins/larry/ui.js b/skins/larry/ui.js index b787dbb8d..1c76f9108 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -38,6 +38,7 @@ function rcube_mail_ui() this.init_tabs = init_tabs; this.show_about = show_about; this.show_popup = show_popup; + this.add_popup = add_popup; this.set_searchmod = set_searchmod; this.show_uploadform = show_uploadform; this.show_header_row = show_header_row; @@ -95,7 +96,7 @@ function rcube_mail_ui() if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') { rcmail.addEventListener('aftershow-headers', function() { layout_messageview(); }); rcmail.addEventListener('afterhide-headers', function() { layout_messageview(); }); - $('#previewheaderstoggle').click(function(e){ toggle_preview_headers(this); return false }); + $('#previewheaderstoggle').click(function(e){ toggle_preview_headers(); return false }); // add menu link for each attachment $('#attachment-list > li').each(function() { @@ -287,28 +288,36 @@ function rcube_mail_ui() /** * Update UI on window resize */ - function resize() + function resize(e) { - if (rcmail.env.task == 'mail') { - if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') - layout_messageview(); - else if (rcmail.env.action == 'compose') - layout_composeview(); - } + // resize in intervals to prevent lags and double onresize calls in Chrome (#1489005) + var interval = e ? 10 : 0; + + if (rcmail.resize_timeout) + window.clearTimeout(rcmail.resize_timeout); - // 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'); + rcmail.resize_timeout = window.setTimeout(function() { + if (rcmail.env.task == 'mail') { + if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') + layout_messageview(); + else if (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'); + } + }); + }, interval); } /** @@ -422,13 +431,25 @@ function rcube_mail_ui() /** + * Register a popup menu + */ + function add_popup(popup, config) + { + var obj = popups[popup] = $('#'+popup); + obj.appendTo(document.body); // move it to top for proper absolute positioning + + if (obj.length) + popupconfig[popup] = $.extend(popupconfig[popup] || {}, config || {}); + } + + /** * Trigger for popup menus */ function show_popup(popup, show, config) { // auto-register menu object if (config || !popupconfig[popup]) - popupconfig[popup] = $.extend(popupconfig[popup] || {}, config); + add_popup(popup, config); var visible = show_popupmenu(popup, show), config = popupconfig[popup]; @@ -553,7 +574,7 @@ function rcube_mail_ui() /** * Switch between short and full headers display in message preview */ - function toggle_preview_headers(button) + function toggle_preview_headers() { $('#preview-shortheaders').toggle(); var full = $('#preview-allheaders').toggle(), |