老师编辑作业、学生编辑作品时删除附件界面没刷新
This commit is contained in:
parent
f466084a17
commit
427553d4e5
|
@ -216,13 +216,13 @@ class AttachmentsController < ApplicationController
|
||||||
if @attachment.container.is_a?(News)
|
if @attachment.container.is_a?(News)
|
||||||
format.html { redirect_to_referer_or news_path(@attachment.container) }
|
format.html { redirect_to_referer_or news_path(@attachment.container) }
|
||||||
elsif @attachment.container.is_a?(StudentWorksScore)
|
elsif @attachment.container.is_a?(StudentWorksScore)
|
||||||
@is_destroy = true #根据ID删除页面对应的数据,js刷新页面
|
@is_destroy = true unless params[:attachment_id] #根据ID删除页面对应的数据,js刷新页面
|
||||||
format.js
|
format.js
|
||||||
elsif @attachment.container.is_a?(HomeworkCommon)
|
elsif @attachment.container.is_a?(HomeworkCommon)
|
||||||
@is_destroy = true #根据ID删除页面对应的数据,js刷新页面
|
@is_destroy = true unless params[:attachment_id] #根据ID删除页面对应的数据,js刷新页面
|
||||||
format.js
|
format.js
|
||||||
elsif @attachment.container.is_a?(StudentWork)
|
elsif @attachment.container.is_a?(StudentWork)
|
||||||
@is_destroy = true #根据ID删除页面对应的数据,js刷新页面
|
@is_destroy = true unless params[:attachment_id] #根据ID删除页面对应的数据,js刷新页面
|
||||||
format.js
|
format.js
|
||||||
elsif @attachment.container.is_a?(Message)
|
elsif @attachment.container.is_a?(Message)
|
||||||
format.html { redirect_to_referer_or new_board_message_path(@attachment.container) }
|
format.html { redirect_to_referer_or new_board_message_path(@attachment.container) }
|
||||||
|
|
|
@ -220,7 +220,6 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @user.user_extensions && @user.user_extensions.location && !@user.user_extensions.location.empty?%>
|
<% if @user.user_extensions && @user.user_extensions.location && !@user.user_extensions.location.empty?%>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td style=" float: right" width="70px">
|
<td style=" float: right" width="70px">
|
||||||
<span style="float: right"> <%= l(:label_location) %>:</span>
|
<span style="float: right"> <%= l(:label_location) %>:</span>
|
||||||
</td>
|
</td>
|
||||||
|
|
Loading…
Reference in New Issue