老师编辑作业、学生编辑作品时删除附件界面没刷新

This commit is contained in:
sw 2015-06-05 13:56:13 +08:00
parent f466084a17
commit 427553d4e5
2 changed files with 4 additions and 5 deletions

View File

@ -216,13 +216,13 @@ class AttachmentsController < ApplicationController
if @attachment.container.is_a?(News)
format.html { redirect_to_referer_or news_path(@attachment.container) }
elsif @attachment.container.is_a?(StudentWorksScore)
@is_destroy = true #根据ID删除页面对应的数据js刷新页面
@is_destroy = true unless params[:attachment_id] #根据ID删除页面对应的数据js刷新页面
format.js
elsif @attachment.container.is_a?(HomeworkCommon)
@is_destroy = true #根据ID删除页面对应的数据js刷新页面
@is_destroy = true unless params[:attachment_id] #根据ID删除页面对应的数据js刷新页面
format.js
elsif @attachment.container.is_a?(StudentWork)
@is_destroy = true #根据ID删除页面对应的数据js刷新页面
@is_destroy = true unless params[:attachment_id] #根据ID删除页面对应的数据js刷新页面
format.js
elsif @attachment.container.is_a?(Message)
format.html { redirect_to_referer_or new_board_message_path(@attachment.container) }

View File

@ -220,7 +220,6 @@
<% end %>
<% if @user.user_extensions && @user.user_extensions.location && !@user.user_extensions.location.empty?%>
<tr>
<td style=" float: right" width="70px">
<span style="float: right"> <%= l(:label_location) %></span>
</td>