If you need to block a user screen while loading some data or doing heavy computations, you can use this snippet to show modal dialog with progress bar.
waitingDialog.show();
waitingDialog.show('Hello Alert !!!');
waitingDialog.show('Hello Mr. Alert !', {dialogSize: 'sm', progressType: 'warning'});
waitingDialog.show('Dialog with callback on hidden',{onHide: function () {alert('Callback!');}});