Skip to content

Commit

Permalink
periodically update the time ago
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskite committed Aug 29, 2013
1 parent ef7991e commit 5c34937
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Expand Up @@ -3,6 +3,9 @@ class Chrysalis.Routers.ReposRouter extends Backbone.Router
@repos = new Chrysalis.Collections.ReposCollection()
@repos.reset(options.repos)
setInterval =>
$(".timeago").each ->
$e = $(this)
$e.html($.timeago($e.data('value')))
@trigger('tick')
, 5000

Expand Down
Expand Up @@ -25,7 +25,7 @@

<td><a href="<%= url %>" target="_blank"><%= title %></a></td>
<td><img width=32 height=32 src="<%= user_avatar_url %>" /> <%= user_login %></td>
<td data-value="<%= github_updated_at %>"><%= jQuery.timeago(github_updated_at) %></td>
<td class="timeago" data-value="<%= github_updated_at %>"><%= jQuery.timeago(github_updated_at) %></td>
<td><span class="status badge <%= statusClass %>"><%= loader %> <%= statusMsg %></span></td>

<td>
Expand Down

0 comments on commit 5c34937

Please sign in to comment.