Import vendor v.1.20.0903

Canadian-Provinces-Territories-Award-Layer v1.20.0903
Paul Traina 2020-09-04 16:14:05 -07:00
rodzic 7a90892d68
commit 07a60fe544
14 zmienionych plików z 261 dodań i 67 usunięć

Wyświetl plik

@ -20,6 +20,7 @@
<script src="./lib/shadow.js" type="text/javascript"></script> <script src="./lib/shadow.js" type="text/javascript"></script>
<script src="./lib/gtws.js" type="text/javascript"></script> <script src="./lib/gtws.js" type="text/javascript"></script>
<script src="./lib/gt.js" type="text/javascript"></script> <script src="./lib/gt.js" type="text/javascript"></script>
<script src="./lib/screens.js"></script>
</head> </head>
<body id='mainBody' onload="init();" > <body id='mainBody' onload="init();" >
<div id="startupDiv"> <div id="startupDiv">

Wyświetl plik

@ -38,6 +38,7 @@ document.body.addEventListener('contextmenu', function(ev) {
}); });
</script> </script>
<script src="./lib/screens.js"></script>
</head> </head>
<body id='mainBody' style="-webkit-app-region:drag;margin:0px;right:0px;left:0px;bottom:0px;top:0px;display:block;background-color:#000000FF;padding:0px;text-align:center;vertical-align:middle;position:absolute;z-index:600;" oncontextmenu="window.opener.showBaWindow(false)" > <body id='mainBody' style="-webkit-app-region:drag;margin:0px;right:0px;left:0px;bottom:0px;top:0px;display:block;background-color:#000000FF;padding:0px;text-align:center;vertical-align:middle;position:absolute;z-index:600;" oncontextmenu="window.opener.showBaWindow(false)" >

Wyświetl plik

@ -106,6 +106,7 @@ tr:hover td{ box-shadow: inset 0px 11px 6px -8px #888,
</style> </style>
<script src="./lib/protos.js" type="text/javascript" ></script> <script src="./lib/protos.js" type="text/javascript" ></script>
<script src="./lib/third-party.js" type="text/javascript" ></script> <script src="./lib/third-party.js" type="text/javascript" ></script>
<script src="./lib/screens.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var g_rosterSettings = null; var g_rosterSettings = null;
@ -212,6 +213,7 @@ function init()
} }
showAllCallsigns(); showAllCallsigns();
document.addEventListener('keydown', onMyKeyDown, false);
} }
@ -349,7 +351,7 @@ function showAllCallsigns()
} }
} }
if ( typeof allCallTable.childNodes != "undefined" ) if ( typeof allCallTable.childNodes != "undefined" && 0 in allCallTable.childNodes )
{ {
for ( var x = 0; x < allCallTable.childNodes[0].rows.length; x++ ) for ( var x = 0; x < allCallTable.childNodes[0].rows.length; x++ )
{ {
@ -607,6 +609,35 @@ function doLookup(what )
window.opener.startLookup(what,""); window.opener.startLookup(what,"");
} }
var g_hotKeys = { "NumpadSubtract":reduceFont , "Minus":reduceFont , "NumpadAdd":increaseFont, "Equal":increaseFont, "Numpad0":resetFont , "Digit0":resetFont };
function onMyKeyDown(event)
{
if ( event.ctrlKey )
{
if ( event.code in g_hotKeys )
{
g_hotKeys[event.code]();
}
}
}
function reduceFont()
{
nw.Window.get().zoomLevel-=0.1;
}
function increaseFont()
{
nw.Window.get().zoomLevel+=0.1;
}
function resetFont()
{
nw.Window.get().zoomLevel = 0;
}
</script> </script>
</head> </head>
<body onLoad="init();" style="height:100%;width:100%" onresize="Resize();" > <body onLoad="init();" style="height:100%;width:100%" onresize="Resize();" >

Wyświetl plik

@ -128,6 +128,7 @@ function onMyKeyDown(event)
window.opener.onMyKeyDown(event); window.opener.onMyKeyDown(event);
} }
</script> </script>
<script src="./lib/screens.js"></script>
</head> </head>
<body style="margin:0;top:3px" onload="init();" > <body style="margin:0;top:3px" onload="init();" >
<div id="main" style="margin:0;top:0;min-height:60px;width:auto;background-color:black;padding:0px;text-align:center;vertical-align:middle;position:relative;white-space:nowrap;overflow:hidden;" > <div id="main" style="margin:0;top:0;min-height:60px;width:auto;background-color:black;padding:0px;text-align:center;vertical-align:middle;position:relative;white-space:nowrap;overflow:hidden;" >

