Skip to content

Commit

Permalink
nearly final version
Browse files Browse the repository at this point in the history
  • Loading branch information
gachouchani1999 committed Sep 19, 2021
1 parent 1bcfb86 commit 4f49616
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
14 changes: 4 additions & 10 deletions flaskr/static/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ document.addEventListener('DOMContentLoaded', function() {
});

function changeDisplay() {
if (Math.random() > 0.5) {
{
displaySuccess()
} else {
displayFailure()
}
}
}



function displaySuccess() {
document.getElementById("loading").style.display = "none";
Expand All @@ -17,9 +16,4 @@ function displaySuccess() {
document.getElementById("pptx-status").innerHTML = "All done, click below to get your powerpoint!"
}

function displayFailure() {
document.getElementById("loading").style.display = "none";
document.getElementById("failure").style.display = "block";
document.getElementById("restartBtn").style.display = "inline";
document.getElementById("pptx-status").innerHTML = "Hmm, looks like something went wrong..."
}
2 changes: 1 addition & 1 deletion flaskr/templates/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h3 id="pptx-status"> Analyzing ... </h3>
<button id="downloadBtn" class="btn btn-success" style="display:none;">Download PPTX</a></button>
</form>

<button id="restartBtn" class="btn btn-danger" style="display:none;">Start Over</button>

</div>
</div>
<script src="{{url_for('static', filename='download.js')}}"></script>
Expand Down

0 comments on commit 4f49616

Please sign in to comment.