2013-12-25 22:21:16 +08:00
|
|
|
<% if @save_succ %>
|
2015-07-10 14:17:19 +08:00
|
|
|
<% if !@jfm.nil? && @jfm.jour_type == 'Principal' %>
|
2015-07-30 10:45:58 +08:00
|
|
|
$("#<%= @jfm.m_parent_id%>").children("div[nhname='reply_list']").prepend("<%= escape_javascript( render(:partial => 'users/user_jour_reply',:locals => {:reply=>@jfm} )) %>");
|
2015-07-31 15:18:57 +08:00
|
|
|
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();
|
2015-07-10 14:17:19 +08:00
|
|
|
<% else %>
|
|
|
|
|
|
|
|
var pre_append = $('<%= j(
|
2013-12-25 22:21:16 +08:00
|
|
|
render :partial => "words/journal_reply_items",
|
2014-11-26 16:29:17 +08:00
|
|
|
:locals => {:reply => @jfm, :journal => @jfm.parent, :m_reply_id => @jfm,:show_name => @show_name}
|
2013-12-26 19:28:18 +08:00
|
|
|
) %>').hide();
|
|
|
|
$('#journal_reply_ul_<%=@jfm.m_parent_id%>').append(pre_append);
|
|
|
|
pre_append.fadeIn(600);
|
2014-10-28 17:22:35 +08:00
|
|
|
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();
|
2013-12-28 13:16:22 +08:00
|
|
|
setMaxLengthItem(pre_append.find('textarea')[0]);
|
2015-07-10 14:17:19 +08:00
|
|
|
<% end %>
|
|
|
|
|
2013-12-25 22:21:16 +08:00
|
|
|
<% else %>
|
|
|
|
alert("<%= l(:label_feedback_fail) %>");
|
|
|
|
<% end %>
|