socialforge/app/views/users/reply_to.js.erb

14 lines
804 B
Plaintext

if($("#reply_message_<%= @reply.id%>").length > 0) {
<% if params[:is_project] %>
$("#reply_message_<%= @reply.id%>").replaceWith("<%= escape_javascript(render :partial => 'projects/reply_to', :locals => {:reply => @reply}) %>");
<% else %>
$("#reply_message_<%= @reply.id%>").replaceWith("<%= escape_javascript(render :partial => 'users/reply_to', :locals => {:reply => @reply}) %>");
<% end %>
$("#reply_iconup_<%=@reply.id %>").show();
$(function(){
sd_create_editor_from_data(<%= @reply.id%>,null,"100%", "<%=@reply.class.to_s%>");
});
}else if($("#reply_to_message_<%= @reply.id%>").length >0) {
$("#reply_to_message_<%= @reply.id%>").replaceWith("<p id='reply_message_<%= @reply.id%>'></p>");
$("#reply_iconup_<%=@reply.id %>").hide();
}