#1026 上传出现网络问题时给出提示
This commit is contained in:
parent
aa83609c9d
commit
6e0c916246
|
@ -1,6 +1,7 @@
|
|||
<h3><%=l(:label_attachment_new)%></h3>
|
||||
<% attachmenttypes = course.attachmenttypes %>
|
||||
<%= error_messages_for 'attachment' %>
|
||||
<div id="network_issue" style="color: red; display: none;">上传出现错误,请您检查您的网络环境,并刷新页面重新上传。</div>
|
||||
<%= form_tag(course_files_path(course), :multipart => true,:remote => true,:method => :post,:name=>"upload_form", :class => "tabular") do %>
|
||||
<div class="box">
|
||||
<p>
|
||||
|
|
|
@ -69,6 +69,10 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) {
|
|||
})
|
||||
.fail(function(result) {
|
||||
progressSpan.text(result.statusText);
|
||||
if($("#network_issue"))
|
||||
{
|
||||
$("#network_issue").show();
|
||||
}
|
||||
}).always(function() {
|
||||
ajaxUpload.uploading--;
|
||||
fileSpan.removeClass('ajax-loading');
|
||||
|
|
Loading…
Reference in New Issue