diff --git a/plugins/comment_paragraph/public/comment_paragraph_macro.js b/plugins/comment_paragraph/public/comment_paragraph_macro.js index 5f32cb1..93c6d6a 100644 --- a/plugins/comment_paragraph/public/comment_paragraph_macro.js +++ b/plugins/comment_paragraph/public/comment_paragraph_macro.js @@ -10,7 +10,26 @@ function setPlusIfZeroComments($){ }); } +function hideUndesiredStuff($){ + $('.comment-created-at').hide(); + $('#comment_title').hide(); + $('.formlabel').attr('for', 'comment_title').hide(); + if($.browser.mozilla){ + $('#fancybox-loading').hide(); + } +} + +function removeUndesiredStuff($){ + $('#comments_list').last().remove(); + $('.formlabel').attr('for', 'comment_title').remove(); +} + jQuery(document).ready(function($) { + //Quit if does not detect a comment for that plugin + if($('.comment_paragraph').size() < 1) + return; + + removeUndesiredStuff($); setPlusIfZeroComments($); $('.display-comment-form').unbind(); $('.display-comment-form').click(function(){ @@ -50,6 +69,8 @@ jQuery(document).ready(function($) {
Comentar
\ '); + + $('.side-comments-counter').click(function(){ var paragraphId = $(this).data('paragraph'); hideAllCommentsExcept(paragraphId); @@ -65,8 +86,8 @@ jQuery(document).ready(function($) { }).done(function() { var button = $('#page-comment-form-' + paragraphId + ' a').get(0); button.click(); - $('#fancybox-loading').hide(); alignSideComments(paragraphId); + hideUndesiredStuff($); }); }); @@ -84,8 +105,9 @@ jQuery(document).ready(function($) { }).done(function() { var button = $('#page-comment-form-' + paragraphId + ' a').get(0); button.click(); - $('#fancybox-loading').hide(); + alignSideComments(paragraphId); + hideUndesiredStuff($); }); }); @@ -209,6 +231,7 @@ jQuery(document).ready(function($) { }).done(function() { var button = $('#page-comment-form-' + comment_id + ' a').get(0) button.click(); + hideUndesiredStuff($); //alignSideComments(paragraphId); }); } diff --git a/plugins/comment_paragraph/public/style.css b/plugins/comment_paragraph/public/style.css index b4723c4..b269ed9 100644 --- a/plugins/comment_paragraph/public/style.css +++ b/plugins/comment_paragraph/public/style.css @@ -88,19 +88,23 @@ div.article-comments-list-more{ border-radius: 10px; } -.comment-picture {width: 50px;} -.comment-text {display: inline-block;} -.comment-replies .comment-text {display: inline-block;} -.comment-from-owner .comment-created-at { +.side-comment .comment-picture {width: 50px;} +.side-comment .comment-text {display: inline-block;} +.side-comment .comment-replies .comment-text {display: inline-block;} +.side-comment .comment-from-owner .comment-created-at { display: block; width: 100%; } -.comment-replies .comment-text {display: block;} -#article .article-comment .comment-details h4 {display: none;} -#article .article-comments-list .comment-replies {padding-left: 20px;} -#comment_title{ - display: none; -} +/*.comment-replies .comment-text {display: block;}*/ +/*.side-comment .comment-details {display: none;}*/ +.side-comment .comment-created-at{display: none;} +.side-comment #comment_title{display: none;} +.side-comment .comment_title{display: none;} +.side-comment label[for="comment_title"] {display: none;} + + +.side-comment .article-comments-list .comment-replies {padding-left: 20px;} + div[class^='comments_list_toggle_paragraph_'] { border-style: solid; @@ -118,7 +122,7 @@ div[class^='comment-paragraph-loading-'] { } #content .comment-balloon div[class^='comment-wrapper-']{ - background: none; + background: none; } .side-comment{ @@ -159,10 +163,6 @@ div[class^='comment-paragraph-loading-'] { top: 3px; } -#comments_list{ - display: none; -} - .article-comment-inner {border-bottom: 1px solid #ddd;} #article .comment-replies .article-comment{background: white; border: 0px; border-top: 1px solid #ddd;} @@ -174,5 +174,4 @@ div[class^='comment-paragraph-loading-'] { #content .comment-actions .menu-submenu ul { right: 100%; position: absolute; -} - +} \ No newline at end of file -- libgit2 0.21.2