kopia lustrzana https://gitlab.com/gridtracker.org/gridtracker
rodzic
1cf679098a
commit
21ebb3fb8c
|
@ -4,7 +4,7 @@
|
||||||
"AMTORFEC": false,
|
"AMTORFEC": false,
|
||||||
"AM": true,
|
"AM": true,
|
||||||
"ARDOP": false,
|
"ARDOP": false,
|
||||||
"ASCII": false,
|
"ASCI": false,
|
||||||
"ATV": false,
|
"ATV": false,
|
||||||
"BPSK31": false,
|
"BPSK31": false,
|
||||||
"BPSK63": false,
|
"BPSK63": false,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"AMTORFEC": true,
|
"AMTORFEC": true,
|
||||||
"AM": false,
|
"AM": false,
|
||||||
"ARDOP": true,
|
"ARDOP": true,
|
||||||
"ASCII": true,
|
"ASCI": true,
|
||||||
"ATV": false,
|
"ATV": false,
|
||||||
"BPSK31": true,
|
"BPSK31": true,
|
||||||
"BPSK63": true,
|
"BPSK63": true,
|
||||||
|
|
|
@ -249,14 +249,18 @@ function onAdiLoadComplete(adiBuffer, saveAdifFile, adifFileName, newFile)
|
||||||
{
|
{
|
||||||
isPhone = g_modes_phone[finalMode];
|
isPhone = g_modes_phone[finalMode];
|
||||||
}
|
}
|
||||||
|
// TODO: Revisit when we support more than one park ID
|
||||||
|
let finalPOTA = findAdiField(activeAdifArray[x], "POTA").toUpperCase();
|
||||||
|
if (finalPOTA.length == 0)
|
||||||
|
{
|
||||||
|
finalPOTA = null;
|
||||||
|
}
|
||||||
|
|
||||||
if (finalDXcall != "")
|
if (finalDXcall != "")
|
||||||
{
|
{
|
||||||
addDeDx(
|
addDeDx(
|
||||||
finalGrid,
|
finalGrid,
|
||||||
finalDXcall,
|
finalDXcall,
|
||||||
false,
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
finalDEcall,
|
finalDEcall,
|
||||||
finalRSTsent,
|
finalRSTsent,
|
||||||
finalTime,
|
finalTime,
|
||||||
|
@ -277,7 +281,8 @@ function onAdiLoadComplete(adiBuffer, saveAdifFile, adifFileName, newFile)
|
||||||
isDigital,
|
isDigital,
|
||||||
isPhone,
|
isPhone,
|
||||||
finalIOTA,
|
finalIOTA,
|
||||||
finalSatName
|
finalSatName,
|
||||||
|
finalPOTA
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -332,9 +337,6 @@ function onAdiLoadComplete(adiBuffer, saveAdifFile, adifFileName, newFile)
|
||||||
addDeDx(
|
addDeDx(
|
||||||
finalMyGrid,
|
finalMyGrid,
|
||||||
finalDEcall,
|
finalDEcall,
|
||||||
false,
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
finalDXcall,
|
finalDXcall,
|
||||||
null,
|
null,
|
||||||
finalTime,
|
finalTime,
|
||||||
|
@ -357,9 +359,6 @@ function onAdiLoadComplete(adiBuffer, saveAdifFile, adifFileName, newFile)
|
||||||
addDeDx(
|
addDeDx(
|
||||||
finalGrid,
|
finalGrid,
|
||||||
finalDXcall,
|
finalDXcall,
|
||||||
false,
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
"-",
|
"-",
|
||||||
finalRSTsent,
|
finalRSTsent,
|
||||||
finalTime,
|
finalTime,
|
||||||
|
@ -382,9 +381,6 @@ function onAdiLoadComplete(adiBuffer, saveAdifFile, adifFileName, newFile)
|
||||||
addDeDx(
|
addDeDx(
|
||||||
finalGrid,
|
finalGrid,
|
||||||
finalDXcall,
|
finalDXcall,
|
||||||
false,
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
finalDEcall,
|
finalDEcall,
|
||||||
finalRSTsent,
|
finalRSTsent,
|
||||||
finalTime,
|
finalTime,
|
||||||
|
@ -2795,7 +2791,7 @@ function getPostJSONBuffer(
|
||||||
});
|
});
|
||||||
req.on("error", function (err) // eslint-disable-line node/handle-callback-err
|
req.on("error", function (err) // eslint-disable-line node/handle-callback-err
|
||||||
{
|
{
|
||||||
if (typeof timeoutCallback != "undefined")
|
if (typeof timeoutCallback === "function")
|
||||||
{
|
{
|
||||||
timeoutCallback(
|
timeoutCallback(
|
||||||
file_url,
|
file_url,
|
||||||
|
|
|
@ -474,6 +474,7 @@ function initQSOdata()
|
||||||
g_tracker.worked.px = {};
|
g_tracker.worked.px = {};
|
||||||
g_tracker.worked.cnty = {};
|
g_tracker.worked.cnty = {};
|
||||||
g_tracker.worked.cont = {};
|
g_tracker.worked.cont = {};
|
||||||
|
g_tracker.worked.pota = {};
|
||||||
|
|
||||||
g_tracker.confirmed.band = {};
|
g_tracker.confirmed.band = {};
|
||||||
g_tracker.confirmed.call = {};
|
g_tracker.confirmed.call = {};
|
||||||
|
@ -485,6 +486,8 @@ function initQSOdata()
|
||||||
g_tracker.confirmed.px = {};
|
g_tracker.confirmed.px = {};
|
||||||
g_tracker.confirmed.cnty = {};
|
g_tracker.confirmed.cnty = {};
|
||||||
g_tracker.confirmed.cont = {};
|
g_tracker.confirmed.cont = {};
|
||||||
|
// Not referenced but included for consistency
|
||||||
|
g_tracker.confirmed.pota = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
var g_offlineLayer = null;
|
var g_offlineLayer = null;
|
||||||
|
@ -1054,9 +1057,6 @@ function isKnownCallsignUSplus(dxcc)
|
||||||
function addDeDx(
|
function addDeDx(
|
||||||
finalGrid,
|
finalGrid,
|
||||||
finalDXcall,
|
finalDXcall,
|
||||||
cq,
|
|
||||||
cqdx,
|
|
||||||
locked,
|
|
||||||
finalDEcall,
|
finalDEcall,
|
||||||
finalRSTsent,
|
finalRSTsent,
|
||||||
finalTime,
|
finalTime,
|
||||||
|
@ -1077,19 +1077,22 @@ function addDeDx(
|
||||||
finalDigital = false,
|
finalDigital = false,
|
||||||
finalPhone = false,
|
finalPhone = false,
|
||||||
finalIOTA = "",
|
finalIOTA = "",
|
||||||
finalSatName = ""
|
finalSatName = "",
|
||||||
|
finalPOTA = null
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
var currentYear = new Date().getFullYear();
|
var currentYear = new Date().getFullYear();
|
||||||
var qsoDate = new Date(1970, 0, 1); qsoDate.setSeconds(finalTime);
|
var qsoDate = new Date(1970, 0, 1); qsoDate.setSeconds(finalTime);
|
||||||
var isCurrentYear = (qsoDate.getFullYear() == currentYear);
|
var isCurrentYear = (qsoDate.getFullYear() == currentYear);
|
||||||
|
var dayAsString = String(parseInt(finalTime / 86400));
|
||||||
|
|
||||||
var callsign = null;
|
var callsign = null;
|
||||||
var rect = null;
|
var rect = null;
|
||||||
var worked = false;
|
var worked = false;
|
||||||
var didConfirm = false;
|
var didConfirm = false;
|
||||||
var wspr = mode == "WSPR" ? parseInt(band) * 2 : null;
|
var wspr = mode == "WSPR" ? parseInt(band) * 2 : null;
|
||||||
var hash = "";
|
var hash = "";
|
||||||
|
var locked = false;
|
||||||
|
|
||||||
var finalMsg = ifinalMsg.trim();
|
var finalMsg = ifinalMsg.trim();
|
||||||
if (finalMsg.length > 40) finalMsg = finalMsg.substring(0, 40) + "...";
|
if (finalMsg.length > 40) finalMsg = finalMsg.substring(0, 40) + "...";
|
||||||
|
@ -1130,6 +1133,7 @@ function addDeDx(
|
||||||
if (finalVucc.length > 0) details.vucc_grids = finalVucc;
|
if (finalVucc.length > 0) details.vucc_grids = finalVucc;
|
||||||
if (finalIOTA.length > 0) details.IOTA = finalIOTA;
|
if (finalIOTA.length > 0) details.IOTA = finalIOTA;
|
||||||
if (finalSatName.length > 0) details.satName = finalSatName;
|
if (finalSatName.length > 0) details.satName = finalSatName;
|
||||||
|
if (finalPOTA) details.POTA = finalPOTA;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1158,6 +1162,7 @@ function addDeDx(
|
||||||
details.phone = finalPhone;
|
details.phone = finalPhone;
|
||||||
details.IOTA = finalIOTA;
|
details.IOTA = finalIOTA;
|
||||||
details.satName = finalSatName;
|
details.satName = finalSatName;
|
||||||
|
details.pota = finalPOTA;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (finalDxcc < 1) finalDxcc = callsignToDxcc(finalDXcall);
|
if (finalDxcc < 1) finalDxcc = callsignToDxcc(finalDXcall);
|
||||||
|
@ -1306,6 +1311,7 @@ function addDeDx(
|
||||||
if (details.px)
|
if (details.px)
|
||||||
{
|
{
|
||||||
g_tracker.worked.px[details.px + band + mode] = true;
|
g_tracker.worked.px[details.px + band + mode] = true;
|
||||||
|
// store the last one
|
||||||
g_tracker.worked.px[details.px] = hash;
|
g_tracker.worked.px[details.px] = hash;
|
||||||
g_tracker.worked.px[details.px + mode] = true;
|
g_tracker.worked.px[details.px + mode] = true;
|
||||||
g_tracker.worked.px[details.px + band] = true;
|
g_tracker.worked.px[details.px + band] = true;
|
||||||
|
@ -1324,6 +1330,7 @@ function addDeDx(
|
||||||
if (details.cont)
|
if (details.cont)
|
||||||
{
|
{
|
||||||
g_tracker.worked.cont[details.cont + band + mode] = true;
|
g_tracker.worked.cont[details.cont + band + mode] = true;
|
||||||
|
// store the last one
|
||||||
g_tracker.worked.cont[details.cont] = hash;
|
g_tracker.worked.cont[details.cont] = hash;
|
||||||
g_tracker.worked.cont[details.cont + mode] = true;
|
g_tracker.worked.cont[details.cont + mode] = true;
|
||||||
g_tracker.worked.cont[details.cont + band] = true;
|
g_tracker.worked.cont[details.cont + band] = true;
|
||||||
|
@ -1339,6 +1346,24 @@ function addDeDx(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (finalPOTA)
|
||||||
|
{
|
||||||
|
g_tracker.worked.pota[dayAsString + finalDXcall + finalPOTA] = true;
|
||||||
|
g_tracker.worked.pota[dayAsString + finalDXcall + finalPOTA + mode] = true;
|
||||||
|
g_tracker.worked.pota[dayAsString + finalDXcall + finalPOTA + band] = true;
|
||||||
|
g_tracker.worked.pota[dayAsString + finalDXcall + finalPOTA + band + mode] = true;
|
||||||
|
if (isDigi == true)
|
||||||
|
{
|
||||||
|
g_tracker.worked.pota[dayAsString + finalDXcall + finalPOTA + "dg"] = true;
|
||||||
|
g_tracker.worked.pota[dayAsString + finalDXcall + finalPOTA + band + "dg"] = true;
|
||||||
|
}
|
||||||
|
if (isPhone == true)
|
||||||
|
{
|
||||||
|
g_tracker.worked.pota[dayAsString + finalDXcall + finalPOTA + "ph"] = true;
|
||||||
|
g_tracker.worked.pota[dayAsString + finalDXcall + finalPOTA + band + "ph"] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
worked = true;
|
worked = true;
|
||||||
locked = true;
|
locked = true;
|
||||||
details.worked = worked;
|
details.worked = worked;
|
||||||
|
@ -1415,6 +1440,7 @@ function addDeDx(
|
||||||
if (details.px)
|
if (details.px)
|
||||||
{
|
{
|
||||||
g_tracker.confirmed.px[details.px + band + mode] = true;
|
g_tracker.confirmed.px[details.px + band + mode] = true;
|
||||||
|
// store the last one
|
||||||
g_tracker.confirmed.px[details.px] = hash;
|
g_tracker.confirmed.px[details.px] = hash;
|
||||||
g_tracker.confirmed.px[details.px + mode] = true;
|
g_tracker.confirmed.px[details.px + mode] = true;
|
||||||
g_tracker.confirmed.px[details.px + band] = true;
|
g_tracker.confirmed.px[details.px + band] = true;
|
||||||
|
@ -1428,6 +1454,7 @@ function addDeDx(
|
||||||
if (details.cont)
|
if (details.cont)
|
||||||
{
|
{
|
||||||
g_tracker.confirmed.cont[details.cont + band + mode] = true;
|
g_tracker.confirmed.cont[details.cont + band + mode] = true;
|
||||||
|
// store the last one
|
||||||
g_tracker.confirmed.cont[details.cont] = hash;
|
g_tracker.confirmed.cont[details.cont] = hash;
|
||||||
g_tracker.confirmed.cont[details.cont + mode] = true;
|
g_tracker.confirmed.cont[details.cont + mode] = true;
|
||||||
g_tracker.confirmed.cont[details.cont + band] = true;
|
g_tracker.confirmed.cont[details.cont + band] = true;
|
||||||
|
@ -1438,6 +1465,20 @@ function addDeDx(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// we don't need confirmations, worked is enough
|
||||||
|
/* if (finalPOTA)
|
||||||
|
{
|
||||||
|
g_tracker.confirmed.pota[dayAsString + finalDXcall + finalPOTA] = true;
|
||||||
|
g_tracker.confirmed.pota[dayAsString + finalDXcall + finalPOTA + mode] = true;
|
||||||
|
g_tracker.confirmed.pota[dayAsString + finalDXcall + finalPOTA + band] = true;
|
||||||
|
g_tracker.confirmed.pota[dayAsString + finalDXcall + finalPOTA + band + mode] = true;
|
||||||
|
if (isDigi == true)
|
||||||
|
{
|
||||||
|
g_tracker.confirmed.pota[dayAsString + finalDXcall + finalPOTA + "dg"] = true;
|
||||||
|
g_tracker.confirmed.pota[dayAsString + finalDXcall + finalPOTA + band + "dg"] = true;
|
||||||
|
}
|
||||||
|
} */
|
||||||
|
|
||||||
g_tracker.confirmed.call[finalDXcall + band + mode] = true;
|
g_tracker.confirmed.call[finalDXcall + band + mode] = true;
|
||||||
g_tracker.confirmed.call[finalDXcall] = true;
|
g_tracker.confirmed.call[finalDXcall] = true;
|
||||||
g_tracker.confirmed.call[finalDXcall + mode] = true;
|
g_tracker.confirmed.call[finalDXcall + mode] = true;
|
||||||
|
@ -1466,8 +1507,6 @@ function addDeDx(
|
||||||
details.rect = qthToQsoBox(
|
details.rect = qthToQsoBox(
|
||||||
finalGrid,
|
finalGrid,
|
||||||
hash,
|
hash,
|
||||||
cq,
|
|
||||||
cqdx,
|
|
||||||
locked,
|
locked,
|
||||||
finalDEcall,
|
finalDEcall,
|
||||||
worked,
|
worked,
|
||||||
|
@ -1488,8 +1527,7 @@ function addDeDx(
|
||||||
rect = qthToBox(
|
rect = qthToBox(
|
||||||
finalGrid,
|
finalGrid,
|
||||||
finalDXcall,
|
finalDXcall,
|
||||||
cq,
|
false,
|
||||||
cqdx,
|
|
||||||
locked,
|
locked,
|
||||||
finalDEcall,
|
finalDEcall,
|
||||||
band,
|
band,
|
||||||
|
@ -4156,8 +4194,6 @@ function iconFeature(center, iconObj, zIndex)
|
||||||
function qthToQsoBox(
|
function qthToQsoBox(
|
||||||
iQTH,
|
iQTH,
|
||||||
iHash,
|
iHash,
|
||||||
iCQ,
|
|
||||||
iNew,
|
|
||||||
locked,
|
locked,
|
||||||
DE,
|
DE,
|
||||||
worked,
|
worked,
|
||||||
|
@ -4340,7 +4376,7 @@ function qthToQsoBox(
|
||||||
return returnRectangle;
|
return returnRectangle;
|
||||||
}
|
}
|
||||||
|
|
||||||
function qthToBox(iQTH, iDEcallsign, iCQ, iNew, locked, DE, band, wspr, hash)
|
function qthToBox(iQTH, iDEcallsign, iCQ, locked, DE, band, wspr, hash)
|
||||||
{
|
{
|
||||||
if (g_appSettings.gridViewMode == 2) return null;
|
if (g_appSettings.gridViewMode == 2) return null;
|
||||||
|
|
||||||
|
@ -6045,7 +6081,6 @@ function setHomeGridsquare()
|
||||||
myDEGrid,
|
myDEGrid,
|
||||||
myDEcall,
|
myDEcall,
|
||||||
false,
|
false,
|
||||||
false,
|
|
||||||
true,
|
true,
|
||||||
"",
|
"",
|
||||||
myBand,
|
myBand,
|
||||||
|
@ -6963,7 +6998,6 @@ function handleWsjtxDecode(newMessage)
|
||||||
theirQTH,
|
theirQTH,
|
||||||
msgDEcallsign,
|
msgDEcallsign,
|
||||||
CQ,
|
CQ,
|
||||||
newMessage.NW,
|
|
||||||
false,
|
false,
|
||||||
msgDXcallsign,
|
msgDXcallsign,
|
||||||
newMessage.OB,
|
newMessage.OB,
|
||||||
|
@ -7080,7 +7114,6 @@ function handleWsjtxDecode(newMessage)
|
||||||
theirQTH,
|
theirQTH,
|
||||||
msgDEcallsign,
|
msgDEcallsign,
|
||||||
CQ,
|
CQ,
|
||||||
newMessage.NW,
|
|
||||||
false,
|
false,
|
||||||
msgDXcallsign,
|
msgDXcallsign,
|
||||||
newMessage.OB,
|
newMessage.OB,
|
||||||
|
@ -10530,8 +10563,6 @@ function redrawGrids()
|
||||||
g_QSOhash[i].grid,
|
g_QSOhash[i].grid,
|
||||||
i,
|
i,
|
||||||
false,
|
false,
|
||||||
false,
|
|
||||||
false,
|
|
||||||
g_QSOhash[i].DXcall,
|
g_QSOhash[i].DXcall,
|
||||||
g_QSOhash[i].worked,
|
g_QSOhash[i].worked,
|
||||||
g_QSOhash[i].confirmed,
|
g_QSOhash[i].confirmed,
|
||||||
|
@ -10544,8 +10575,6 @@ function redrawGrids()
|
||||||
g_QSOhash[i].vucc_grids[vucc],
|
g_QSOhash[i].vucc_grids[vucc],
|
||||||
i,
|
i,
|
||||||
false,
|
false,
|
||||||
false,
|
|
||||||
false,
|
|
||||||
g_QSOhash[i].DXcall,
|
g_QSOhash[i].DXcall,
|
||||||
g_QSOhash[i].worked,
|
g_QSOhash[i].worked,
|
||||||
g_QSOhash[i].confirmed,
|
g_QSOhash[i].confirmed,
|
||||||
|
@ -10918,7 +10947,6 @@ function redrawGrids()
|
||||||
g_liveCallsigns[i].DEcall,
|
g_liveCallsigns[i].DEcall,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
|
||||||
g_liveCallsigns[i].DXcall,
|
g_liveCallsigns[i].DXcall,
|
||||||
g_liveCallsigns[i].band,
|
g_liveCallsigns[i].band,
|
||||||
g_liveCallsigns[i].wspr,
|
g_liveCallsigns[i].wspr,
|
||||||
|
|
|
@ -21,6 +21,7 @@ var r_currentDXCCs = -1;
|
||||||
var r_callsignManifest = null;
|
var r_callsignManifest = null;
|
||||||
var g_rosterSettings = {};
|
var g_rosterSettings = {};
|
||||||
var g_day = 0;
|
var g_day = 0;
|
||||||
|
var g_dayAsString = "0";
|
||||||
var g_menu = null;
|
var g_menu = null;
|
||||||
var g_callMenu = null;
|
var g_callMenu = null;
|
||||||
var g_ageMenu = null;
|
var g_ageMenu = null;
|
||||||
|
@ -335,12 +336,13 @@ function viewRoster()
|
||||||
function realtimeRoster()
|
function realtimeRoster()
|
||||||
{
|
{
|
||||||
let now = timeNowSec();
|
let now = timeNowSec();
|
||||||
g_day = now / 86400;
|
g_day = parseInt(now / 86400);
|
||||||
|
g_dayAsString = String(g_day);
|
||||||
|
|
||||||
if (g_rosterSettings.realtime == false) return;
|
if (g_rosterSettings.realtime == false) return;
|
||||||
|
|
||||||
let timeCols = document.getElementsByClassName("timeCol");
|
let timeCols = document.getElementsByClassName("timeCol");
|
||||||
for (let x in timeCols)
|
for (const x in timeCols)
|
||||||
{
|
{
|
||||||
if ((typeof timeCols[x].id != "undefined") && (typeof callRoster[timeCols[x].id.substr(2)] != "undefined"))
|
if ((typeof timeCols[x].id != "undefined") && (typeof callRoster[timeCols[x].id.substr(2)] != "undefined"))
|
||||||
{
|
{
|
||||||
|
@ -349,7 +351,7 @@ function realtimeRoster()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let lifeCols = document.getElementsByClassName("lifeCol");
|
let lifeCols = document.getElementsByClassName("lifeCol");
|
||||||
for (let x in lifeCols)
|
for (const x in lifeCols)
|
||||||
{
|
{
|
||||||
if ((typeof lifeCols[x].id != "undefined") && (typeof callRoster[lifeCols[x].id.substr(2)] != "undefined"))
|
if ((typeof lifeCols[x].id != "undefined") && (typeof callRoster[lifeCols[x].id.substr(2)] != "undefined"))
|
||||||
{
|
{
|
||||||
|
@ -360,7 +362,7 @@ function realtimeRoster()
|
||||||
if (g_rosterSettings.columns.Spot)
|
if (g_rosterSettings.columns.Spot)
|
||||||
{
|
{
|
||||||
let spotCols = document.getElementsByClassName("spotCol");
|
let spotCols = document.getElementsByClassName("spotCol");
|
||||||
for (let x in spotCols)
|
for (const x in spotCols)
|
||||||
{
|
{
|
||||||
if ((typeof spotCols[x].id != "undefined") && (typeof callRoster[spotCols[x].id.substr(2)] != "undefined"))
|
if ((typeof spotCols[x].id != "undefined") && (typeof callRoster[spotCols[x].id.substr(2)] != "undefined"))
|
||||||
{
|
{
|
||||||
|
@ -450,7 +452,7 @@ function updateInstances()
|
||||||
let worker = "";
|
let worker = "";
|
||||||
|
|
||||||
let keys = Object.keys(instances).sort();
|
let keys = Object.keys(instances).sort();
|
||||||
for (let key in keys)
|
for (const key in keys)
|
||||||
{
|
{
|
||||||
let inst = keys[key];
|
let inst = keys[key];
|
||||||
let sp = inst.split(" - ");
|
let sp = inst.split(" - ");
|
||||||
|
@ -546,7 +548,7 @@ function createSelectOptions(
|
||||||
{
|
{
|
||||||
obj = Object.keys(forObject).sort();
|
obj = Object.keys(forObject).sort();
|
||||||
}
|
}
|
||||||
for (let k in obj)
|
for (const k in obj)
|
||||||
{
|
{
|
||||||
let opt = obj[k];
|
let opt = obj[k];
|
||||||
let option = document.createElement("option");
|
let option = document.createElement("option");
|
||||||
|
@ -624,7 +626,7 @@ function updateAwardList(target = null)
|
||||||
|
|
||||||
let keys = Object.keys(g_awardTracker).sort();
|
let keys = Object.keys(g_awardTracker).sort();
|
||||||
|
|
||||||
for (let key in keys)
|
for (const key in keys)
|
||||||
{
|
{
|
||||||
let award = g_awardTracker[keys[key]];
|
let award = g_awardTracker[keys[key]];
|
||||||
let rule = g_awards[award.sponsor].awards[award.name].rule;
|
let rule = g_awards[award.sponsor].awards[award.name].rule;
|
||||||
|
@ -1012,7 +1014,7 @@ function wantedChanged(element)
|
||||||
{
|
{
|
||||||
g_rosterSettings.columns[t] = true;
|
g_rosterSettings.columns[t] = true;
|
||||||
|
|
||||||
for (let i = 0; i < g_menu.items.length; ++i)
|
for (const i in g_menu.items)
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
typeof g_menu.items[i].checked != "undefined" &&
|
typeof g_menu.items[i].checked != "undefined" &&
|
||||||
|
@ -1026,7 +1028,7 @@ function wantedChanged(element)
|
||||||
writeRosterSettings();
|
writeRosterSettings();
|
||||||
|
|
||||||
g_scriptReport = Object();
|
g_scriptReport = Object();
|
||||||
for (let callHash in window.opener.g_callRoster)
|
for (const callHash in window.opener.g_callRoster)
|
||||||
{
|
{
|
||||||
window.opener.g_callRoster[callHash].callObj.alerted = false;
|
window.opener.g_callRoster[callHash].callObj.alerted = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,6 +74,7 @@ function prepareRosterSettings()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
console.log("Invalid/Unknown huntNeed");
|
||||||
rosterSettings.huntIndex = false;
|
rosterSettings.huntIndex = false;
|
||||||
rosterSettings.workedIndex = false;
|
rosterSettings.workedIndex = false;
|
||||||
rosterSettings.layeredMode = false;
|
rosterSettings.layeredMode = false;
|
||||||
|
|
|
@ -20,7 +20,7 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
|
||||||
// so maybe we can move this loop first, and add a check to the filtering loop?
|
// so maybe we can move this loop first, and add a check to the filtering loop?
|
||||||
|
|
||||||
// Second loop, hunting and highlighting
|
// Second loop, hunting and highlighting
|
||||||
for (let callHash in callRoster)
|
for (const callHash in callRoster)
|
||||||
{
|
{
|
||||||
let entry = callRoster[callHash];
|
let entry = callRoster[callHash];
|
||||||
let callObj = entry.callObj;
|
let callObj = entry.callObj;
|
||||||
|
@ -440,7 +440,7 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
|
||||||
{
|
{
|
||||||
let counties = window.opener.g_zipToCounty[callObj.zipcode];
|
let counties = window.opener.g_zipToCounty[callObj.zipcode];
|
||||||
let foundHit = false;
|
let foundHit = false;
|
||||||
for (let cnt in counties)
|
for (const cnt in counties)
|
||||||
{
|
{
|
||||||
let hh = counties[cnt] + workHash;
|
let hh = counties[cnt] + workHash;
|
||||||
callObj.cnty = counties[cnt];
|
callObj.cnty = counties[cnt];
|
||||||
|
@ -481,58 +481,22 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
|
||||||
if (potaEnabled && huntPOTA.checked == true && callObj.pota.length > 0)
|
if (potaEnabled && huntPOTA.checked == true && callObj.pota.length > 0)
|
||||||
{
|
{
|
||||||
let huntTotal = callObj.pota.length;
|
let huntTotal = callObj.pota.length;
|
||||||
let huntFound = 0, layeredFound = 0, workedFound = 0, layeredWorkedFound = 0;
|
let workedFound = 0;
|
||||||
|
|
||||||
for (index in callObj.pota)
|
for (const index in callObj.pota)
|
||||||
{
|
{
|
||||||
let hash = callObj.pota[index] + workHashSuffix;
|
let hash = g_dayAsString + callsign + callObj.pota[index] + (rosterSettings.layeredMode ? layeredHashSuffix : workHashSuffix);
|
||||||
let layeredHash = rosterSettings.layeredMode && (callObj.pota[index] + layeredHashSuffix)
|
|
||||||
|
|
||||||
// if (rosterSettings.huntIndex && hash in rosterSettings.huntIndex.pota) layeredFound++;
|
if (rosterSettings.workedIndex && hash in rosterSettings.workedIndex.pota) workedFound++;
|
||||||
// if (rosterSettings.layeredMode && layeredHash in rosterSettings.huntIndex.pota) layeredFound++;
|
|
||||||
// if (rosterSettings.workedIndex && hash in rosterSettings.workedIndex.pota) workedFound++;
|
|
||||||
// if (rosterSettings.layeredMode && layeredHash in rosterSettings.workedIndex.pota) layeredWorkedFound++;
|
|
||||||
}
|
}
|
||||||
if (huntFound != huntTotal)
|
if (workedFound != huntTotal)
|
||||||
{
|
{
|
||||||
shouldAlert = true;
|
shouldAlert = true;
|
||||||
callObj.reason.push("pota");
|
callObj.reason.push("pota");
|
||||||
|
|
||||||
if (rosterSettings.workedIndex && workedFound == huntTotal)
|
callObj.hunting.pota = "hunted";
|
||||||
{
|
potaBg = `${pota}${inversionAlpha};`;
|
||||||
if (rosterSettings.layeredMode && layeredFound == huntTotal)
|
pota = bold;
|
||||||
{
|
|
||||||
callObj.hunting.pota = "worked-and-mixed";
|
|
||||||
potaConf = `${layeredUnconf}${pota}${layeredUnconfAlpha};`;
|
|
||||||
potaBg = `${potaBg}${layeredInversionAlpha}`;
|
|
||||||
pota = bold;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
callObj.hunting.pota = "worked";
|
|
||||||
potaConf = `${unconf}${pota}${inversionAlpha};`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (rosterSettings.layeredMode && layeredFound == huntTotal)
|
|
||||||
{
|
|
||||||
callObj.hunting.pota = "mixed";
|
|
||||||
potaBg = `${pota}${layeredAlpha};`;
|
|
||||||
pota = bold;
|
|
||||||
}
|
|
||||||
else if (rosterSettings.layeredMode && layeredWorkedFound == huntTotal)
|
|
||||||
{
|
|
||||||
callObj.hunting.pota = "mixed-worked";
|
|
||||||
potaConf = `${unconf}${pota}${layeredAlpha};`;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
callObj.hunting.pota = "hunted";
|
|
||||||
potaBg = `${pota}${inversionAlpha};`;
|
|
||||||
pota = bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -542,7 +506,7 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
|
||||||
let huntTotal = callObj.cqza.length;
|
let huntTotal = callObj.cqza.length;
|
||||||
let huntFound = 0, layeredFound = 0, workedFound = 0, layeredWorkedFound = 0, marathonFound = 0;
|
let huntFound = 0, layeredFound = 0, workedFound = 0, layeredWorkedFound = 0, marathonFound = 0;
|
||||||
|
|
||||||
for (index in callObj.cqza)
|
for (const index in callObj.cqza)
|
||||||
{
|
{
|
||||||
let hash = callObj.cqza[index] + workHashSuffix;
|
let hash = callObj.cqza[index] + workHashSuffix;
|
||||||
let layeredHash = rosterSettings.layeredMode && (callObj.cqza[index] + layeredHashSuffix);
|
let layeredHash = rosterSettings.layeredMode && (callObj.cqza[index] + layeredHashSuffix);
|
||||||
|
@ -600,7 +564,7 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
callObj.cqzSuffix = null
|
callObj.cqzSuffix = null;
|
||||||
if (huntMarathon.checked && callObj.hunting.cqz != "hunted" && callObj.hunting.cqz != "worked")
|
if (huntMarathon.checked && callObj.hunting.cqz != "hunted" && callObj.hunting.cqz != "worked")
|
||||||
{
|
{
|
||||||
if (marathonFound != huntTotal)
|
if (marathonFound != huntTotal)
|
||||||
|
@ -624,7 +588,7 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
|
||||||
let huntTotal = callObj.ituza.length;
|
let huntTotal = callObj.ituza.length;
|
||||||
let huntFound = 0, layeredFound = 0, workedFound = 0, layeredWorkedFound = 0;
|
let huntFound = 0, layeredFound = 0, workedFound = 0, layeredWorkedFound = 0;
|
||||||
|
|
||||||
for (index in callObj.ituza)
|
for (const index in callObj.ituza)
|
||||||
{
|
{
|
||||||
let hash = callObj.ituza[index] + workHashSuffix;
|
let hash = callObj.ituza[index] + workHashSuffix;
|
||||||
let layeredHash = rosterSettings.layeredMode && (callObj.ituza[index] + layeredHashSuffix)
|
let layeredHash = rosterSettings.layeredMode && (callObj.ituza[index] + layeredHashSuffix)
|
||||||
|
|
Ładowanie…
Reference in New Issue