Wyświetl plik

@ -5,6 +5,7 @@
<title>GridTracker Callsign Lookup</title> <title>GridTracker Callsign Lookup</title>
<link rel="stylesheet" href="./lib/style.css"/> <link rel="stylesheet" href="./lib/style.css"/>
<script src="./lib/protos.js" type="text/javascript" ></script> <script src="./lib/protos.js" type="text/javascript" ></script>
<script src="./lib/screens.js"></script>
<script> <script>
var g_isShowing = true; var g_isShowing = true;
@ -72,6 +73,7 @@ function validateCallByElement( elementString )
function init() function init()
{ {
ValidateCallsign(lookupCallsignInput, null); ValidateCallsign(lookupCallsignInput, null);
document.addEventListener('keydown', onMyKeyDown, false);
} }
function addTextToClipboard(data) function addTextToClipboard(data)
@ -91,6 +93,36 @@ function Resize()
{ {
lookupBoxDiv.style.height = (window.innerHeight) + "px" ; lookupBoxDiv.style.height = (window.innerHeight) + "px" ;
} }
var g_hotKeys = { "NumpadSubtract":reduceFont , "Minus":reduceFont , "NumpadAdd":increaseFont, "Equal":increaseFont, "Numpad0":resetFont , "Digit0":resetFont };
function onMyKeyDown(event)
{
if ( event.ctrlKey )
{
if ( event.code in g_hotKeys )
{
g_hotKeys[event.code]();
}
}
}
function reduceFont()
{
nw.Window.get().zoomLevel-=0.1;
}
function increaseFont()
{
nw.Window.get().zoomLevel+=0.1;
}
function resetFont()
{
nw.Window.get().zoomLevel = 0;
}
</script> </script>
</head> </head>

Wyświetl plik

@ -56,6 +56,7 @@ document.oncontextmenu = function() {
} }
</script> </script>
<script src="./lib/screens.js"></script>
</head> </head>
<body id="mainBody" onload="init();" > <body id="mainBody" onload="init();" >
<div id="main" style="margin:0;top:0;min-height:60px;width:auto;background-color:black;padding:2px;text-align:center;vertical-align:middle;position:relative;white-space:nowrap;overflow:hidden;" > <div id="main" style="margin:0;top:0;min-height:60px;width:auto;background-color:black;padding:2px;text-align:center;vertical-align:middle;position:relative;white-space:nowrap;overflow:hidden;" >

Wyświetl plik

@ -7,6 +7,7 @@
<script src="./lib/protos.js" type="text/javascript" ></script> <script src="./lib/protos.js" type="text/javascript" ></script>
<script src="./lib/third-party.js" type="text/javascript" ></script> <script src="./lib/third-party.js" type="text/javascript" ></script>
<script src="./lib/roster.js" type="text/javascript" ></script> <script src="./lib/roster.js" type="text/javascript" ></script>
<script src="./lib/screens.js"></script>
</head> </head>
<body onload="init();" onresize="resize();"> <body onload="init();" onresize="resize();">
<div id="main" style="margin:0px;top:0;left:0;width:100%;background-color:black;position:absolute;white-space:nowrap;overflow:auto;" > <div id="main" style="margin:0px;top:0;left:0;width:100%;background-color:black;position:absolute;white-space:nowrap;overflow:auto;" >
@ -47,7 +48,7 @@
<option value="worked">New</option> <option value="worked">New</option>
<option value="confirmed">New+Unconfirmed</option> <option value="confirmed">New+Unconfirmed</option>
<option value="all">All Traffic</option> <option value="all">All Traffic</option>
<option value="hits">All Traffic (Only Hits)</option> <option value="hits">All Traffic/Only Wanted</option>
</select> </select>
</td> </td>
</tr> </tr>

