Elastic: Fix data-fab-task handling (#7038)

Since the code is executed before rcmail init event, we have to use rcmail.env.task
instead of rcmail.task.
pull/7051/head
Aleksander Machniak 5 years ago
parent 0113ea9602
commit fecff809fe

@ -501,7 +501,7 @@ function rcube_elastic_ui()
task = button.data('fab-task') || '*',
action = button.data('fab-action') || '*';
if ((task == '*' || task == rcmail.task)
if ((task == '*' || task == rcmail.env.task)
&& (action == '*' || action == rcmail.env.action || (action == 'none' && !rcmail.env.action))
) {
fabuttons.push(create_cloned_button(button, false, false, true));

Loading…
Cancel
Save