diff --git a/public/comment_paragraph_macro.js b/public/comment_paragraph_macro.js index 143a2ff..6849ff8 100644 --- a/public/comment_paragraph_macro.js +++ b/public/comment_paragraph_macro.js @@ -231,20 +231,20 @@ jQuery(document).ready(function($) { //Seens that this code is not beeing used anymore -//function toggleParagraph(paragraph) { -// var div = jQuery('div.comments_list_toggle_paragraph_'+paragraph); -// var visible = div.is(':visible'); -// if(!visible) -// jQuery('div.comment-paragraph-loading-' + paragraph).addClass('comment-button-loading'); -// div.toggle('fast'); -// return visible; -//} - -//function loadCompleted(paragraph) { -// jQuery('div.comment-paragraph-loading-'+paragraph).removeClass('comment-button-loading') -// if(comment_paragraph_anchor) { -// jQuery.scrollTo(jQuery(comment_paragraph_anchor)); -// comment_paragraph_anchor = null; -// } -//} +function toggleParagraph(paragraph) { + var div = jQuery('div.comments_list_toggle_paragraph_'+paragraph); + var visible = div.is(':visible'); + if(!visible) + jQuery('div.comment-paragraph-loading-' + paragraph).addClass('comment-button-loading'); + div.toggle('fast'); + return visible; +} + +function loadCompleted(paragraph) { + jQuery('div.comment-paragraph-loading-'+paragraph).removeClass('comment-button-loading') + if(comment_paragraph_anchor) { + jQuery.scrollTo(jQuery(comment_paragraph_anchor)); + comment_paragraph_anchor = null; + } +} -- libgit2 0.21.2