AJAX spinners are now contextual instead of in the same place on every Ajax request.

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@668 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lukemelia 2007-12-03 03:24:05 +00:00
parent 0e3083646f
commit 4b3ba0dd6a
10 changed files with 148 additions and 59 deletions

View file

@ -34,21 +34,12 @@ var TracksForm = {
toggleDiv.toggleClassName('hide_form');
}
}
Ajax.Responders.register({
onCreate: function() {
if($('busy') && Ajax.activeRequestCount>0)
Effect.Appear('busy',{duration:0.5,queue:'end'});
},
onComplete: function() {
if($('busy') && Ajax.activeRequestCount==0)
Element.hide('busy');
}
//,
// uncomment the next three lines for easier debugging with FireBug
// uncomment the next four lines for easier debugging with FireBug
// Ajax.Responders.register({
// onException: function(source, exception) {
// console.error(exception);
// }
});
// });
/* fade flashes automatically */
Event.observe(window, 'load', function() {