diff options
author | Aleksander Machniak <alec@alec.pl> | 2019-11-15 11:39:43 +0300 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2019-11-18 17:30:23 +0300 |
commit | 2e2028ae78d93fae7327c0c0bd91eaaf0daf3680 (patch) | |
tree | 269eca35cefc27a2a545f9b52cc3fdc5f44cffa8 /skins | |
parent | b6810cc1639f64ac53b1c3db384723d1c72080e9 (diff) |
Elastic: Fix position of mobile floating action button (#7038)
Diffstat (limited to 'skins')
-rw-r--r-- | skins/elastic/ui.js | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/skins/elastic/ui.js b/skins/elastic/ui.js index a31632e98..de50b3c99 100644 --- a/skins/elastic/ui.js +++ b/skins/elastic/ui.js @@ -492,7 +492,29 @@ function rcube_elastic_ui() (new MutationObserver(callback)).observe(document.body, {childList: true}); } - // Initialize column resizers + // Create floating action button(s) + if ((layout.list.length || layout.content.length) && is_mobile()) { + var fabuttons = []; + + $('[data-fab]').each(function() { + var button = $(this), + task = button.data('fab-task') || '*', + action = button.data('fab-action') || '*'; + + if ((task == '*' || task == rcmail.task) + && (action == '*' || action == rcmail.env.action || (action == 'none' && !rcmail.env.action)) + ) { + fabuttons.push(create_cloned_button(button, false, false, true)); + } + }); + + if (fabuttons.length) { + $('<div class="floating-action-buttons">').append(fabuttons) + .appendTo(layout.list.length ? layout.list : layout.content); + } + } + + // Initialize column resizers (must be after floating buttons) if (layout.sidebar.length) { splitter_init(layout.sidebar); } @@ -631,28 +653,6 @@ function rcube_elastic_ui() }); } - // Create floating action button(s) - if ((layout.list.length || layout.content.length) && is_mobile()) { - var fabuttons = []; - - $('[data-fab]').each(function() { - var button = $(this), - task = button.data('fab-task') || '*', - action = button.data('fab-action') || '*'; - - if ((task == '*' || task == rcmail.task) - && (action == '*' || action == rcmail.env.action || (action == 'none' && !rcmail.env.action)) - ) { - fabuttons.push(create_cloned_button(button, false, false, true)); - } - }); - - if (fabuttons.length) { - $('<div class="floating-action-buttons">').append(fabuttons) - .appendTo(layout.list.length ? layout.list : layout.content); - } - } - // Add menu link for each attachment if (rcmail.env.action != 'print') { $('#attachment-list > li').each(function() { |