Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (29 sloc) 1.16 KB
this.ActivityList = class ActivityList extends ViewBase
bindEvents: (evtRouter) =>
evtRouter.on 'gnip:activitiesloaded', @showActivities
evtRouter.on 'gnip:activitieserror', @showError
evtRouter.on 'gnip:searchsubmitted', @hide
evtRouter.on 'gnip:timeboundsupdated', @hide
@$el.on 'click', '.tweet', (evt) =>
activity = $('.tweet').data('activity')
if activity
evtRouter.trigger 'gnip:selectactivity',
@$el.on 'click', '.profile-location', (evt) =>
evtRouter.trigger 'gnip:toggleactivitymap', true
clearActivities: =>
showActivities: (evt, opts) =>
if Array.isArray( and
fragment = $('<div/>')
fragment.append(Handlebars.templates.tweet(activity)) for activity in
# TODO: defer render/load of tweets out-of-view
@$el.append fragment
@$el.append '<li class="no-activities">No activities</li>'
showError: (evt, jqXHR) =>
if jqXHR.status == 500
@$el.empty().append '<li class="no-activities">Server Error :(</li>'