Sorting of comments

CMeylan January 2, 2013

When I add a comment onto one of my spaces the old comment keeps at the top of the page and the new comment falls below it. Is there a way to flip flop this, so the new comment shows first and the old comment falls to the bottom?

** I need to be able to reverse the order on comments on a certain space not for a whole. When i do the following:"If you want to do this per space simply wrap it in {html} tags and place it in the custom header area: Space Admin -> Look And Feel -> Themes -> Configure Theme -> Header."

I recieve an error message on each header of each page that shows below. What am I doing wrong for this not to work correctly?

Unknown macro: {html}

<script>
AJS.toInit(function(){
$comments = AJS.$('#page-comments');
$comments.children().each(function(i,li){$comments.prepend(li)})
});
< /script>

1 answer

1 accepted

0 votes
Answer accepted
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 3, 2013

I guess not possible in OnDemand. But on an installed variant, David's suggestion will help - https://answers.atlassian.com/questions/28999/is-it-possible-to-reverse-the-order-in-which-comments-appear

CMeylan January 3, 2013

** I need to be able to reverse the order on comments on a certain space not for a whole. When i do the following:"If you want to do this per space simply wrap it in {html} tags and place it in the custom header area: Space Admin -> Look And Feel -> Themes -> Configure Theme -> Header."

I recieve an error message on each header of each page that shows below. What am I doing wrong for this not to work correctly?

Unknown macro: {html}

<script>
AJS.toInit(function(){
$comments = AJS.$('#page-comments');
$comments.children().each(function(i,li){$comments.prepend(li)})
});
< /script>

Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 4, 2013

{html} macro is not enabled in OnDemand, AFAIK.

CMeylan January 7, 2013

I am not in OnDemand. We are currently an enterprise installation. Is this code possible on this sort of instance? If this code is possible, maybe we could set up a call for you to maybe walk me through this? I really need to get this to work.

Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 9, 2013

You can enable the html macro if you are an Enterprise Hosted customer. Read https://confluence.atlassian.com/display/DOC/Enabling+HTML+macros

But remember, once you are migrated to OnDemand this will be turned off.

JohnC November 10, 2014

This works but if you click reply from an email when a new comment is created you will be unable to type into the reply field.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events