Wyświetl plik

@ -6,6 +6,7 @@
<link rel="stylesheet" href="./lib/style.css"/> <link rel="stylesheet" href="./lib/style.css"/>
<script src="./lib/protos.js" type="text/javascript" ></script> <script src="./lib/protos.js" type="text/javascript" ></script>
<script src="./lib/stats.js"></script> <script src="./lib/stats.js"></script>
<script src="./lib/screens.js"></script>
</head> </head>
<body id='mainBody' onresize="Resize();" onload="init();" > <body id='mainBody' onresize="Resize();" onload="init();" >

Wyświetl plik

@ -1,5 +1,5 @@
<center> <center>
<img src="./img/grid-overlay.svg" width="150px"> <img src="./img/energy-star.svg" width="100px">
<font size="larger"> <font size="larger">
<p> <p>
<b>This is a bug fix and look-and-feel update.</b><p> <b>This is a bug fix and look-and-feel update.</b><p>
@ -14,24 +14,30 @@ Here is a link to our Discord server. <a href="https://discord.gg/j9Cv9XU" targe
</center> </center>
<pre> <pre>
Fixes: Fixes:
QSO Log Event: Right-click on empty grid flickering
When a QSO was completed in WSJT-X:
the map was not updating with the new QSO data
fixed again
Lookups:
Open lookup window on transmit working properly when enabled
fixed again
Close Lookup window after QSO working correctly
US Callsign Database:
truncation of incomplete loads due to program restart, revisted
630m band properly recognized and added to "Band Activity Graph"
Update: Update:
"All Grid Overlay" hotkey "B" has a new panel button Call Roster:
Band and Mode columns added to the right-click menu
when enabled columns remain sticky
when not enabled columns appear automatically as needed
US Counties:
Counties are "best guess" based on the zipcode of the station
the roster will rotate in unworked then unconfirmed counties as needed
until I can get a database of US Callsigns with county info
Window(s):
For "Energy Star" complaint monitors that shutdown to save power
position of window(s) restored on return of display
does not work if you close GridTracker when a display is off
Lookups:
Added "DXCC" worked/confirmed status by band below last "QSO" date
Lookup and Chat windows now scale too!
ctrl-minus / ctrl-plus / reset with ctrl-zero
@ -48,7 +54,7 @@ Update:
Thank you for reading the entire update! limbo-fish Thank you for reading the entire update!
@ -56,6 +62,14 @@ Thank you for reading the entire update! limbo-fish
crab-pot
</pre> </pre>
<center><img class="button" src="./img/tokens.jpg" width="400px"></center> <center><img class="button" src="./img/tokens.jpg" width="400px"></center>

File diff suppressed because one or more lines are too long

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 10 KiB

Wyświetl plik

@ -705,6 +705,8 @@ function lookupUsCallsign( object , writeState = false)
cntyString = g_countyData[counties[county]].geo["properties"]["st"]+","+ g_countyData[counties[county]].geo["properties"]["n"].toUpperCase(); cntyString = g_countyData[counties[county]].geo["properties"]["st"]+","+ g_countyData[counties[county]].geo["properties"]["n"].toUpperCase();
if ( !(cntyString in g_tracker.worked.cnty) ) if ( !(cntyString in g_tracker.worked.cnty) )
break; break;
if ( !(cntyString in g_tracker.confirmed.cnty) )
break;
} }
object.cnty = cntyString; object.cnty = cntyString;
} }

Wyświetl plik

