Skip to content

Commit

Permalink
fix md5sum warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jboecker committed Mar 8, 2014
1 parent 16824c1 commit 8f8bb2a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions js/admintool.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,20 @@ $(function() {
$("#connect_existing_form").submit(function(e) {
e.preventDefault();
$("#save-file-input-td").append($("#file-input").remove());
$("#file-input").change(function() {
set_status("hashing file...");
var fr = new FileReader();
fr.onload = function(evt) {
var spark = new SparkMD5.ArrayBuffer();
spark.append(fr.result);
md5hash = spark.end();
set_status("");
$(".filename-h2").text(document.getElementById("file-input").files[0].name);
$("#save-mission-button").attr("disabled", true);
}
$("#save-mission-button").removeAttr("disabled");
fr.readAsArrayBuffer(document.getElementById("file-input").files[0]);
});

$("#connect_existing_step1").hide();
ADMIN_URI = new URI($("#admin-url-input").val());
Expand Down

0 comments on commit 8f8bb2a

Please sign in to comment.