留言回复人错误

This commit is contained in:
yanxd 2013-12-28 12:16:08 +08:00
parent 997c546083
commit 1b389586ad
6 changed files with 8 additions and 8 deletions

View File

@ -23,9 +23,9 @@ class JournalObserver < ActiveRecord::Observer
(Setting.notified_events.include?('issue_status_updated') && journal.new_status.present?) ||
(Setting.notified_events.include?('issue_priority_updated') && journal.new_value_for('priority_id').present?)
)
# Thread.new do
Thread.new do
Mailer.issue_edit(journal).deliver
# end
end
end
end
end

View File

@ -2,6 +2,6 @@
<% id = "journal_reply_ul_" + journal.id.to_s%>
<ul class="messages-for-user-reply" id = '<%= id %>' >
<% fetch_user_leaveWord_reply(journal).each do |reply|%>
<%= render :partial => "words/journal_reply_items", :locals => {:reply => reply, :journal => journal, :m_reply_id => reply.id} %>
<%= render :partial => "words/journal_reply_items", :locals => {:reply => reply, :journal => journal, :m_reply_id => reply} %>
<% end %>
</ul>

View File

@ -13,7 +13,7 @@
<span class="time"><%= format_time reply.created_on %></span>
<span style="display: none; margin-left: 4px;" id='<%=ids_r%>' >
<%= link_to l(:label_projects_feedback_respond),'',
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), '#{l(:label_reply_plural)} #{journal.user.show_name}: '); return false;"}
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), '#{l(:label_reply_plural)} #{m_reply_id.user.show_name}: '); return false;"}
%>
<% if @user == User.current || User.current.admin? || reply.user.id == User.current.id %>

View File

@ -30,7 +30,7 @@
</span>
<div style="clear: both;"></div>
<div id='<%= ids %>' class="respond-form">
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal.id} %>
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal} %>
</div>
<div>
<%= render :partial => "words/journal_reply", :locals => {:journal => journal } %>

View File

@ -2,8 +2,8 @@
<%= text_area_tag 'user_notes', "", :class => 'noline', :style => "resize: none;", :rows => 4, :placeholder => l(:label_projects_feedback_respond_content) %>
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => journal.id %>
<%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => journal.user.id %>
<%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => m_reply_id %>
<%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => m_reply_id.user.id %>
<%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => m_reply_id.id %>
<%= submit_tag l(:button_projects_feedback_respond), :name => nil , :class => "enterprise", :style => "margin-top: 1px;"%>
<% end %>

View File

@ -1,7 +1,7 @@
<% if @save_succ %>
var pre_append = $('<%= j(
render :partial => "words/journal_reply_items",
:locals => {:reply => @jfm, :journal => @jfm.parent, :m_reply_id => @jfm.id}
:locals => {:reply => @jfm, :journal => @jfm.parent, :m_reply_id => @jfm}
) %>').hide();
$('#journal_reply_ul_<%=@jfm.m_parent_id%>').append(pre_append);
pre_append.fadeIn(600);