@ -1,7 +1,7 @@
// GridTracker ©2020 N0TTL // GridTracker ©2020 N0TTL
var gtComment1 = "GridTracker is not open source, you may not change, modify or 'borrow' code for your needs that is redistributed in any form without first asking and receiving permission from N0TTL *and* N2VFL"; var gtComment1 = "GridTracker is not open source, you may not change, modify or 'borrow' code for your needs that is redistributed in any form without first asking and receiving permission from N0TTL *and* N2VFL";
var gtComment2 = "Third party libraries and functions used are seperated to third-party.js or their respective lib .js files, the GT close-source directive does not apply to these files of course"; var gtComment2 = "Third party libraries and functions used are seperated to third-party.js or their respective lib .js files, the GT close-source directive does not apply to these files of course";
var gtVersion = 1200831; var gtVersion = 1200903;
var gtBeta = ""; var gtBeta = "";
var g_startVersion = 0; var g_startVersion = 0;
@ -294,6 +294,7 @@ function saveAndCloseApp()
if ( g_statsWindowHandle ) g_statsWindowHandle.close(true); if ( g_statsWindowHandle ) g_statsWindowHandle.close(true);
if ( g_lookupWindowHandle ) g_lookupWindowHandle.close(true); if ( g_lookupWindowHandle ) g_lookupWindowHandle.close(true);
if ( g_baWindowHandle ) g_baWindowHandle.close(true); if ( g_baWindowHandle ) g_baWindowHandle.close(true);
nw.App.closeAllWindows();
} }
catch (e) { catch (e) {
console.log(e); console.log(e);
@ -3967,8 +3968,13 @@ function dimGridsquare() {
function updateCountStats() { function updateCountStats() {
callsignCount.innerHTML = Object.keys(g_liveCallsigns).length; var count = Object.keys(g_liveCallsigns).length;
if ( myDEcall in g_liveCallsigns )
count--;
callsignCount.innerHTML = count;
qsoCount.innerHTML = g_QSOcount; qsoCount.innerHTML = g_QSOcount;
qslCount.innerHTML = g_QSLcount; qslCount.innerHTML = g_QSLcount;
@ -4002,7 +4008,7 @@ function clearGrids() {
g_liveGrids = {}; g_liveGrids = {};
updateCountStats();
} }
function clearQsoGrids() { function clearQsoGrids() {
@ -4085,7 +4091,7 @@ function clearCalls() {
g_liveCallsigns = {}; g_liveCallsigns = {};
g_dxccCount = {}; g_dxccCount = {};
redrawGrids(); redrawGrids();
updateCountStats();
} }
function clearLive() { function clearLive() {
@ -4105,7 +4111,7 @@ function clearLive() {
clearTempGrids(); clearTempGrids();
setHomeGridsquare(); setHomeGridsquare();
redrawGrids(); redrawGrids();
updateCountStats();
updateRosterWorked(); updateRosterWorked();
goProcessRoster(); goProcessRoster();
} }
@ -4124,7 +4130,7 @@ function clearAll() {
redrawGrids(); redrawGrids();
updateCountStats();
g_callRoster = {}; g_callRoster = {};
updateRosterWorked(); updateRosterWorked();
goProcessRoster(); goProcessRoster();
@ -4151,11 +4157,11 @@ function clearAndLoadQSOs()
g_QSOcount = 0; g_QSOcount = 0;
setTrophyOverlay(g_currentOverlay); setTrophyOverlay(g_currentOverlay);
redrawGrids(); redrawGrids();
updateCountStats();
updateLogbook(); updateLogbook();
updateRosterWorked(); updateRosterWorked();
goProcessRoster(); goProcessRoster();
updateCountStats();
startupAdifLoadCheck(); startupAdifLoadCheck();
} }
@ -4167,7 +4173,7 @@ function clearQSOs() {
g_QSOcount = 0; g_QSOcount = 0;
setTrophyOverlay(g_currentOverlay); setTrophyOverlay(g_currentOverlay);
redrawGrids(); redrawGrids();
updateCountStats();
updateLogbook(); updateLogbook();
updateRosterWorked(); updateRosterWorked();
goProcessRoster(); goProcessRoster();
@ -4798,7 +4804,7 @@ function initMap() {
}); });
mapDiv.addEventListener('mouseout', mapLoseFocus, false); //mapDiv.addEventListener('mouseout', mapLoseFocus, false);
mapDiv.addEventListener('mouseleave', mapLoseFocus, false); mapDiv.addEventListener('mouseleave', mapLoseFocus, false);
g_map.on('pointerdown', function (event) { g_map.on('pointerdown', function (event) {
@ -11171,6 +11177,11 @@ function loadAdifSettings()
} }
function startupVersionInit() { function startupVersionInit() {
document.body.addEventListener('contextmenu', function(ev) {
ev.preventDefault();
});
imSureCheck.checked = false; imSureCheck.checked = false;
stopAskingCheckbox.checked = g_appSettings.stopAskingVersion; stopAskingCheckbox.checked = g_appSettings.stopAskingVersion;
if (stopAskingCheckbox.checked == false) { if (stopAskingCheckbox.checked == false) {
@ -11234,8 +11245,6 @@ function startupEventsAndTimers() {
document.addEventListener('keydown', onMyKeyDown, true); document.addEventListener('keydown', onMyKeyDown, true);
document.addEventListener('keyup', onMyKeyUp, false); document.addEventListener('keyup', onMyKeyUp, false);
mapDiv.addEventListener('mouseleave', mapLoseFocus, false);
displayTimeInterval = setInterval(displayTime, 1000); displayTimeInterval = setInterval(displayTime, 1000);
} }
@ -12606,6 +12615,7 @@ function searchLogForCallsign( call )
var conf = {}; var conf = {};
var lastTime = 0; var lastTime = 0;
var lastRow = null; var lastRow = null;
var dxcc = list[0].dxcc;
for ( row in list ) for ( row in list )
{ {
@ -12652,7 +12662,20 @@ function searchLogForCallsign( call )
worker += "</td></tr>"; worker += "</td></tr>";
} }
worker += "</table></div>"; worker += "<tr><th style='color:orange'>"+ g_dxccToAltName[dxcc] + " (" + g_worldGeoData[g_dxccToGeoData[dxcc]].pp +")</th><td>";
for ( var band in g_colorBands )
{
if ( String(dxcc) + g_colorBands[band] in g_tracker.worked.dxcc )
{
var strike = "";
if ( String(dxcc) + g_colorBands[band] in g_tracker.confirmed.dxcc )
strike = "text-decoration: line-through;";
worker += "<div style='"+strike+"display:inline-block;color:#"+g_pskColors[g_colorBands[band]]+"'>" + g_colorBands[band] + "</div>&nbsp;" ;
}
}
worker += "</td></tr></table></div>";
setLookupDiv("lookupLocalDiv", worker); setLookupDiv("lookupLocalDiv", worker);
} }
@ -13420,8 +13443,9 @@ window.addEventListener("load", function(){
}); });
}); });
process.on('uncaughtException', function (e) { var g_process = require('process');
console.error('uncaughtException:', e);
console.error(e.stack); g_process.on('uncaughtException', function (e) {
}); });

