Datatable processing
Datatable processing

Hi!
I have a button that reload my table.
I want to syle datatable_processing to overlay all the whole screen in grey color everytime I clic in that button. how could I do this?
This discussion has been closed.
Replies
You could use busyLoad for example: https://piccard21.github.io/busy-load/
If you want to use data table's processing indicator you can use CSS to change its appearance.
Works well.
I have a dropdown that allows you to select a different timeframe of historical data. If that dropdown changes I need to reload the data table and display the full screen spinner until the reload is completed. Here is the code:
Alternatively - using the data tables processing indicator - you can manipulate it with CSS like this for example (adding a spinner):
thanks for your reply!
I would like to try it with some Css, but I don't know how. I already have a loading icon, a spinner as you said
. But also, i would like the whole screen grey with opacity and that's the thing that I don't know how to do.
Anyway, that PlugIn BusyLoad is cool
On the busy load page you can find this.
$.busyLoadSetup({ animation: "slide", background: "rgba(255, 152, 0, 0.86)" });
You can set the background color to grey and also set the opacity. Doesn't seem to be a problem if you use busyLoadFull.
https://developer.mozilla.org/en-US/docs/Web/CSS/opacity
I didn't make any changes to the busyLoad defaults. As you can see I have the grey background automatically without doing anything. I use Bootstrap 3 and the font awesome spinner. Of course you can use something else as well ...
With this
it looks like below:

And with this:
like this:

I'll stick with the default
If you wanted to achieve the same result manipulating the Data Tables processing node you would need to manipulate the div generated here in the Data Tables Javascript code:
In my code above I manipulate the html that is passed in as "settings.oLanguage.sProcessing". I don't see a way to change the size of the div containing the processing indicator using the API.
Thanks for your suggestion!.
I found a plugin called BlockUI and it did the trick
.
Basically, in my button to refresh I assing it an "id" (reload):
In my js file, I made this.
$('#reload').on('click', function(){
It works like a charm
, I recommend it :P
BlockUi is similar to BusyLoad, but I hope I could help someone who has this issue
!
Cool!
Same solution using busyLoad and the font awesome spinner. Please note: using $.busyLoadSetup you don't need to repeat the settings for each use case.
Using ajax.reload with the responsive extension it works like this:
Oh that's great! It's kind of another way to find the same as I expected
. Both solutions are good, so thank you for helping me!
I will try with busyLoad to see how it works too