[Contesting] Restoring QSO table.

This commit is contained in:
Andreas
2020-12-28 19:55:51 +01:00
parent bccfa6762b
commit 9e790340d7
5 changed files with 141 additions and 31 deletions

View File

@@ -8,25 +8,12 @@ $( document ).ready(function() {
restoreContestSession();
});
// We are restoring the settings in the contest logging form here
function restoreContestSession() {
var contestname = localStorage.getItem("contestid");
if (contestname != null) {
$("#contestname").val(contestname);
}
var exchangetype = localStorage.getItem("exchangetype");
if (exchangetype == "other") {
$("[name=exchangeradio]").val(["other"]);
}
var exchangesent = localStorage.getItem("exchangesent");
if (exchangesent != null) {
$("#exch_sent").val(exchangesent);
}
// This erases the contest logging session which is stored in localStorage
function reset_contest_session() {
localStorage.removeItem("contestid");
localStorage.removeItem("exchangetype");
localStorage.removeItem("exchangesent");
localStorage.removeItem("qso");
}
// Storing the contestid in contest session