Wyświetl plik

@ -99,6 +99,8 @@ var g_defaultSettings =
"huntOAMS":false "huntOAMS":false
}, },
"columns":{ "columns":{
"Band": false,
"Mode" : false,
"Calling":true, "Calling":true,
"Msg":false, "Msg":false,
"DXCC":true, "DXCC":true,
@ -125,7 +127,8 @@ var g_defaultSettings =
"reference":0, "reference":0,
"controls":true, "controls":true,
"compact": false, "compact": false,
"fontSize":12, "screenScale":12,
"screenScale":0.0,
"settingProfiles":false, "settingProfiles":false,
"lastSortIndex":6, "lastSortIndex":6,
"lastSortReverse":1 "lastSortReverse":1
@ -1279,8 +1282,8 @@ function viewRoster()
} }
var showBands = (Object.keys(bands).length > 1?true:false); var showBands = (Object.keys(bands).length > 1?true:false)||g_rosterSettings.columns.Band;
var showModes = (Object.keys(modes).length > 1?true:false); var showModes = (Object.keys(modes).length > 1?true:false)||g_rosterSettings.columns.Mode;
@ -2598,45 +2601,30 @@ function openIgnoreEdit()
} }
function setFontSize() function setScreenScale()
{ {
if ( g_styleFont ) nw.Window.get().zoomLevel = g_rosterSettings.screenScale;
{
g_styleFont.parentNode.removeChild(g_styleFont);
g_styleFont = null;
}
g_styleFont = document.createElement('style');
g_styleFont.innerHTML = "table, th, td, select, .compact {font-size: "+g_rosterSettings.fontSize+"px;}";
document.body.appendChild(g_styleFont);
resize();
} }
function reduceFont() function reduceFont()
{ {
if ( g_rosterSettings.fontSize > 10 ) g_rosterSettings.screenScale-=0.1;
{ writeRosterSettings();
g_rosterSettings.fontSize--; setScreenScale();
writeRosterSettings();
setFontSize();
}
} }
function increaseFont() function increaseFont()
{ {
if ( g_rosterSettings.fontSize < 50 ) g_rosterSettings.screenScale+= 0.1;
{ writeRosterSettings();
g_rosterSettings.fontSize++; setScreenScale();
writeRosterSettings();
setFontSize();
}
} }
function resetFont() function resetFont()
{ {
g_rosterSettings.screenScale = g_defaultSettings.screenScale;
g_rosterSettings.fontSize = g_defaultSettings.fontSize;
writeRosterSettings(); writeRosterSettings();
setFontSize(); setScreenScale();
} }
function onMyKeyDown(event) function onMyKeyDown(event)
@ -3209,7 +3197,7 @@ function init()
g_timerInterval = setInterval(realtimeRoster,1000); g_timerInterval = setInterval(realtimeRoster,1000);
updateInstances(); updateInstances();
setFontSize(); setScreenScale();
} }
@ -4300,4 +4288,10 @@ function doubleCompile(award, firstLevel)
} }
return singleCompile(award,firstLevel); return singleCompile(award,firstLevel);
} }
var g_process = require('process');
g_process.on('uncaughtException', function (e) {
console.error(e.stack);
});

