kopia lustrzana https://gitlab.com/gridtracker.org/gridtracker
Fixed award tracker
Includes reason and enables the wanted column as highlighting rules would be a messmerge-requests/203/head
rodzic
bc7ee6c55b
commit
9c876739e7
|
@ -2725,7 +2725,7 @@ function testAcont52band(award, obj, baseHash)
|
||||||
|
|
||||||
function scoreAgrids(award, obj)
|
function scoreAgrids(award, obj)
|
||||||
{
|
{
|
||||||
if (obj.grid)
|
if (obj.grid && obj.grid.length > 0)
|
||||||
{
|
{
|
||||||
let grid = obj.grid.substr(0, 4);
|
let grid = obj.grid.substr(0, 4);
|
||||||
|
|
||||||
|
@ -2747,6 +2747,10 @@ function testAgrids(award, obj, baseHash)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!obj.grid || obj.grid.length == 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -365,12 +365,8 @@ function processRosterFiltering(callRoster, rosterSettings)
|
||||||
let x = g_awardTracker[award];
|
let x = g_awardTracker[award];
|
||||||
|
|
||||||
// TODO: Move award reason out of exclusions code?
|
// TODO: Move award reason out of exclusions code?
|
||||||
callObj.awardReason =
|
callObj.awardReason = g_awards[x.sponsor].awards[x.name].tooltip + " (" + g_awards[x.sponsor].sponsor + ")";
|
||||||
g_awards[x.sponsor].awards[x.name].tooltip +
|
callObj.reason.push(x.name + " - " + x.sponsor);
|
||||||
" (" +
|
|
||||||
g_awards[x.sponsor].sponsor +
|
|
||||||
")";
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,7 +135,7 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
|
||||||
// We only do hunt highlighting when showing all entries
|
// We only do hunt highlighting when showing all entries
|
||||||
// This means "Callsigns: All Traffic", "Callsigns: All Traffic/Only Wanted" and "Logbook: Award Tracker"
|
// This means "Callsigns: All Traffic", "Callsigns: All Traffic/Only Wanted" and "Logbook: Award Tracker"
|
||||||
// There is no highlighting in other modes
|
// There is no highlighting in other modes
|
||||||
if (rosterSettings.callMode == "all")
|
if (rosterSettings.callMode == "all" && rosterSettings.isAwardTracker == false)
|
||||||
{
|
{
|
||||||
// Skip when "only new calls"
|
// Skip when "only new calls"
|
||||||
// Questions: Move to the first loop? Why only skip new calls in "all traffic" and not other modes?
|
// Questions: Move to the first loop? Why only skip new calls in "all traffic" and not other modes?
|
||||||
|
@ -165,27 +165,9 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
|
||||||
callObj.style.call = "class='dxCaller'";
|
callObj.style.call = "class='dxCaller'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// award tracker overrides
|
|
||||||
let awardTrackerOverrides = {
|
|
||||||
call: false,
|
|
||||||
grids: false,
|
|
||||||
dxcc: false,
|
|
||||||
states: false,
|
|
||||||
cnty: false,
|
|
||||||
cqz: false,
|
|
||||||
px: false,
|
|
||||||
cont: false
|
|
||||||
};
|
|
||||||
if (g_rosterSettings.reference == LOGBOOK_AWARD_TRACKER)
|
|
||||||
{
|
|
||||||
for (let key in awardTracker)
|
|
||||||
{
|
|
||||||
awardTrackerOverrides[awardTracker[key].rule.type] = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hunting for callsigns
|
// Hunting for callsigns
|
||||||
if (huntCallsign.checked || awardTrackerOverrides.call)
|
if (huntCallsign.checked)
|
||||||
{
|
{
|
||||||
let hash = callsign + workHashSuffix;
|
let hash = callsign + workHashSuffix;
|
||||||
let layeredHash = rosterSettings.layeredMode && (callsign + layeredHashSuffix)
|
let layeredHash = rosterSettings.layeredMode && (callsign + layeredHashSuffix)
|
||||||
|
@ -262,7 +244,7 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hunting for grids
|
// Hunting for grids
|
||||||
if ((huntGrid.checked || awardTrackerOverrides.grids) && callObj.grid.length > 1)
|
if (huntGrid.checked && callObj.grid.length > 1)
|
||||||
{
|
{
|
||||||
let hash = callObj.grid.substr(0, 4) + workHashSuffix;
|
let hash = callObj.grid.substr(0, 4) + workHashSuffix;
|
||||||
let layeredHash = rosterSettings.layeredMode && (callObj.grid.substr(0, 4) + layeredHashSuffix)
|
let layeredHash = rosterSettings.layeredMode && (callObj.grid.substr(0, 4) + layeredHashSuffix)
|
||||||
|
@ -312,7 +294,7 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hunting for DXCC
|
// Hunting for DXCC
|
||||||
if (huntDXCC.checked || awardTrackerOverrides.dxcc)
|
if (huntDXCC.checked)
|
||||||
{
|
{
|
||||||
let hash = String(callObj.dxcc) + workHashSuffix;
|
let hash = String(callObj.dxcc) + workHashSuffix;
|
||||||
let layeredHash = rosterSettings.layeredMode && (String(callObj.dxcc) + layeredHashSuffix)
|
let layeredHash = rosterSettings.layeredMode && (String(callObj.dxcc) + layeredHashSuffix)
|
||||||
|
@ -383,7 +365,7 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hunting for US States
|
// Hunting for US States
|
||||||
if ((huntState.checked || awardTrackerOverrides.states) && window.opener.g_callsignLookups.ulsUseEnable == true)
|
if (huntState.checked && window.opener.g_callsignLookups.ulsUseEnable == true)
|
||||||
{
|
{
|
||||||
let stateSearch = callObj.state;
|
let stateSearch = callObj.state;
|
||||||
let finalDxcc = callObj.dxcc;
|
let finalDxcc = callObj.dxcc;
|
||||||
|
@ -441,7 +423,7 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hunting for US Counties
|
// Hunting for US Counties
|
||||||
if ((huntCounty.checked || awardTrackerOverrides.cnty) && window.opener.g_callsignLookups.ulsUseEnable == true)
|
if (huntCounty.checked && window.opener.g_callsignLookups.ulsUseEnable == true)
|
||||||
{
|
{
|
||||||
let finalDxcc = callObj.dxcc;
|
let finalDxcc = callObj.dxcc;
|
||||||
if (
|
if (
|
||||||
|
@ -555,7 +537,7 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hunting for CQ Zones
|
// Hunting for CQ Zones
|
||||||
if (huntCQz.checked || awardTrackerOverrides.cqz)
|
if (huntCQz.checked)
|
||||||
{
|
{
|
||||||
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;
|
||||||
|
@ -696,7 +678,7 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hunting for WPX (Prefixes)
|
// Hunting for WPX (Prefixes)
|
||||||
if ((huntPX.checked || awardTrackerOverrides.px) && callObj.px)
|
if (huntPX.checked && callObj.px)
|
||||||
{
|
{
|
||||||
let hash = String(callObj.px) + workHashSuffix;
|
let hash = String(callObj.px) + workHashSuffix;
|
||||||
let layeredHash = rosterSettings.layeredMode && (String(callObj.px) + layeredHashSuffix)
|
let layeredHash = rosterSettings.layeredMode && (String(callObj.px) + layeredHashSuffix)
|
||||||
|
@ -746,7 +728,7 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hunting for Continents
|
// Hunting for Continents
|
||||||
if ((huntCont.checked || awardTrackerOverrides.cont) && callObj.cont)
|
if (huntCont.checked && callObj.cont)
|
||||||
{
|
{
|
||||||
let hash = String(callObj.cont) + workHashSuffix;
|
let hash = String(callObj.cont) + workHashSuffix;
|
||||||
let layeredHash = rosterSettings.layeredMode && (String(callObj.cont) + layeredHashSuffix)
|
let layeredHash = rosterSettings.layeredMode && (String(callObj.cont) + layeredHashSuffix)
|
||||||
|
|
|
@ -43,6 +43,10 @@ function renderRoster(callRoster, rosterSettings)
|
||||||
columnOverrides.POTA = false;
|
columnOverrides.POTA = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rosterSettings.isAwardTracker)
|
||||||
|
{
|
||||||
|
columnOverrides.Wanted = true;
|
||||||
|
}
|
||||||
// dealing with spots
|
// dealing with spots
|
||||||
if (g_rosterSettings.columns.Spot == true) onlySpotDiv.style.display = "";
|
if (g_rosterSettings.columns.Spot == true) onlySpotDiv.style.display = "";
|
||||||
else onlySpotDiv.style.display = "none";
|
else onlySpotDiv.style.display = "none";
|
||||||
|
|
|
@ -450,7 +450,19 @@ function wantedColumnParts(callObj, options)
|
||||||
{
|
{
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
if (!callObj.hunting) return [];
|
if (Object.keys(callObj.hunting).length == 0)
|
||||||
|
{
|
||||||
|
// is this an award reason?
|
||||||
|
// Hack until I talk with seb
|
||||||
|
if (callObj.awardReason != "Callsign")
|
||||||
|
{
|
||||||
|
return callObj.reason;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let parts = [];
|
let parts = [];
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue