ShaastraWebops / ERP14

The Enterprise Resource Planner for Shaastra 2014
0 stars 0 forks source link

Loading GIF #10

Closed pandaops closed 11 years ago

pandaops commented 11 years ago

Since Dajax for slow connections will leave users at a confused state whether their page is loading, we need loading GIFs. Take a standard GIF and show them when a dajax call is made. It'd be best if you think of some way to centralize this. Will save you some bull work.

AbdealiLoKo commented 11 years ago

DONE. Now, we have a function that loads the GIF in the div until dajaxice completes. To use it do : do_dajax(Dajaxice.tasks.abcd, callback_function, args, 'id')

So, instead of calling the dajaxice directly like : Dajaxice.asa.aaa(callback_func, {'aaa':'ddd'} ) DO : do_dajax(Dajaxice.asa.aaa, callback_func, {'aaa':'ddd'}, 'id_in_which to put loading' )

Further improvements not yet implemented :

  1. Put the loading.gif in the partially transparent fore ground, so while page is loading user can see data from last page right until the page loads. (Basically, for those few seconds, he can read other tasks rather than be idle)
  2. As loading.gif will always be in the div where the content will be kept by dajax, we may wanna put it as a argument to the python-ajax function and make it send it's rendered-html0content to that id. AS : if frontend needs to change location of things, i.e. don't put some page in right_content, rather put it in modal .. python code doesnt ever have to change.
AbdealiLoKo commented 11 years ago

The loading.gif was not uploaded. Will close it again after testing if the path is correct on the main server.

AbdealiLoKo commented 11 years ago

Above problem fixed in 0e745a435da7bab63aa36a7c7ba47ce1b35a5432