Wyświetl plik

@ -0,0 +1,89 @@
nw.Screen.Init();
var g_screenLost = false;
var g_windowInfo = {};
var g_initialScreenCount = nw.Screen.screens.length;
function setWindowInfo()
{
// if we've lost a screen, stop saving our info
if ( g_screenLost )
return;
var win = nw.Window.get();
var windowInfo = {};
windowInfo.x = win.x;
windowInfo.y = win.y;
windowInfo.width = win.width;
windowInfo.height = win.height;
g_windowInfo = windowInfo;
}
function clearAllScreenTimers()
{
if ( g_windowMoveTimer != null )
{
clearTimeout(g_windowMoveTimer);
g_windowMoveTimer = null;
}
if ( g_windowResizeTimer != null )
{
clearTimeout(g_windowResizeTimer);
g_windowResizeTimer = null;
}
}
var screenCB = {
onDisplayAdded: function(screen) {
clearAllScreenTimers();
if ( g_screenLost == true && g_initialScreenCount == nw.Screen.screens.length)
{
// Lets restore the position now
var win = nw.Window.get();
win.x = g_windowInfo.x;
win.y = g_windowInfo.y;
win.width = g_windowInfo.width;
win.height = g_windowInfo.height;
g_screenLost = false;
}
},
onDisplayRemoved: function(screen) {
clearAllScreenTimers();
if ( g_initialScreenCount != nw.Screen.screens.length )
{
g_screenLost = true;
}
}
};
// listen to screen events
nw.Screen.on('displayAdded', screenCB.onDisplayAdded);
nw.Screen.on('displayRemoved', screenCB.onDisplayRemoved);
nw.Window.get().on('loaded', function () {
g_initialScreenCount = nw.Screen.screens.length;
setWindowInfo();
});
var g_windowMoveTimer = null;
nw.Window.get().on('move', function (x,y) {
if ( g_windowMoveTimer != null )
{
clearTimeout(g_windowMoveTimer);
}
g_windowMoveTimer = setTimeout(setWindowInfo,1000);
});
var g_windowResizeTimer = null;
nw.Window.get().on('resize', function (w,h) {
if ( g_windowResizeTimer != null )
{
clearTimeout(g_windowResizeTimer);
}
g_windowResizeTimer = setTimeout(setWindowInfo,1000);
});