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' %>
|
|
|
|
var html = $("<div>"+"<%= escape_javascript( render(:template => 'users/user_feedback4show',:locals => {:feed_list=>[@jfm]} )) %>"+"</div>");
|
|
|
|
$("div[nhname='container']",$("#nh_messages")).prepend(html.html());
|
|
|
|
// $('#new_message_cancel_btn').click();
|
|
|
|
$("a[nhname='reply_btn']",$("#nh_jours_<%= @jfm.m_reply_id %>")).click();
|
|
|
|
var params = init_list_more_div_params($("#nh_messages"));
|
|
|
|
change_status_4_list_more_div(params);
|
|
|
|
<% 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 %>
|