Jump to content

Add An Ajax Loading Image While Loading Data


PauloV

Recommended Posts

Hello,

 

Some plugins and modules require to request external data. Sometimes the data loading takes to many seconds, and there is no indication anywhere that the data is loading.

 

This problem is wen ajax requests are in action, and the data is loading to the parsning porstion of the page.

 

Here is a good exemple/solution

 

http://jsfiddle.net/jveldboom/c73MQ/2/

Link to comment
Share on other sites

Yes, that can be a problem in some places, and require the module/plugin to develop their own solution. The 3.2 client interface more-or-less takes care of this with loading bars, and we've just updated module service fields to do the same. Other ajax requests may require a custom solution in your plugin/module, depending on what you're trying to do.

Link to comment
Share on other sites

You are right :)

 

For now for exemple, wen loading tabs/pages inside blesta I think there is 2 actions:

 

1º - The ajax page or tab loading

2º - The external content loading inside the page/tab

 

The first one (1º) is what is more conserning, so if there is a loading image/message wen we request a class="ajax", this message will display untill the 2nd (2º) action ends because I see this on all ajax requests:

 

class="ajax" <!--is wen an ajax request starts if Im Correct on a <a> hyperlink-->
That call a funtion (in admin theme) in here: app/views/admin/default/javascript/jquery-blesta-0.1.0.js
 
So the loading function have to be including in the file above, correct? and will eliminate more than 90% of all requests in admin wen loading ajax content.
 
Im not going to see the client side because the 3.2, and I know that after the release of 3.2 I will have some work to do to convert all my plugins and modules to bootstrap :)
Link to comment
Share on other sites

 

For now for exemple, wen loading tabs/pages inside blesta I think there is 2 actions:

 

1º - The ajax page or tab loading

2º - The external content loading inside the page/tab

 

The first one (1º) is what is more conserning, so if there is a loading image/message wen we request a class="ajax", this message will display untill the 2nd (2º) action ends because I see this on all ajax requests:

 

class="ajax" <!--is wen an ajax request starts if Im Correct on a <a> hyperlink-->
That call a funtion (in admin theme) in here: app/views/admin/default/javascript/jquery-blesta-0.1.0.js
 
So the loading function have to be including in the file above, correct? and will eliminate more than 90% of all requests in admin wen loading ajax content.

 

Ah, the two points you described haven't been updated for v3.2, at least not with respect to the admin interface. We have a task, CORE-768, to set a loading icon for ajax requests, but it's currently incomplete and likely won't be in v3.2.

Link to comment
Share on other sites

  • 11 months later...

Big +1 on this.  Billing Overview widget takes forever when you have tons of data so without some form of a loading icon you never know if it's coming or not in the 3.5 ajax updates (http://dev.blesta.com/browse/CORE-1547) since it doesn't block the page.

 

Hello,

 

You can use my plugin :) Link: http://www.blesta.com/forums/index.php?/topic/2886-blesta-loading-admin-ajax-loading/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...