-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #676 from visualapproach/master
dark mode
- Loading branch information
Showing
19 changed files
with
277 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,74 @@ | ||
|
||
function topNav() { | ||
var x = document.getElementById("topnav"); | ||
if (x.className === "topnav") { | ||
x.className += " responsive"; | ||
} else { | ||
x.className = "topnav"; | ||
} | ||
var x = document.getElementById("topnav"); | ||
if (x.className === "topnav") { | ||
x.className += " responsive"; | ||
} else { | ||
x.className = "topnav"; | ||
} | ||
} | ||
|
||
function togglePlainText(id) { | ||
var x = document.getElementById(id); | ||
if (x.type === "password") { | ||
x.type = "text"; | ||
} else { | ||
x.type = "password"; | ||
} | ||
var x = document.getElementById(id); | ||
if (x.type === "password") { | ||
x.type = "text"; | ||
} else { | ||
x.type = "password"; | ||
} | ||
} | ||
|
||
function validatePassword(id) { | ||
var x = document.getElementById(id); | ||
if (x.value == "<enter password>") { | ||
alert("Please enter a password to continue."); | ||
return false; | ||
} | ||
return true; | ||
var x = document.getElementById(id); | ||
if (x.value == "<enter password>") { | ||
alert("Please enter a password to continue."); | ||
return false; | ||
} | ||
return true; | ||
} | ||
|
||
// Function to update the displayed number | ||
function updateNumber(opt, parent) { | ||
var parentElement = parent.parentElement; | ||
var numDisplay = parentElement.querySelector(".numDisplay"); | ||
var number = parseInt(numDisplay.textContent); | ||
if (opt == "up") number += 1; | ||
if (opt == "dn") number -= 1; | ||
numDisplay.textContent = number; | ||
} | ||
|
||
function increaseNumber(id) { | ||
var x = document.getElementById(id); | ||
var val = Number(x.value); | ||
var max = x.max; | ||
if (max > val) { | ||
val += 1; | ||
x.value = val; | ||
} | ||
var x = document.getElementById(id); | ||
var val = Number(x.value); | ||
var max = x.max; | ||
if (max > val) { | ||
val += 1; | ||
x.value = val; | ||
} | ||
var opt = "up"; | ||
updateNumber(opt, x); | ||
} | ||
|
||
function decreaseNumber(id) { | ||
var x = document.getElementById(id); | ||
var val = Number(x.value); | ||
var min = x.min; | ||
if (min < val) { | ||
val -= 1; | ||
x.value = val; | ||
} | ||
var x = document.getElementById(id); | ||
var val = Number(x.value); | ||
var min = x.min; | ||
if (min < val) { | ||
val -= 1; | ||
x.value = val; | ||
} | ||
var opt = "dn"; | ||
updateNumber(opt, x); | ||
} | ||
|
||
function buttonConfirm(elem, text='', timeout=3, reset=true) | ||
{ | ||
var originalText = elem.innerHTML; | ||
function buttonConfirm(elem, text = "", timeout = 3, reset = true) { | ||
var originalText = elem.innerHTML; | ||
|
||
elem.innerHTML = (text == '' ? '✓' : text); | ||
elem.disabled = true; | ||
elem.innerHTML = text == "" ? "✓" : text; | ||
elem.disabled = true; | ||
|
||
if (reset) | ||
{ | ||
setTimeout(function(){ | ||
elem.innerHTML = originalText; | ||
elem.disabled = false; | ||
}, timeout*1000); | ||
} | ||
if (reset) { | ||
setTimeout(function () { | ||
elem.innerHTML = originalText; | ||
elem.disabled = false; | ||
}, timeout * 1000); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.