Author Topic: Customise the "showLoading"  (Read 63 times)

jplevene

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 131
    • View Profile
Customise the "showLoading"
« on: October 25, 2024, 08:30:57 pm »
An option to customise the "Loading".

I would suggest being able to set classes, content and style, overriding the default or alternatively not having the default and calling our own function

For us we just want a specific spinning SVG that is a CSS class, wirth no words.  We also need to mask the entire page, not just the grid.

Also, if we could have a way of hiding the standard "Loading" and showing our own.  Sometimes while data is loading, we need to mask the entire page and do other things.  For this we would need a showLoader event and hideLoader event
« Last Edit: October 25, 2024, 09:03:05 pm by jplevene »

jplevene

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 131
    • View Profile
Re: Customise the "showLoading"
« Reply #1 on: October 29, 2024, 11:05:57 pm »
My current way of doing it is:

Code: [Select]
(function($) {
var fn = $.paramquery._pqGrid.prototype;
fn.showLoading = function() {
if(this.$grid_center.is(":visible"))
{
this.loading = true;
open_loading_overlay();
}
};
fn.hideLoading = function() {
this.loading = false;
close_loading_overlay();
};
})(jQuery);

It's not an issue to do above, but an easier way would be nice and it would be standard across versions.