switch like_stream to use backbone
This commit is contained in:
parent
31d24c60c7
commit
7c5e3cb415
4 changed files with 13 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -791,7 +791,7 @@ form.new_comment
|
|||
h4
|
||||
:font-weight bold
|
||||
|
||||
a.paginate, #infscr-loading
|
||||
#paginate, #infscr-loading
|
||||
:display block
|
||||
|
||||
:margin
|
||||
|
|
|
|||
Loading…
Reference in a new issue