Display a loading dialog while refreshing tables in Spotfire

Spotfire allows user to refresh tables right in the web player. Unfortunately, there’s no real feedback for the user, who might loose his patience and start randomly clicking everywhere.
Here’s a way to create a nice modal popup windows showing a progressbar. It also prevent the user from any unwanted click (even switching tabs).
The idea is to use bootstrap modal css & js with this custom html :
and custom js :
As usual, you can download the .dxp Spotfire analysis here
It would be cool to see a more functional version which fires off the spotfire refresh table event, and makes the progress bar spin for the duration of the refresh (bigger tables take longer); if you have a look at our wiki you could have a stab at merging our two concepts to do this exact thing.
https://community.tibco.com/wiki/how-show-loading-prompt-when-reloading-external-data