Sha256: 678b402cd8174f394b5858e2f74e04f094abe92dffbbd9fe7d47897e13feeddf
Contents?: true
Size: 1.2 KB
Versions: 2
Compression:
Stored size: 1.2 KB
Contents
<div id="activity-feed"> <h2><%= t('muck.activities.activity_feed_title') %></h2> <div id="activity-feed-content"> <%= render( :partial => "activities/cached_activities", :locals => {:activities => activities}) %> </div> </div> <%= will_paginate activities, :previous_label => t('muck.activities.paging_newer'), :next_label => t('muck.activities.paging_older') -%> <% content_for :javascript do -%> jQuery(document).ready(function(){ setup_submit_delete(); <% if GlobalConfig.enable_live_activity_updates -%> setInterval(function() {jQuery.ajax({success:function(request){update_feed(request);},url:'<%= activities_path(:parent_id => activities_object, :parent_type => activities_object.type, :format => 'js') %>&latest_activity_id=' + get_latest_activity_id()})}, <%=GlobalConfig.live_activity_update_interval%> * 1000) <% end -%> }); function get_latest_activity_id(){ var activities = jQuery('#activity-feed-content').children('.activity-status-update') if(activities.length > 0){ return activities[0].id.replace('activity_', ''); } else { return ''; } } function update_feed(request){ jQuery('#activity-feed-content').prepend(request); } <% end -%>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
muck-activity-0.1.2 | app/views/activities/_activity_feed.html.erb |
muck-activity-0.1.1 | app/views/activities/_activity_feed.html.erb |