博客列表展开/

This commit is contained in:
huang 2016-01-05 17:01:41 +08:00
parent 738acad211
commit fc55be78c6
3 changed files with 21 additions and 4 deletions

View File

@ -1,7 +1,24 @@
<% if @in_user_center%>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>");
init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", 'UserActivity');
// init_activity_KindEditor_data(<%#= @user_activity_id%>,"","87%", 'UserActivity');
<% else%>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'blogs/article', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>");
//init_activity_KindEditor_data(<%#= @user_activity_id%>,"","87%", 'UserActivity');
<% end %>
init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", 'UserActivity');
<% end %>
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();
});

View File

@ -58,7 +58,7 @@
发帖时间:<%= format_time(activity.created_on) %>
</div>
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18 table_maxWidth" id="activity_description_<%= user_activity_id%>">
<div id="intro_content_blog_<%= user_activity_id%>">
<div id="intro_content_<%= user_activity_id%>">
<% if activity.parent_id.nil? %>
<%= activity.content.to_s.html_safe%>
<% else %>

View File

@ -76,7 +76,7 @@
$(function () {
init_activity_KindEditor_data(<%= topic.id%>, null, "87%", "<%=topic.class.to_s%>");
showNormalImage('activity_description_<%= topic.id %>');
if($("#intro_content_blog_<%= topic.id %>").height() > 810) {
if($("#intro_content_<%= topic.id %>").height() > 810) {
$("#intro_content_show_<%= topic.id %>").show();
}
$("#intro_content_show_<%= topic.id %>").click(function(){