Page 1 of 3
Rest service Loading.
Posted: Sun Aug 19, 2012 3:04 pm
by Emmz
Hey Max...
How do I Hide, disable or replace Tizzgi ajax loading thingy..?
On some Rest services I dont want the overlay with loading gif showing.
Other times I want custom ones.
Tried all the Jquery $mobile... with no luck.
thanks
Rest service Loading.
Posted: Mon Aug 20, 2012 1:40 pm
by Maryna Brodina
Hello! You can do this using hideSpinner(), showSpinner() functions. For example:
function showSpinner() {
alert('ajax start');
}
But this function will be applied for all services in App.
Rest service Loading.
Posted: Mon Aug 20, 2012 2:23 pm
by Emmz
Thanks Marina !
Forgive my stupidity... Are you saying do it like this?
code
function hideSpinner() {
MyRestService.execute({});
}
/code
Rest service Loading.
Posted: Tue Aug 21, 2012 7:33 am
by Maryna Brodina
showSpinner() function is called before ajax loading, hideSpinner() - after. It's a standard implementation. If you will use
function hideSpinner() {
MyRestService.execute({});
}
you'll get infinite loop.
It's a very tricky situation, because if you try to rewrite standard implementation - it's impossible to predict the future behavior of the application.
Rest service Loading.
Posted: Wed Aug 22, 2012 4:23 pm
by Emmz
Ok. So I cant really implement hideSpinner in Tiggzi... or Jquery for that matter?
Thanks
Rest service Loading.
Posted: Thu Aug 23, 2012 10:23 am
by Maryna Brodina
You can do this, but you have to use this function in a right way - in "show" you can just display your image, in "hide" - you have to hide it. To place there something else is undesirable.
Rest service Loading.
Posted: Thu Aug 23, 2012 7:44 pm
by Emmz
Thanks Marina...
I'm confused thou. lol
So are u saying I need to :
function showSpinner() {
Put my own image or transparent image here
}
If that is the case what image name.
Maybe a example would help me.
I would rather not have any grayed out screen with spinner anytime in my app.
Thanks
Rest service Loading.
Posted: Thu Aug 23, 2012 8:16 pm
by maxkatz
Try this to hide it:
code
#ajaxBusy {display: none !important;}
/code
Rest service Loading.
Posted: Thu Aug 23, 2012 10:07 pm
by Emmz
Ok Put this in a custom CSS..?
Rest service Loading.
Posted: Thu Aug 23, 2012 10:32 pm
by maxkatz