How to use bootstrap 4 modals as "block ui" - modal screen that blocks input and show "wait a minute.." label?
Asked Answered
P

1

5

How to use bootstrap 4 modals as "block ui" functionality: to fade screen dinamically on AJAX call (and to show "wait a minute..." label or sandglasses for that moment)?

If you have a modals in the framework that means you also can use them to block UI functionality. But I can't find any API or sample in official documentation...

Pectoralis answered 9/4, 2018 at 14:7 Comment(0)
P
6

How I have solved it:

this was added to every page that need "block UI" (actually to root template)

<div class="modal " id="blockAppliactionDialog" tabindex="-1" role="status" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content" style="background-color: transparent; border-width:0;">
            <div class="container pt-4 px-5" style="color:white; font-size:large">
                <h3>Wait a moment..</h3>
            </div>
        </div>
    </div>
</div>

and then I enable it through javascript:

this.$('#blockAppliactionDialog').modal({
            backdrop: 'static',
            keyboard: false
        });
Pectoralis answered 4/6, 2019 at 23:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.