Commit 276959beceae61141f2f098095d821a3271b62e2
1 parent
5e4c5ed2
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
fixed most of the CSS side [d]effects
Showing
2 changed files
with
41 additions
and
19 deletions
Show diff stats
plugins/comment_paragraph/public/comment_paragraph_macro.js
| ... | ... | @@ -10,7 +10,26 @@ function setPlusIfZeroComments($){ |
| 10 | 10 | }); |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | +function hideUndesiredStuff($){ | |
| 14 | + $('.comment-created-at').hide(); | |
| 15 | + $('#comment_title').hide(); | |
| 16 | + $('.formlabel').attr('for', 'comment_title').hide(); | |
| 17 | + if($.browser.mozilla){ | |
| 18 | + $('#fancybox-loading').hide(); | |
| 19 | + } | |
| 20 | +} | |
| 21 | + | |
| 22 | +function removeUndesiredStuff($){ | |
| 23 | + $('#comments_list').last().remove(); | |
| 24 | + $('.formlabel').attr('for', 'comment_title').remove(); | |
| 25 | +} | |
| 26 | + | |
| 13 | 27 | jQuery(document).ready(function($) { |
| 28 | + //Quit if does not detect a comment for that plugin | |
| 29 | + if($('.comment_paragraph').size() < 1) | |
| 30 | + return; | |
| 31 | + | |
| 32 | + removeUndesiredStuff($); | |
| 14 | 33 | setPlusIfZeroComments($); |
| 15 | 34 | $('.display-comment-form').unbind(); |
| 16 | 35 | $('.display-comment-form').click(function(){ |
| ... | ... | @@ -50,6 +69,8 @@ jQuery(document).ready(function($) { |
| 50 | 69 | <div align="center" class="triangle-right" >Comentar</div>\ |
| 51 | 70 | </a>'); |
| 52 | 71 | |
| 72 | + | |
| 73 | + | |
| 53 | 74 | $('.side-comments-counter').click(function(){ |
| 54 | 75 | var paragraphId = $(this).data('paragraph'); |
| 55 | 76 | hideAllCommentsExcept(paragraphId); |
| ... | ... | @@ -65,8 +86,8 @@ jQuery(document).ready(function($) { |
| 65 | 86 | }).done(function() { |
| 66 | 87 | var button = $('#page-comment-form-' + paragraphId + ' a').get(0); |
| 67 | 88 | button.click(); |
| 68 | - $('#fancybox-loading').hide(); | |
| 69 | 89 | alignSideComments(paragraphId); |
| 90 | + hideUndesiredStuff($); | |
| 70 | 91 | }); |
| 71 | 92 | }); |
| 72 | 93 | |
| ... | ... | @@ -84,8 +105,9 @@ jQuery(document).ready(function($) { |
| 84 | 105 | }).done(function() { |
| 85 | 106 | var button = $('#page-comment-form-' + paragraphId + ' a').get(0); |
| 86 | 107 | button.click(); |
| 87 | - $('#fancybox-loading').hide(); | |
| 108 | + | |
| 88 | 109 | alignSideComments(paragraphId); |
| 110 | + hideUndesiredStuff($); | |
| 89 | 111 | }); |
| 90 | 112 | }); |
| 91 | 113 | |
| ... | ... | @@ -209,6 +231,7 @@ jQuery(document).ready(function($) { |
| 209 | 231 | }).done(function() { |
| 210 | 232 | var button = $('#page-comment-form-' + comment_id + ' a').get(0) |
| 211 | 233 | button.click(); |
| 234 | + hideUndesiredStuff($); | |
| 212 | 235 | //alignSideComments(paragraphId); |
| 213 | 236 | }); |
| 214 | 237 | } | ... | ... |
plugins/comment_paragraph/public/style.css
| ... | ... | @@ -88,19 +88,23 @@ div.article-comments-list-more{ |
| 88 | 88 | border-radius: 10px; |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | -.comment-picture {width: 50px;} | |
| 92 | -.comment-text {display: inline-block;} | |
| 93 | -.comment-replies .comment-text {display: inline-block;} | |
| 94 | -.comment-from-owner .comment-created-at { | |
| 91 | +.side-comment .comment-picture {width: 50px;} | |
| 92 | +.side-comment .comment-text {display: inline-block;} | |
| 93 | +.side-comment .comment-replies .comment-text {display: inline-block;} | |
| 94 | +.side-comment .comment-from-owner .comment-created-at { | |
| 95 | 95 | display: block; |
| 96 | 96 | width: 100%; |
| 97 | 97 | } |
| 98 | -.comment-replies .comment-text {display: block;} | |
| 99 | -#article .article-comment .comment-details h4 {display: none;} | |
| 100 | -#article .article-comments-list .comment-replies {padding-left: 20px;} | |
| 101 | -#comment_title{ | |
| 102 | - display: none; | |
| 103 | -} | |
| 98 | +/*.comment-replies .comment-text {display: block;}*/ | |
| 99 | +/*.side-comment .comment-details {display: none;}*/ | |
| 100 | +.side-comment .comment-created-at{display: none;} | |
| 101 | +.side-comment #comment_title{display: none;} | |
| 102 | +.side-comment .comment_title{display: none;} | |
| 103 | +.side-comment label[for="comment_title"] {display: none;} | |
| 104 | + | |
| 105 | + | |
| 106 | +.side-comment .article-comments-list .comment-replies {padding-left: 20px;} | |
| 107 | + | |
| 104 | 108 | |
| 105 | 109 | div[class^='comments_list_toggle_paragraph_'] { |
| 106 | 110 | border-style: solid; |
| ... | ... | @@ -118,7 +122,7 @@ div[class^='comment-paragraph-loading-'] { |
| 118 | 122 | } |
| 119 | 123 | |
| 120 | 124 | #content .comment-balloon div[class^='comment-wrapper-']{ |
| 121 | - background: none; | |
| 125 | + background: none; | |
| 122 | 126 | } |
| 123 | 127 | |
| 124 | 128 | .side-comment{ |
| ... | ... | @@ -159,10 +163,6 @@ div[class^='comment-paragraph-loading-'] { |
| 159 | 163 | top: 3px; |
| 160 | 164 | } |
| 161 | 165 | |
| 162 | -#comments_list{ | |
| 163 | - display: none; | |
| 164 | -} | |
| 165 | - | |
| 166 | 166 | .article-comment-inner {border-bottom: 1px solid #ddd;} |
| 167 | 167 | |
| 168 | 168 | #article .comment-replies .article-comment{background: white; border: 0px; border-top: 1px solid #ddd;} |
| ... | ... | @@ -174,5 +174,4 @@ div[class^='comment-paragraph-loading-'] { |
| 174 | 174 | #content .comment-actions .menu-submenu ul { |
| 175 | 175 | right: 100%; |
| 176 | 176 | position: absolute; |
| 177 | -} | |
| 178 | - | |
| 177 | +} | |
| 179 | 178 | \ No newline at end of file | ... | ... |