Committed Luke's spinner patch: ajax actions show a spinner while they are working, next to the date at the top of the page.

One issue is that adding successive actions without refreshing on the home page only triggers the spinner the first time, but deleting actions on the same page without refreshing triggers it each time. I don't have a clue why.

Fixes #192.



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@208 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
bsag 2006-03-22 19:13:41 +00:00
parent 9e5f0a7c3e
commit 6d4b5f70c0
3 changed files with 12 additions and 1 deletions

View file

@ -23,7 +23,8 @@
<% if @count %>
<span id="badge_count" class="badge"><%= @count %></span>
<% end %>
<%= Time.now.strftime("%A, %d %B %Y") %></h1>
<%= Time.now.strftime("%A, %d %B %Y") %> <%= image_tag("spinner.gif", :size => "16X16", :border => 0, :id => 'busy', :style => 'display:none' ) %>
</h1>
</div>
<div id="navcontainer">
<ul id="navlist">

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -0,0 +1,10 @@
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');
}
});