Make your Page Comments input forms sliding

Many of our portlets have the ability for users to leave comments and replies such as Wiki, Page Comments, Blogs, Journal Content, etc. When users hit the Reply button, a simple text box appears. This new feature will add a sliding effect when users hit the Reply button. The simple text box will slide into view instead of just appearing.

ok, let do it.

we need modify the portal-web/docroot/html/taglib/ui/discussion/page.jsp

Firstly, modify the show/hide form function

Before adding the slide feature the code is like this:

document.getElementById(rowId).style.display = "";

document.getElementById(rowId).style.display = 'none';

 

Change it to:

jQuery('#'+rowId).slideDown("slow");

jQuery('#'+rowId).slideUp("slow");

 

Secondly,we hava to chang the

<tr id="<%= namespace %>postReplyForm<%= i %>" style="display: none;">

to

<div id="<%= namespace %>postReplyForm<%= i %>" style="display: none;">

This will make sure the code works in IE.

Now your reply forms can have the sliding feature.

 

 

 

Blogs