Emmz
Posts: 0
Joined: Sat Jun 23, 2012 11:06 pm

Rest service Loading.

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Rest service Loading.

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.

Emmz
Posts: 0
Joined: Sat Jun 23, 2012 11:06 pm

Rest service Loading.

Thanks Marina !
Forgive my stupidity... Are you saying do it like this?
code
function hideSpinner() {
MyRestService.execute({});
}
/code

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Rest service Loading.

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.

Emmz
Posts: 0
Joined: Sat Jun 23, 2012 11:06 pm

Rest service Loading.

Ok. So I cant really implement hideSpinner in Tiggzi... or Jquery for that matter?

Thanks

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Rest service Loading.

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.

Emmz
Posts: 0
Joined: Sat Jun 23, 2012 11:06 pm

Rest service Loading.

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

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Rest service Loading.

Try this to hide it:
code
#ajaxBusy {display: none !important;}
/code

Emmz
Posts: 0
Joined: Sat Jun 23, 2012 11:06 pm

Rest service Loading.

Ok Put this in a custom CSS..?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Rest service Loading.

Yes

Return to “Issues”