diff --git a/app/views/files/create.js.erb b/app/views/files/create.js.erb
index 07d0c06f2..a7e92ca2f 100644
--- a/app/views/files/create.js.erb
+++ b/app/views/files/create.js.erb
@@ -25,16 +25,25 @@ $('#upload_file_div').slideToggle('slow');
closeModal();
$("#resource_list").html('<%= j(render partial: "project_file_new" ,locals: {project: @project}) %>');
// 添加文件上传成功提示,
- var div = $('
文件上传成功!
');
- $("#course_list").prepend(div);
- setTimeout( function(){div.remove();},3000)
+ <% if params[:attachments].nil? %>
+ var div = $('您上传了一个空文件!
');
+ <% else %>
+ var div = $('文件上传成功!
');
+
+ <% end %>
+ $("#course_list").prepend(div);
+ setTimeout( function(){div.remove();},3000)
<%elsif @course%>
closeModal();
$("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>');
$("#courses_files_count_info").html("<%= @all_attachments.count%>");
$("#courses_files_count_nav").html("(<%= @all_attachments.count%>)")
// 添加文件上传成功提示,
- var div = $('文件上传成功!
');
+ <% if params[:attachments].nil? %>
+ var div = $('您上传了一个空文件!
');
+ <% else %>
+ var div = $('文件上传成功!
');
+ <% end %>
$("#course_list").prepend(div);
setTimeout( function(){div.remove();},3000)
<% end %>