1
0
Fork 0

Added a modal poping up if config.js structure is not actual

please initially compare your config.js in the html/js folder with the one in
the repository and add finally following line at top of the file:

var config_struc_ver = 20210312.1;
main
Kim Huebel 4 years ago
parent 9c40f553e8
commit 49cbd82657

@ -32,6 +32,29 @@
<title>DG9VH - MMDVM-Dashboard by DG9VH</title>
</head>
<body>
<!-- Config structure modal -->
<div id="configstructmodal" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Update your config.js please!</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>This text is shown to you, because you may use an old config.js-structure. Please open your config.js and compare it with the example-one in github-repository, add missing or change configuration options that has been renamed and add following line (or update existing one to this) into the config.js-file:</p>
<p>
var config_struc_ver = <script type="text/javascript">document.write(act_config_struc_ver);</script>
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark static-top">
<div class="container-fluid">
@ -416,6 +439,8 @@
};
t_dapnet.order( [ 0, 'desc' ] ).draw();
}
checkConfigStructure();
</script>
</body>
</html>

@ -1,3 +1,6 @@
// config structure version, please change to value in github-file after update and adding new values
var config_struc_ver = 20210312.1;
// 1 = show link to QRZ.com, 0 = off
var qrz = 1;

@ -1,3 +1,4 @@
var act_config_struc_ver = 20210312.1;
var messagecount = 0;
var ts1TXing = null;
var ts2TXing = null;
@ -28,6 +29,13 @@ function logIt(message) {
}
}
function checkConfigStructure() {
if (typeof config_struc_ver === "undefined" || config_struc_ver < act_config_struc_ver) {
//alert("Old!");
$('#configstructmodal').modal('show');
}
}
function getTimezone() {
if (useClientTimezone) {
var d = new Date();

@ -1 +1 @@
var dashboard_version = "2021-02-22 22:05:12";
var dashboard_version = "2021-03-12 14:49:51";

Loading…
Cancel
Save