Commit 276959beceae61141f2f098095d821a3271b62e2

Authored by Evandro Jr
1 parent 5e4c5ed2

fixed most of the CSS side [d]effects

plugins/comment_paragraph/public/comment_paragraph_macro.js
@@ -10,7 +10,26 @@ function setPlusIfZeroComments($){ @@ -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 jQuery(document).ready(function($) { 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 setPlusIfZeroComments($); 33 setPlusIfZeroComments($);
15 $('.display-comment-form').unbind(); 34 $('.display-comment-form').unbind();
16 $('.display-comment-form').click(function(){ 35 $('.display-comment-form').click(function(){
@@ -50,6 +69,8 @@ jQuery(document).ready(function($) { @@ -50,6 +69,8 @@ jQuery(document).ready(function($) {
50 <div align="center" class="triangle-right" >Comentar</div>\ 69 <div align="center" class="triangle-right" >Comentar</div>\
51 </a>'); 70 </a>');
52 71
  72 +
  73 +
53 $('.side-comments-counter').click(function(){ 74 $('.side-comments-counter').click(function(){
54 var paragraphId = $(this).data('paragraph'); 75 var paragraphId = $(this).data('paragraph');
55 hideAllCommentsExcept(paragraphId); 76 hideAllCommentsExcept(paragraphId);
@@ -65,8 +86,8 @@ jQuery(document).ready(function($) { @@ -65,8 +86,8 @@ jQuery(document).ready(function($) {
65 }).done(function() { 86 }).done(function() {
66 var button = $('#page-comment-form-' + paragraphId + ' a').get(0); 87 var button = $('#page-comment-form-' + paragraphId + ' a').get(0);
67 button.click(); 88 button.click();
68 - $('#fancybox-loading').hide();  
69 alignSideComments(paragraphId); 89 alignSideComments(paragraphId);
  90 + hideUndesiredStuff($);
70 }); 91 });
71 }); 92 });
72 93
@@ -84,8 +105,9 @@ jQuery(document).ready(function($) { @@ -84,8 +105,9 @@ jQuery(document).ready(function($) {
84 }).done(function() { 105 }).done(function() {
85 var button = $('#page-comment-form-' + paragraphId + ' a').get(0); 106 var button = $('#page-comment-form-' + paragraphId + ' a').get(0);
86 button.click(); 107 button.click();
87 - $('#fancybox-loading').hide(); 108 +
88 alignSideComments(paragraphId); 109 alignSideComments(paragraphId);
  110 + hideUndesiredStuff($);
89 }); 111 });
90 }); 112 });
91 113
@@ -209,6 +231,7 @@ jQuery(document).ready(function($) { @@ -209,6 +231,7 @@ jQuery(document).ready(function($) {
209 }).done(function() { 231 }).done(function() {
210 var button = $('#page-comment-form-' + comment_id + ' a').get(0) 232 var button = $('#page-comment-form-' + comment_id + ' a').get(0)
211 button.click(); 233 button.click();
  234 + hideUndesiredStuff($);
212 //alignSideComments(paragraphId); 235 //alignSideComments(paragraphId);
213 }); 236 });
214 } 237 }
plugins/comment_paragraph/public/style.css
@@ -88,19 +88,23 @@ div.article-comments-list-more{ @@ -88,19 +88,23 @@ div.article-comments-list-more{
88 border-radius: 10px; 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 display: block; 95 display: block;
96 width: 100%; 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 div[class^='comments_list_toggle_paragraph_'] { 109 div[class^='comments_list_toggle_paragraph_'] {
106 border-style: solid; 110 border-style: solid;
@@ -118,7 +122,7 @@ div[class^=&#39;comment-paragraph-loading-&#39;] { @@ -118,7 +122,7 @@ div[class^=&#39;comment-paragraph-loading-&#39;] {
118 } 122 }
119 123
120 #content .comment-balloon div[class^='comment-wrapper-']{ 124 #content .comment-balloon div[class^='comment-wrapper-']{
121 - background: none; 125 + background: none;
122 } 126 }
123 127
124 .side-comment{ 128 .side-comment{
@@ -159,10 +163,6 @@ div[class^=&#39;comment-paragraph-loading-&#39;] { @@ -159,10 +163,6 @@ div[class^=&#39;comment-paragraph-loading-&#39;] {
159 top: 3px; 163 top: 3px;
160 } 164 }
161 165
162 -#comments_list{  
163 - display: none;  
164 -}  
165 -  
166 .article-comment-inner {border-bottom: 1px solid #ddd;} 166 .article-comment-inner {border-bottom: 1px solid #ddd;}
167 167
168 #article .comment-replies .article-comment{background: white; border: 0px; border-top: 1px solid #ddd;} 168 #article .comment-replies .article-comment{background: white; border: 0px; border-top: 1px solid #ddd;}
@@ -174,5 +174,4 @@ div[class^=&#39;comment-paragraph-loading-&#39;] { @@ -174,5 +174,4 @@ div[class^=&#39;comment-paragraph-loading-&#39;] {
174 #content .comment-actions .menu-submenu ul { 174 #content .comment-actions .menu-submenu ul {
175 right: 100%; 175 right: 100%;
176 position: absolute; 176 position: absolute;
177 -}  
178 - 177 +}
179 \ No newline at end of file 178 \ No newline at end of file