Commit 02b24442a18fba45669f733ce9665534a190af4a
1 parent
74faf599
Exists in
master
before refactor paragraph_id to comment_paragraph_paragraph_id
Showing
3 changed files
with
4 additions
and
5 deletions
Show diff stats
lib/comment_paragraph_plugin.rb
... | ... | @@ -19,7 +19,7 @@ class CommentParagraphPlugin < Noosfero::Plugin |
19 | 19 | arr = [] |
20 | 20 | arr << hidden_field_tag('comment[id]', comment.id) |
21 | 21 | arr << hidden_field_tag('comment[paragraph_id]', paragraph_id) if paragraph_id |
22 | - arr << hidden_field_tag('comment[comment_paragraph_selected_area]', comment_paragraph_selected_area) if comment_paragraph_selected_area | |
22 | + arr << hidden_field_tag('comment[comment_paragraph_selected_area]', comment.comment_paragraph_selected_area) if comment.comment_paragraph_selected_area | |
23 | 23 | arr |
24 | 24 | } |
25 | 25 | end | ... | ... |
lib/ext/comment.rb
... | ... | @@ -5,7 +5,7 @@ class Comment |
5 | 5 | scope :without_paragraph, :conditions => {:paragraph_id => nil } |
6 | 6 | |
7 | 7 | settings_items :comment_paragraph_selected_area, :type => :string |
8 | - | |
8 | + | |
9 | 9 | scope :in_paragraph, proc { |paragraph_id| { |
10 | 10 | :conditions => ['paragraph_id = ?', paragraph_id] |
11 | 11 | } | ... | ... |
public/comment_paragraph.js
... | ... | @@ -3,9 +3,8 @@ function makeCommentable() { |
3 | 3 | |
4 | 4 | foundCommentableParagraph = false; |
5 | 5 | jQuery('#article_body_ifr').contents().find('body').children('div.article_comments').each(function( index ) { |
6 | - paragraphsTxt+="<p>" + jQuery(this).html() + "</p>"; | |
7 | - console.log(jQuery(this).html()) | |
8 | - foundCommentableParagraph = true; | |
6 | + paragraphsTxt+="<p>" + jQuery(this).html() + "</p>"; | |
7 | + foundCommentableParagraph = true; | |
9 | 8 | }); |
10 | 9 | |
11 | 10 | if(foundCommentableParagraph === true){ | ... | ... |