Commit b73eb20d6ed7b1d3f44c38a767769636f10437e2
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branch 'AI3205-comment-paragraph' into stable
Showing
3 changed files
with
10 additions
and
10 deletions
Show diff stats
plugins/comment_paragraph/public/comment_paragraph_macro.js
| @@ -51,9 +51,7 @@ jQuery(document).ready(function($) { | @@ -51,9 +51,7 @@ jQuery(document).ready(function($) { | ||
| 51 | div.addClass('opened'); | 51 | div.addClass('opened'); |
| 52 | } | 52 | } |
| 53 | } | 53 | } |
| 54 | - | ||
| 55 | - //Hides old style ballons | ||
| 56 | - $("img[alt|=Comments]").hide(); | 54 | + |
| 57 | rangy.init(); | 55 | rangy.init(); |
| 58 | cssApplier = rangy.createCssClassApplier("commented-area", {normalize: false}); | 56 | cssApplier = rangy.createCssClassApplier("commented-area", {normalize: false}); |
| 59 | //Add marked text bubble | 57 | //Add marked text bubble |
plugins/comment_paragraph/public/images/comments.gif
1.66 KB
plugins/comment_paragraph/views/comment_paragraph_plugin_profile/_comment_paragraph.html.erb
| 1 | <div class="comments"> | 1 | <div class="comments"> |
| 2 | <table border="0"> | 2 | <table border="0"> |
| 3 | - <tr> | ||
| 4 | - <td width="90%"> | ||
| 5 | - <div class="comment_paragraph" id="comment_paragraph_<%= paragraph_id %>" data-paragraph="<%= paragraph_id %>"> | ||
| 6 | - <%= inner_html %> | ||
| 7 | - </div> | ||
| 8 | - </td> | 3 | + <tr> |
| 4 | + <td width="90%"> | ||
| 5 | + <div class="comment_paragraph" id="comment_paragraph_<%= paragraph_id %>" data-paragraph="<%= paragraph_id %>"> | ||
| 6 | + <%= inner_html %> | ||
| 7 | + </div> | ||
| 8 | + </td> | ||
| 9 | <td> | 9 | <td> |
| 10 | <div align="center" class="side-comments-counter" id="side_comments_counter_<%= paragraph_id %>" data-paragraph="<%= paragraph_id %>" style="vertical-align: middle; padding-left: 3px; padding-right: 5px;"> | 10 | <div align="center" class="side-comments-counter" id="side_comments_counter_<%= paragraph_id %>" data-paragraph="<%= paragraph_id %>" style="vertical-align: middle; padding-left: 3px; padding-right: 5px;"> |
| 11 | <span id="comment-count-<%= paragraph_id %>" class='comment-count'> | 11 | <span id="comment-count-<%= paragraph_id %>" class='comment-count'> |
| @@ -15,10 +15,11 @@ | @@ -15,10 +15,11 @@ | ||
| 15 | </td> | 15 | </td> |
| 16 | <td valign="top"> | 16 | <td valign="top"> |
| 17 | <div align="center"> | 17 | <div align="center"> |
| 18 | + <% if logged_in? %> | ||
| 18 | <%= | 19 | <%= |
| 19 | url = { :profile => profile_identifier, :controller => 'comment_paragraph_plugin_profile', :action => 'view_comments', :paragraph_id => paragraph_id, :article_id => article_id} | 20 | url = { :profile => profile_identifier, :controller => 'comment_paragraph_plugin_profile', :action => 'view_comments', :paragraph_id => paragraph_id, :article_id => article_id} |
| 20 | link_to_remote( | 21 | link_to_remote( |
| 21 | - image_tag("/plugins/comment_paragraph/images/comments.gif"), | 22 | + '', |
| 22 | { | 23 | { |
| 23 | :url => url, | 24 | :url => url, |
| 24 | :method => :post, | 25 | :method => :post, |
| @@ -30,6 +31,7 @@ | @@ -30,6 +31,7 @@ | ||
| 30 | :'data-url' => url_for(url) | 31 | :'data-url' => url_for(url) |
| 31 | } | 32 | } |
| 32 | )%> | 33 | )%> |
| 34 | + <% end %> | ||
| 33 | </div> | 35 | </div> |
| 34 | <div class="side-comment" id="side_comment_<%= paragraph_id %>" data-paragraph="<%= paragraph_id %>" style="display:none"> | 36 | <div class="side-comment" id="side_comment_<%= paragraph_id %>" data-paragraph="<%= paragraph_id %>" style="display:none"> |
| 35 | <div class="comment-paragraph-loading-<%= paragraph_id %>" style="position: absolute;"> | 37 | <div class="comment-paragraph-loading-<%= paragraph_id %>" style="position: absolute;"> |