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.
bnet/additions
Aleksander Machniak 5 years ago
parent 594a12b61e
commit ebfd0f53bf

@ -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