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

56 lines
5.9 KiB
Plaintext

<% if params[:type] == 'HomeworkCommon' || params[:type] == 'Work' %>
$('#reply_div_<%= @user_activity_id %>').html('<%= escape_javascript(render :partial => 'users/news_replies',
:locals => {:comments => @journals,
:type => @type,
:is_teacher => @is_teacher,
:user_activity_id => @user_activity_id,
:activity_id => params[:id].to_i}) %>');
<% elsif params[:type] == 'JournalsForMessage' %>
$('#reply_div_<%= @user_activity_id %>').html('<%= escape_javascript(render :partial => 'users/message_replies',
:locals => {:comments => @journals,
:user_activity_id => @user_activity_id,
:type => @type,
:activity_id =>params[:id].to_i}) %>');
<% elsif params[:type] == 'Message' %>
$('#reply_div_<%= params[:div_id].to_i %>').html('<%= escape_javascript(render :partial => 'users/message_replies',
:locals => {:comments => @journals,
:user_activity_id => @user_activity_id,
:type => @type,
:activity_id => params[:id].to_i}) %>');
<% elsif params[:type] == 'BlogComment' %>
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/message_replies',
:locals => {:comments => @journals,
:user_activity_id => @user_activity_id,
:type => @type,
:activity_id => params[:id].to_i}) %>');
<% elsif params[:type] == 'OrgDocumentComment' %>
$('#reply_div_<%= params[:div_id].to_i %>').html('<%= escape_javascript(render :partial => 'users/message_replies',
:locals => {:comments => @journals,
:user_activity_id => @user_activity_id,
:type => @type,
:activity_id => params[:id].to_i}) %>');
<% elsif params[:type] == 'News' || params[:type] == 'Issue' || params[:type] == 'Syllabus' %>
$('#reply_div_<%= params[:div_id].to_i %>').html('<%= escape_javascript(render :partial => 'users/news_replies',
:locals => {:comments => @journals,
:user_activity_id => @user_activity_id,
:type => @type,
:activity_id => params[:id].to_i}) %>');
<% elsif params[:type] == 'is_project_issue' %>
$('#reply_div_<%= params[:div_id].to_i %>').html('<%= escape_javascript(render :partial => 'projects/project_issue_expand_show',
:locals => {:comments => @journals,
:user_activity_id => @user_activity_id,
:activity => @activity}) %>');
<% elsif params[:type] == 'is_project_training_task' %>
$('#reply_div_<%= params[:div_id].to_i %>').html('<%= escape_javascript(render :partial => 'projects/project_issue_expand_show',
:locals => {:comments => @journals,
:user_activity_id => @user_activity_id,
:activity => @activity}) %>');
<% elsif params[:type] == 'is_project_message' %>
$('#reply_div_<%= params[:div_id].to_i %>').html('<%= escape_javascript(render :partial => 'projects/project_message_replies',
:locals => {:comments => @journals,
:user_activity_id => @user_activity_id,
:type => @type,
:activity_id => params[:id].to_i}) %>');
<% end %>
// 创建回复框
sd_create_editor_from_data(<%= @user_activity_id %>, null, "100%", "UserActivity");