Commit 703a9a80b2e1d26b86d1868db949c88ecc7c7f78
1 parent
15eb6db6
Exists in
staging
and in
7 other branches
before refactor paragraph_id to comment_paragraph_paragraph_id
Showing
3 changed files
with
4 additions
and
5 deletions
Show diff stats
plugins/comment_paragraph/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 | ... | ... |
plugins/comment_paragraph/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 | } | ... | ... |
plugins/comment_paragraph/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){ | ... | ... |