Commit b9252191 authored by sajolida's avatar sajolida
Browse files

Display back JavaScript tip after displaying BitTorrent tip

parent 3f5296ec
...@@ -109,6 +109,17 @@ document.addEventListener("DOMContentLoaded", function() { ...@@ -109,6 +109,17 @@ document.addEventListener("DOMContentLoaded", function() {
/* Display logic functions */ /* Display logic functions */
function toggleJavaScriptBitTorrent(method) {
if (method === "javascript") {
hide(document.getElementById("bittorrent-verification-tip"));
show(document.getElementById("javascript-verification-tip"));
}
else if (method === "bittorrent") {
hide(document.getElementById("javascript-verification-tip"));
show(document.getElementById("bittorrent-verification-tip"));
}
}
function showAnotherMirror() { function showAnotherMirror() {
hide(document.getElementById("bittorrent")); hide(document.getElementById("bittorrent"));
show(document.getElementById("try-another-mirror")); show(document.getElementById("try-another-mirror"));
...@@ -188,6 +199,7 @@ document.addEventListener("DOMContentLoaded", function() { ...@@ -188,6 +199,7 @@ document.addEventListener("DOMContentLoaded", function() {
try { try {
e.preventDefault(); e.preventDefault();
hitCounter("download-image"); hitCounter("download-image");
toggleJavaScriptBitTorrent("javascript");
resetVerificationResult(); resetVerificationResult();
showAnotherMirror(); showAnotherMirror();
} finally { } finally {
...@@ -205,8 +217,7 @@ document.addEventListener("DOMContentLoaded", function() { ...@@ -205,8 +217,7 @@ document.addEventListener("DOMContentLoaded", function() {
try { try {
e.preventDefault(); e.preventDefault();
hitCounter("download-torrent"); hitCounter("download-torrent");
hide(document.getElementById("javascript-verification-tip")); toggleJavaScriptBitTorrent("bittorrent");
show(document.getElementById("bittorrent-verification-tip"));
toggleContinueLink("next"); toggleContinueLink("next");
} finally { } finally {
// Setting window.location.href will abort AJAX requests resulting // Setting window.location.href will abort AJAX requests resulting
...@@ -223,6 +234,7 @@ document.addEventListener("DOMContentLoaded", function() { ...@@ -223,6 +234,7 @@ document.addEventListener("DOMContentLoaded", function() {
try { try {
e.preventDefault(); e.preventDefault();
hitCounter("download-image-again"); hitCounter("download-image-again");
toggleJavaScriptBitTorrent("javascript");
resetVerificationResult(); resetVerificationResult();
showVerifyButton(); showVerifyButton();
} finally { } finally {
......
...@@ -40,7 +40,7 @@ were solved, and known issues that have already been identified.</p> ...@@ -40,7 +40,7 @@ were solved, and known issues that have already been identified.</p>
<div id="step-verify"> <div id="step-verify">
<h3><span class="step-number"><span class="usb upgrade">1.</span>2</span>Verify your download</h3> <h3><span class="step-number"><span class="usb upgrade">1.</span>2</span>Verify your download</h3>
<div id="javascript-verification-tip" class="indent"> <div id="javascript-verification-tip" class="indent block">
<p>For your security, always verify your download.</p> <p>For your security, always verify your download.</p>
<p class="floating-toggleable-link why-verify-link">[[!toggle id="why-verify-supported" text="Why?"]]</p> <p class="floating-toggleable-link why-verify-link">[[!toggle id="why-verify-supported" text="Why?"]]</p>
<div id="why-verify-supported" class="floating-toggleable"> <div id="why-verify-supported" class="floating-toggleable">
......
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