diff --git a/public/js/news/profile_comment.js b/public/js/news/profile_comment.js index 7f6effa0..13c7d533 100644 --- a/public/js/news/profile_comment.js +++ b/public/js/news/profile_comment.js @@ -1,24 +1,24 @@ var ProfileComment = { displayEditor: function(eventId) { - var commentDiv = $('#event_'+eventId+' div.title div.comment') + var commentDiv = $('#event_'+eventId+' div.content') var eventActions = $('#event_'+eventId+'_actions') - + eventActions.find('a#editLink').css('display', 'none') - + commentDiv.html(Template.template($('#comment-edit-template').html(), {eventId: eventId, content: commentDiv.text()})) $('#event_'+eventId+' div.title div.comment').text() }, - + cancelEditor: function(eventId) { var eventActions = $('#event_'+eventId+'_actions') - var commentDiv = $('#event_'+eventId+' div.title div.comment') + var commentDiv = $('#event_'+eventId+' div.content') eventActions.find('a#editLink').css('display', 'inline') commentDiv.text(commentDiv.find('textarea').text()) }, - + update: function(eventId, csrfToken) { var eventActions = $('#event_'+eventId+'_actions') - var commentDiv = $('#event_'+eventId+' div.title div.comment') + var commentDiv = $('#event_'+eventId+' div.content') var self = this console.log(commentDiv.find('textarea').val()) $.post('/event/'+eventId+'/update_profile_comment', { @@ -29,4 +29,4 @@ var ProfileComment = { self.cancelEditor(eventId) }) } -} \ No newline at end of file +} diff --git a/views/_news_profile_comment.erb b/views/_news_profile_comment.erb index 8a8cad98..d1571e36 100644 --- a/views/_news_profile_comment.erb +++ b/views/_news_profile_comment.erb @@ -21,6 +21,4 @@ <%= profile_comment.created_at.ago %> -