diff --git a/lib/comment_paragraph_plugin.rb b/lib/comment_paragraph_plugin.rb index 5f5ad05..7ee7591 100644 --- a/lib/comment_paragraph_plugin.rb +++ b/lib/comment_paragraph_plugin.rb @@ -19,7 +19,7 @@ class CommentParagraphPlugin < Noosfero::Plugin arr = [] arr << hidden_field_tag('comment[id]', comment.id) arr << hidden_field_tag('comment[paragraph_id]', paragraph_id) if paragraph_id - arr << hidden_field_tag('comment[comment_paragraph_selected_area]', comment_paragraph_selected_area) if comment_paragraph_selected_area + arr << hidden_field_tag('comment[comment_paragraph_selected_area]', comment.comment_paragraph_selected_area) if comment.comment_paragraph_selected_area arr } end diff --git a/lib/ext/comment.rb b/lib/ext/comment.rb index 76e3e46..9d6319c 100644 --- a/lib/ext/comment.rb +++ b/lib/ext/comment.rb @@ -5,7 +5,7 @@ class Comment scope :without_paragraph, :conditions => {:paragraph_id => nil } settings_items :comment_paragraph_selected_area, :type => :string - + scope :in_paragraph, proc { |paragraph_id| { :conditions => ['paragraph_id = ?', paragraph_id] } diff --git a/public/comment_paragraph.js b/public/comment_paragraph.js index 4e7ad53..e8063a9 100644 --- a/public/comment_paragraph.js +++ b/public/comment_paragraph.js @@ -3,9 +3,8 @@ function makeCommentable() { foundCommentableParagraph = false; jQuery('#article_body_ifr').contents().find('body').children('div.article_comments').each(function( index ) { - paragraphsTxt+="

" + jQuery(this).html() + "

"; - console.log(jQuery(this).html()) - foundCommentableParagraph = true; + paragraphsTxt+="

" + jQuery(this).html() + "

"; + foundCommentableParagraph = true; }); if(foundCommentableParagraph === true){ -- libgit2 0.21.2