socialforge/app/views/messages/reply.js.erb

24 lines
1.7 KiB
Plaintext
Raw Normal View History

2015-09-01 15:24:37 +08:00
<%if @project%>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>");
2015-09-01 15:24:37 +08:00
<%elsif @course%>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>");
<% elsif @org_subfield %>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
2015-09-01 15:24:37 +08:00
<%end%>
2016-01-05 16:52:34 +08:00
init_activity_KindEditor_data(<%= @user_activity_id %>,"","87%", "UserActivity");
showNormalImage('activity_description_<%= @user_activity_id %>');
if($("#intro_content_<%= @user_activity_id %>").height() > 810) {
$("#intro_content_show_<%= @user_activity_id %>").show();
}
$("#intro_content_show_<%= @user_activity_id %>").click(function(){
$("#activity_description_<%= @user_activity_id %>").toggleClass("maxh360");
$("#activity_description_<%= @user_activity_id %>").toggleClass("lh18");
$("#intro_content_show_<%= @user_activity_id %>").hide();
$("#intro_content_hide_<%= @user_activity_id %>").show();
});
$("#intro_content_hide_<%= @user_activity_id %>").click(function(){
$("#activity_description_<%= @user_activity_id %>").toggleClass("maxh360");
$("#activity_description_<%= @user_activity_id %>").toggleClass("lh18");
$("#intro_content_hide_<%= @user_activity_id %>").hide();
$("#intro_content_show_<%= @user_activity_id %>").show();
});