Commit cab7c4ff by Julian Arni

Remove references to old upload progress bar

parent 76ee27c2
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
<p>${_("You may import existing course structure and content into Studio.")}</p> <p>${_("You may import existing course structure and content into Studio.")}</p>
<p>${_("Importing is not something to take lightly as the course content you successfully upload will replace your current content and cannot be reversed. Please be certain you want to replace your course's content.")}</p> <p>${_("Importing is not something to take lightly as the course content you successfully upload will replace your current content and cannot be reversed. Please be certain you want to replace your course's content.")}</p>
<p>${_("During the import process, please do not navigate away from this page.")}</p>
</div> </div>
<form id="fileupload" method="post" enctype="multipart/form-data" <form id="fileupload" method="post" enctype="multipart/form-data"
...@@ -97,7 +98,7 @@ ...@@ -97,7 +98,7 @@
</span> </span>
<div class="status-detail"> <div class="status-detail">
<h3 class="title">${_("Import Complete")}</h3> <h3 class="title">${_("Updating Course")}</h3>
<p class="copy">${_("Replacing previous course content with imported content")}</p> <p class="copy">${_("Replacing previous course content with imported content")}</p>
</div> </div>
</li> </li>
...@@ -143,12 +144,12 @@ ...@@ -143,12 +144,12 @@
require(["jquery", "jquery.fileupload"], function($) { require(["jquery", "jquery.fileupload"], function($) {
var file; var file;
var bar = $('.progress-bar');
var fill = $('.progress-fill'); var fill = $('.progress-fill');
var percent = $('.percent'); var percent = $('.percent');
var status = $('#status'); var status = $('#status');
var statusBlock = $('.status-block'); var statusBlock = $('.status-block');
var submitBtn = $('.submit-button'); var submitBtn = $('.submit-button');
var chooseBtn = $('.choose-file-button');
var allStats = $('#status-infos'); var allStats = $('#status-infos');
...@@ -192,7 +193,8 @@ $('#fileupload').fileupload({ ...@@ -192,7 +193,8 @@ $('#fileupload').fileupload({
} }
submitBtn.show(); submitBtn.show();
bar.hide(); bar.hide();
} chooseBtn.html('${_("Choose new file")}').show();
}
}); });
}); });
} else { } else {
...@@ -203,7 +205,6 @@ $('#fileupload').fileupload({ ...@@ -203,7 +205,6 @@ $('#fileupload').fileupload({
progressall: function(e, data){ progressall: function(e, data){
var doneAt; var doneAt;
var percentInt = data.loaded / data.total * 100 var percentInt = data.loaded / data.total * 100
var percentVal = parseInt(percentInt, 10) + "%";
// Firefox makes ProgressEvent.loaded equal ProgressEvent.total only // Firefox makes ProgressEvent.loaded equal ProgressEvent.total only
// after receiving a response from the server (see Mozilla bug 637002), // after receiving a response from the server (see Mozilla bug 637002),
// so for Firefox we jump the gun a little. // so for Firefox we jump the gun a little.
...@@ -213,16 +214,10 @@ $('#fileupload').fileupload({ ...@@ -213,16 +214,10 @@ $('#fileupload').fileupload({
doneAt = 99; doneAt = 99;
} }
if (percentInt >= doneAt) { if (percentInt >= doneAt) {
bar.hide();
startServerFeedback(feedbackUrl.replace("fillerName", file.name)); startServerFeedback(feedbackUrl.replace("fillerName", file.name));
} else { }
bar.show();
fill.width(percentVal);
percent.html(percentVal);
}
}, },
done: function(e, data){ done: function(e, data){
bar.hide();
window.onbeforeunload = null; window.onbeforeunload = null;
displayFinishedImport(); displayFinishedImport();
alert('${_("Your import was successful.")}'); alert('${_("Your import was successful.")}');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment