Remove loading files modal

This commit is contained in:
j433866 2019-06-20 13:47:30 +01:00
parent c529a406cd
commit 906ece0c02
2 changed files with 0 additions and 50 deletions

View File

@ -883,19 +883,5 @@
</div>
</div>
</div>
<div class="modal" id="loading-files-modal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Loading Files...</h5>
</div>
<div class="modal-body">
<p>Loading files. This may take a while...</p>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@ -815,7 +815,6 @@ class InputWaiter {
// Display the number of files as pending so the user
// knows that we've received the files.
this.hideLoadingMessage();
this.showLoadingInfo({
pending: numFiles,
loading: 0,
@ -836,43 +835,12 @@ class InputWaiter {
});
}
/**
* Displays a message to show the app is loading files
*/
showLoadingMessage() {
$("#loading-files-modal").modal("show");
}
/**
* Hides the loading message
*/
hideLoadingMessage() {
$("#loading-files-modal").modal("hide");
}
/**
* Checks the length of the files input.
* If it's 0, hide loading message
*/
checkInputFiles() {
const fileInput = document.getElementById("open-file");
const folderInput = document.getElementById("open-folder");
if (fileInput.value.length === 0 && folderInput.value.length === 0) {
this.hideLoadingMessage();
}
}
/**
* Handler for open input button click.
* Opens the open file dialog.
*/
inputOpenClick() {
this.showLoadingMessage();
document.getElementById("open-file").click();
// When the document body regains focus, check if there's files in the input field
document.body.onfocus = this.checkInputFiles.bind(this);
}
/**
@ -880,11 +848,7 @@ class InputWaiter {
* Opens the open folder dialog.
*/
folderOpenClick() {
this.showLoadingMessage();
document.getElementById("open-folder").click();
// When the document body regains focus, check if there's files in the input field
document.body.onfocus = this.checkInputFiles.bind(this);
}
/**