comment likes wip. need to backfill some tests, make views nicer
This commit is contained in:
parent
797a6f5ca9
commit
e0bbde4ce2
4 changed files with 25 additions and 12 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
WebSocketReceiver.processComment(<%= @comment.post_id %>,
|
WebSocketReceiver.processComment("<%= @comment.post.guid %>",
|
||||||
<%= @comment.id %>,
|
"<%= @comment.guid%>",
|
||||||
"<%= escape_javascript(render(:partial => 'comments/comment', :locals => { :comment => @comment, :person => current_user.person}))%>",
|
"<%= escape_javascript(render(:partial => 'comments/comment', :locals => { :comment => @comment, :person => current_user.person}))%>",
|
||||||
false);
|
false);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,4 @@
|
||||||
:all_aspects => current_user.aspects
|
:all_aspects => current_user.aspects
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
:post_id => @status_message.id}.to_json.html_safe%>
|
:post_id => @status_message.guid}.to_json.html_safe%>
|
||||||
|
|
|
||||||
|
|
@ -85,11 +85,10 @@ var WebSocketReceiver = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
processComment: function(postId, commentId, html, opts) {
|
processComment: function(postGUID, commentGUID, html, opts) {
|
||||||
|
|
||||||
if( $("#"+commentId).length === 0 ) {
|
if( $("#"+commentGUID).length === 0 ) {
|
||||||
|
var post = $("#"+postGUID),
|
||||||
var post = $("#"+postId),
|
|
||||||
prevComments = $('.comment.posted', post);
|
prevComments = $('.comment.posted', post);
|
||||||
|
|
||||||
if(prevComments.length > 0) {
|
if(prevComments.length > 0) {
|
||||||
|
|
|
||||||
|
|
@ -667,6 +667,23 @@ form.new_comment
|
||||||
:display inline-block
|
:display inline-block
|
||||||
|
|
||||||
|
|
||||||
|
.likes,
|
||||||
|
.likes_container
|
||||||
|
:display inline
|
||||||
|
:padding 0
|
||||||
|
:margin 0
|
||||||
|
:font
|
||||||
|
:size 10px
|
||||||
|
a
|
||||||
|
:font
|
||||||
|
:weight normal
|
||||||
|
|
||||||
|
img
|
||||||
|
:margin 0
|
||||||
|
:height 9px
|
||||||
|
:width 9px
|
||||||
|
:top 1px
|
||||||
|
|
||||||
.stream.show
|
.stream.show
|
||||||
ul.comments
|
ul.comments
|
||||||
li
|
li
|
||||||
|
|
@ -2211,18 +2228,15 @@ ul.show_comments
|
||||||
|
|
||||||
ul.show_comments,
|
ul.show_comments,
|
||||||
.likes_container
|
.likes_container
|
||||||
*
|
a
|
||||||
:font
|
:font
|
||||||
:weight bold
|
:weight bold
|
||||||
:color #999
|
|
||||||
|
|
||||||
img
|
img
|
||||||
:position relative
|
:position relative
|
||||||
:top 3px
|
:top 2px
|
||||||
:height 12px
|
:height 12px
|
||||||
:width 12px
|
:width 12px
|
||||||
:margin
|
|
||||||
:left 0.5em
|
|
||||||
|
|
||||||
.mark_all_read
|
.mark_all_read
|
||||||
:position relative
|
:position relative
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue