展开、收缩

This commit is contained in:
huang 2016-01-05 16:52:34 +08:00
parent 2efcb5b89a
commit 738acad211
6 changed files with 22 additions and 6 deletions

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_<%= user_activity_id%>">
<div id="intro_content_blog_<%= 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_<%= topic.id %>").height() > 360) {
if($("#intro_content_blog_<%= topic.id %>").height() > 810) {
$("#intro_content_show_<%= topic.id %>").show();
}
$("#intro_content_show_<%= topic.id %>").click(function(){

View File

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

View File

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

View File

@ -5,4 +5,20 @@
<% 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}) %>");
<%end%>
init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", "UserActivity");
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();
});

View File

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