switch like_stream to use backbone

This commit is contained in:
danielgrippi 2011-12-18 18:54:52 -08:00 committed by Dennis Collinson
parent 31d24c60c7
commit 7c5e3cb415
4 changed files with 13 additions and 4 deletions

View file

@ -5,7 +5,16 @@
require File.join(Rails.root, 'lib','stream', 'likes')
class LikeStreamController < ApplicationController
respond_to :html, :json
def index
default_stream_action(Stream::Likes)
@backbone = true
stream_klass = Stream::Likes
respond_with do |format|
format.html{ default_stream_action(stream_klass) }
format.json{ stream_json(stream_klass) }
end
end
end

View file

@ -2,6 +2,7 @@ App.Router = Backbone.Router.extend({
routes: {
"stream": "stream",
"comment_stream": "stream",
"like_stream": "stream",
"mentions": "stream",
"people/:id": "stream",
"tag_followings": "stream",

View file

@ -24,8 +24,7 @@ App.Views.Stream = Backbone.View.extend({
this.$("#paginate").remove();
$(this.el).append($("<a>", {
href: this.collection.url(),
id: "paginate",
"class": "paginate"
id: "paginate"
}).text('Load more posts'));
},

View file

@ -791,7 +791,7 @@ form.new_comment
h4
:font-weight bold
a.paginate, #infscr-loading
#paginate, #infscr-loading
:display block
:margin