diff --git a/app/views/contacts/index.html.haml b/app/views/contacts/index.html.haml index ca7d1872a..3a0b8430d 100644 --- a/app/views/contacts/index.html.haml +++ b/app/views/contacts/index.html.haml @@ -2,6 +2,19 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. + +:javascript + $(document).ready(function(){ + $("#people_stream").infinitescroll({ + navSelector : ".pagination", + nextSelector : ".next_page", + itemSelector : ".stream_element", + loadingText: "", + loadingImg: '/images/ajax-loader.gif', + bufferPx: 400 + }); + }); + - content_for :page_title do = t('.title') diff --git a/public/javascripts/widgets/infinite-scroll.js b/public/javascripts/widgets/infinite-scroll.js index 40cc149a9..d7c461048 100644 --- a/public/javascripts/widgets/infinite-scroll.js +++ b/public/javascripts/widgets/infinite-scroll.js @@ -32,6 +32,18 @@ $('#main_stream').infinitescroll(this.options, function() { Diaspora.widgets.publish("stream/scrolled"); }); + + } else if($('#people_stream.contacts').length !== 0){ + $("#people_stream.contacts").infinitescroll({ + navSelector : ".pagination", + nextSelector : ".next_page", + itemSelector : ".stream_element", + loadingText: "", + loadingImg: '/images/ajax-loader.gif', + bufferPx: 400 + }, function(){ + Diaspora.widgets.publish("stream/scrolled"); + }); } };