动态回复的展开更多、收起,组织文章回复不可用
This commit is contained in:
parent
c0e58d19fa
commit
eab000306c
|
@ -13,7 +13,7 @@
|
|||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<%= link_to comment.creator_user.show_name, user_url_in_org(comment.creator_user.id), :class => "newsBlue mr10 f14" %>
|
||||
<%= time_from_now(comment.created_on) %>
|
||||
<%= time_from_now(comment.created_time) %>
|
||||
<span id="reply_praise_count_<%=comment.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'<%=activity.class %>',<%=user_activity_id %>,<%=allow_delete %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_journal_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'<%=activity.class %>',<%=user_activity_id %>,<%=allow_delete %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -3,5 +3,5 @@ $('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :p
|
|||
<% elsif params[:type] == 'JournalsForMessage' %>
|
||||
$('#reply_div_<%= @user_activity_id %>').html('<%=escape_javascript(render :partial => 'users/journal_replies', :locals => {:comments => @journals,:user_activity_id => @user_activity_id, :type => @type, :allow_delete => @allow_delete, :activity_id =>params[:id].to_i}) %>');
|
||||
<% else %>
|
||||
$('#reply_div_<%= @user_activity_id %>').html('<%=escape_javascript(render :partial => 'users/all_replies', :locals => {:comments => @journals,:user_activity_id => @user_activity_id, :type => @type, :allow_delete => @allow_delete, :activity_id =>params[:id].to_i}) %>');
|
||||
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/all_replies', :locals => {:comments => @journals}) %>');
|
||||
<% end %>
|
||||
|
|
|
@ -1289,7 +1289,40 @@ function clear_data(k,mdu){
|
|||
}
|
||||
}
|
||||
|
||||
function expand_reply(container, btnid, id, type, div_id, allow_delete) {
|
||||
function expand_reply(container, btnid, id, type, div_id) {
|
||||
var target = $(container);
|
||||
var btn = $(btnid);
|
||||
if (btn.data('init') == '0') {
|
||||
btn.data('init', 1);
|
||||
$.get(
|
||||
'/users/all_journals',
|
||||
{
|
||||
type: type,
|
||||
id: id,
|
||||
div_id: div_id
|
||||
},
|
||||
function(data) {
|
||||
|
||||
}
|
||||
);
|
||||
btn.html('收起回复');
|
||||
//target.show();
|
||||
} else if(btn.data('init') == '1') {
|
||||
btn.data('init', 3);
|
||||
btn.html('展开更多');
|
||||
target.hide();
|
||||
target.eq(0).show();
|
||||
target.eq(1).show();
|
||||
target.eq(2).show();
|
||||
}
|
||||
else {
|
||||
btn.data('init', 1);
|
||||
btn.html('收起回复');
|
||||
target.show();
|
||||
}
|
||||
}
|
||||
|
||||
function expand_journal_reply(container, btnid, id, type, div_id, allow_delete) {
|
||||
var target = $(container);
|
||||
var btn = $(btnid);
|
||||
if (btn.data('init') == '0') {
|
||||
|
|
Loading…
Reference in New Issue