修复issue详情页面,删除回复后再编辑保存issue弹出白色框问题

This commit is contained in:
huang 2016-07-14 10:39:54 +08:00
parent 61bf6604b1
commit 9b59ca20de
3 changed files with 10 additions and 11 deletions

View File

@ -432,12 +432,12 @@ class IssuesController < ApplicationController
def add_journal
if User.current.logged?
jour = Journal.new
jour.user_id = User.current.id
jour.notes = params[:notes]
jour.journalized = @issue
jour.save_attachments(params[:attachments])
jour.save
@jour = Journal.new
@jour.user_id = User.current.id
@jour.notes = params[:notes]
@jour.journalized = @issue
@jour.save_attachments(params[:attachments])
@jour.save
update_user_activity(@issue.class,@issue.id)
update_forge_activity(@issue.class,@issue.id)
@allowed_statuses = @issue.new_statuses_allowed_to(User.current)
@ -493,7 +493,7 @@ class IssuesController < ApplicationController
update_forge_activity(@issue.class,@issue.id)
respond_to do |format|
format.js
format.html{redirect_to issue_url(@issue)}
end
end
end
@ -503,7 +503,7 @@ class IssuesController < ApplicationController
@issue = Issue.find(params[:id])
Journal.destroy(params[:journal_id])
respond_to do |format|
format.js
format.html{redirect_to issue_url(@issue)}
end
end

View File

@ -42,7 +42,6 @@
l(:button_delete),
{:controller => 'issues',:action => 'delete_journal', :id => issue.id,:journal_id=>reply.id},
:method => :get,
:remote=>true,
:class => 'fr newsGrey mr10',
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete)
@ -73,7 +72,7 @@
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id %>' name="notes"></textarea>
<div class="cl"></div>
<div class="mt5 fl">
<%= render :partial => 'attachments/issue_reply', :locals => {:container => @issue} %>
<%= render :partial => 'attachments/issue_reply', :locals => {:container => @jour.nil? ? @issue : @jour} %>
</div>
<span nhname='contentmsg_<%= @issue.id %>' class="fl"></span>
<a id="new_message_submit_btn_<%= @issue.id %>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr mt5" style="display:none;">发送</a>

View File

@ -7,7 +7,7 @@
<div class="ReplyToMessageInputContainer mb10">
<% if User.current.logged? %>
<div nhname='new_message_<%= @issue.id%>' style="display:none;">
<%= form_for('new_form',:url => add_reply_issue_path(@issue.id),:method => "post", :remote => true) do |f|%>
<%= form_for('new_form',:url => add_reply_issue_path(@issue.id),:method => "post") do |f|%>
<%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%>
<!--<div class="cl"></div>-->
<input type="hidden" name="quote" value=""/>