贴吧帖子的内容,设置高度限制(可点击“展开”与“收起”)
This commit is contained in:
parent
ba08bbf906
commit
c8807b29ca
|
@ -5,6 +5,19 @@
|
|||
$(function(){
|
||||
showNormalImage('postDetailDes_<%= topic.id %>');
|
||||
autoUrl('postDetailDes_<%= topic.id %>');
|
||||
if($("#intro_content_<%= topic.id %>").height() > 810) {
|
||||
$("#intro_content_show_<%= topic.id %>").show();
|
||||
}
|
||||
$("#intro_content_show_<%= topic.id %>").click(function(){
|
||||
$("#postDetailDes_<%= topic.id %>").toggleClass("maxh360");
|
||||
$("#intro_content_show_<%= topic.id %>").hide();
|
||||
$("#intro_content_hide_<%= topic.id %>").show();
|
||||
});
|
||||
$("#intro_content_hide_<%= topic.id %>").click(function(){
|
||||
$("#postDetailDes_<%= topic.id %>").toggleClass("maxh360");
|
||||
$("#intro_content_hide_<%= topic.id %>").hide();
|
||||
$("#intro_content_show_<%= topic.id %>").show();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="postDetailRow">
|
||||
|
@ -23,9 +36,14 @@
|
|||
<a href="javascript:void(0);" class="linkGrey2 disablePostLikeIcon ml10" style="cursor: default" title="点赞人数" > <%= get_praise_num(topic)%></a>
|
||||
</div>
|
||||
|
||||
<div class="postDetailDes" id = "postDetailDes_<%= topic.id %>"><%= topic.content.html_safe%>
|
||||
<!--<a href="javascript:void(0);" class="linkBlue2 underline ml8">显示全部</a>-->
|
||||
<div class="postDetailDes maxh360" id = "postDetailDes_<%= topic.id %>">
|
||||
<div id="intro_content_<%= topic.id %>">
|
||||
<%= topic.content.html_safe%>
|
||||
</div>
|
||||
</div>
|
||||
<div id="intro_content_show_<%= topic.id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||
<div id="intro_content_hide_<%= topic.id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||
<div class="cl"></div>
|
||||
<% author = topic.last_reply.try(:author)%>
|
||||
<% if author%>
|
||||
<div class="postDetailCreater">最后回复:<a href="<%= user_path(author) %>" class="linkBlue2" target="_blank"><%= author.show_name%></a></div>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
|
||||
|
||||
<div class="postDetailBanner">
|
||||
<div class="postDetailBanner" style="padding-bottom: 10px">
|
||||
<div class="postSort" id="time"><a href="javascript:void(0);" class="linkGrey2 fl">时间</a><a href="javascript:void(0);" id="reorder_time" class="sortArrowActiveD"></a></div>
|
||||
<div class="postSort" id="popu"><a href="javascript:void(0);" class="linkGrey2 fl">人气</a><a href="javascript:void(0);" id="reorder_popu" class=""></a></div>
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id => user_activity_id, :content => activity.description} %>
|
||||
<%= render :partial => "users/intro_content", :locals => {:user_activity_id => user_activity_id, :content => activity.description} %>
|
||||
<div id="intro_content_show_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||
<div id="intro_content_hide_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -58,7 +58,8 @@
|
|||
|
||||
|
||||
|
||||
<%= form_tag({:controller => 'issues', :action => 'update', :id => activity.id, :issue_detail => true, :type => "assigned"},:remote=>'true', :method => :put, :id=>"issue_query_assign_form_#{activity.id}", :class => 'query_form') do %>
|
||||
<%= form_tag({:controller => 'issues', :action => 'update', :id => activity.id, :issue_detail => true, :type => "assigned"},
|
||||
:remote=>'true', :method => :put, :id => "issue_query_assign_form_#{activity.id}", :class => 'query_form') do %>
|
||||
<li>
|
||||
<p class="label03"> 指派 : </p>
|
||||
<span class="pro_info_p" style="width:130px;">
|
||||
|
|
Loading…
Reference in New Issue