comment likes wip. need to backfill some tests, make views nicer

This commit is contained in:
danielgrippi 2011-07-08 16:36:26 -07:00 committed by Raphael Sofaer
parent 797a6f5ca9
commit e0bbde4ce2
4 changed files with 25 additions and 12 deletions

View file

@ -1,5 +1,5 @@
WebSocketReceiver.processComment(<%= @comment.post_id %>,
<%= @comment.id %>,
WebSocketReceiver.processComment("<%= @comment.post.guid %>",
"<%= @comment.guid%>",
"<%= escape_javascript(render(:partial => 'comments/comment', :locals => { :comment => @comment, :person => current_user.person}))%>",
false);

View file

@ -8,4 +8,4 @@
:all_aspects => current_user.aspects
}
),
:post_id => @status_message.id}.to_json.html_safe%>
:post_id => @status_message.guid}.to_json.html_safe%>

View file

@ -85,11 +85,10 @@ var WebSocketReceiver = {
}
},
processComment: function(postId, commentId, html, opts) {
processComment: function(postGUID, commentGUID, html, opts) {
if( $("#"+commentId).length === 0 ) {
var post = $("#"+postId),
if( $("#"+commentGUID).length === 0 ) {
var post = $("#"+postGUID),
prevComments = $('.comment.posted', post);
if(prevComments.length > 0) {

View file

@ -667,6 +667,23 @@ form.new_comment
: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
ul.comments
li
@ -2211,18 +2228,15 @@ ul.show_comments
ul.show_comments,
.likes_container
*
a
:font
:weight bold
:color #999
img
:position relative
:top 3px
:top 2px
:height 12px
:width 12px
:margin
:left 0.5em
.mark_all_read
:position relative