修改成上传空文件不给出提示
This commit is contained in:
parent
5a950b227a
commit
a3070e06e8
|
@ -24,28 +24,23 @@ $('#upload_file_div').slideToggle('slow');
|
|||
<% if @project %>
|
||||
closeModal();
|
||||
$("#resource_list").html('<%= j(render partial: "project_file_new" ,locals: {project: @project}) %>');
|
||||
// 添加文件上传成功提示,
|
||||
<% if params[:attachments].nil? %>
|
||||
var div = $('<div id="addBox" class="flash warning">您上传了一个空文件!</div>');
|
||||
<% else %>
|
||||
// 添加文件上传成功提示
|
||||
<% unless params[:attachments].nil? %>
|
||||
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
||||
|
||||
<% end %>
|
||||
$("#course_list").prepend(div);
|
||||
setTimeout( function(){div.remove();},3000)
|
||||
<% end %>
|
||||
<%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%>)")
|
||||
// 添加文件上传成功提示,
|
||||
<% if params[:attachments].nil? %>
|
||||
var div = $('<div id="addBox" class="flash warning">您上传了一个空文件!</div>');
|
||||
<% else %>
|
||||
<% unless params[:attachments].nil? %>
|
||||
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
||||
$("#course_list").prepend(div);
|
||||
setTimeout( function(){div.remove();},3000)
|
||||
<% end %>
|
||||
$("#course_list").prepend(div);
|
||||
setTimeout( function(){div.remove();},3000)
|
||||
<% end %>
|
||||
<% end %>
|
||||
$(document).ready(img_thumbnails);
|
||||
|
|
Loading…
Reference in New Issue