2013-12-25 22:21:16 +08:00
|
|
|
<% if @save_succ %>
|
2015-09-25 16:29:47 +08:00
|
|
|
<% if @user_activity_id %>
|
2016-06-23 14:47:22 +08:00
|
|
|
<% if @activity.jour_type == 'Principal' %>
|
|
|
|
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>");
|
|
|
|
<% elsif @activity.jour_type == 'Course' %>
|
2016-01-22 21:41:17 +08:00
|
|
|
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>");
|
2015-10-14 11:38:16 +08:00
|
|
|
<% end %>
|
2016-02-23 15:22:44 +08:00
|
|
|
//init_activity_KindEditor_data('<%#= @user_activity_id%>', "", "87%", "UserActivity");
|
2016-01-29 16:55:07 +08:00
|
|
|
sd_create_editor_from_data('<%= @user_activity_id%>', "", "100%", "UserActivity");
|
2015-09-24 16:30:14 +08:00
|
|
|
<% else %>
|
|
|
|
<% if !@jfm.nil? && @jfm.jour_type == 'Principal' %>
|
|
|
|
$("#<%= @jfm.m_parent_id%>").children("div[nhname='reply_list']").prepend("<%= escape_javascript( render(:partial => 'users/user_jour_reply',:locals => {:reply=>@jfm} )) %>");
|
|
|
|
div_1 = $("#<%= @jfm.m_reply_id%>").children("div[nhname='div_form']");
|
|
|
|
div_1.hide();
|
|
|
|
div_2 = $("#<%= @jfm.m_reply_id%>").children("div[nhname='sub_div_form']");
|
|
|
|
div_2.hide();
|
|
|
|
<% else %>
|
|
|
|
var pre_append = $('<%= j(
|
|
|
|
render :partial => "words/journal_reply_items",
|
|
|
|
:locals => {:reply => @jfm, :journal => @jfm.parent, :m_reply_id => @jfm,:show_name => @show_name}
|
|
|
|
) %>').hide();
|
|
|
|
$('#journal_reply_ul_<%=@jfm.m_parent_id%>').append(pre_append);
|
|
|
|
pre_append.fadeIn(600);
|
|
|
|
var textarea = $('#project_respond_form_<%=@jfm.m_reply_id.to_s%> textarea');
|
|
|
|
textarea.val('');
|
|
|
|
$('#project_respond_form_<%=@jfm.m_reply_id.to_s%>').hide();
|
|
|
|
var textarea1 = $('#course_respond_form_<%=@jfm.m_reply_id.to_s%> textarea');
|
|
|
|
textarea1.val('');
|
|
|
|
$('#course_respond_form_<%=@jfm.m_reply_id.to_s%>').hide();
|
|
|
|
setMaxLengthItem(pre_append.find('textarea')[0]);
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2013-12-25 22:21:16 +08:00
|
|
|
<% else %>
|
2015-09-24 16:30:14 +08:00
|
|
|
alert("<%= l(:label_feedback_fail) %>");
|
2013-12-25 22:21:16 +08:00
|
|
|
<% end %>
|