mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 23:36:16 -04:00
Remove loading files modal
This commit is contained in:
parent
c529a406cd
commit
906ece0c02
2 changed files with 0 additions and 50 deletions
|
@ -883,19 +883,5 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -815,7 +815,6 @@ class InputWaiter {
|
||||||
|
|
||||||
// Display the number of files as pending so the user
|
// Display the number of files as pending so the user
|
||||||
// knows that we've received the files.
|
// knows that we've received the files.
|
||||||
this.hideLoadingMessage();
|
|
||||||
this.showLoadingInfo({
|
this.showLoadingInfo({
|
||||||
pending: numFiles,
|
pending: numFiles,
|
||||||
loading: 0,
|
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.
|
* Handler for open input button click.
|
||||||
* Opens the open file dialog.
|
* Opens the open file dialog.
|
||||||
*/
|
*/
|
||||||
inputOpenClick() {
|
inputOpenClick() {
|
||||||
this.showLoadingMessage();
|
|
||||||
document.getElementById("open-file").click();
|
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.
|
* Opens the open folder dialog.
|
||||||
*/
|
*/
|
||||||
folderOpenClick() {
|
folderOpenClick() {
|
||||||
this.showLoadingMessage();
|
|
||||||
document.getElementById("open-folder").click();
|
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue