Fixed WebApp when geolocation is disabled.

This commit is contained in:
Ylian Saint-Hilaire 2019-12-05 11:34:23 -08:00
parent 0d04d97164
commit 2d9aa79636
7 changed files with 28 additions and 16 deletions

View File

@ -1,6 +1,6 @@
{
"name": "meshcentral",
"version": "0.4.5-g",
"version": "0.4.5-h",
"keywords": [
"Remote Management",
"Intel AMT",

File diff suppressed because one or more lines are too long

View File

@ -187,7 +187,7 @@
<div tabindex=0 id=devViewButton1 class=viewSelector onclick=onDeviceViewChange(1) onkeypress="if (event.key == 'Enter') { onDeviceViewChange(1); }" title="Columns"><div class="viewSelector2"></div></div>
<div tabindex=0 id=devViewButton2 class=viewSelector onclick=onDeviceViewChange(2) onkeypress="if (event.key == 'Enter') { onDeviceViewChange(2); }" title="List"><div class="viewSelector1"></div></div>
<div tabindex=0 id=devViewButton3 class=viewSelector onclick=onDeviceViewChange(3) onkeypress="if (event.key == 'Enter') { onDeviceViewChange(3); }" title="Desktops"><div class="viewSelector3"></div></div>
<div tabindex=0 id=devViewButton4 class=viewSelector onclick=onDeviceViewChange(4) onkeypress="if (event.key == 'Enter') { onDeviceViewChange(4); }" title="Map"><div class="viewSelector4"></div></div>
<div tabindex=0 id=devViewButton4 class=viewSelector onclick=onDeviceViewChange(4) onkeypress="if (event.key == 'Enter') { onDeviceViewChange(4); }" title="Map" style="display:none"><div class="viewSelector4"></div></div>
</div><div><h1>My Devices</h1></div>
<table id="devListToolbarSpan" class="noselect">
<tr>
@ -216,7 +216,7 @@
<option value=1>Columns</option>
<option value=2>List</option>
<option value=3>Desktops</option>
<option id=viewselectmapoption value=4>Map</option>
<option id=viewselectmapoption value=4 style="display:none">Map</option>
</select>
</div>
<div style="display:none" id=devListToolbarSort>
@ -3770,7 +3770,9 @@
// Load the entire map
function loadmap() {
if (xxmap == null) return;
if ((features & 0x8000) == 0) { QV('viewselectmapoption', false); QV('devViewButton4', false); xxmap = null; return; } // Geolocation not supported
if ((features & 0x8000) == 0) { xxmap = null; return; } // Geolocation not supported
QV('viewselectmapoption', true);
QV('devViewButton4', true);
try {
// Initialize a Source Vector
xxmap.markersSource = new ol.source.Vector();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -185,7 +185,7 @@
<div tabindex="0" id="devViewButton1" class="viewSelector" onclick="onDeviceViewChange(1)" onkeypress="if (event.key == 'Enter') { onDeviceViewChange(1); }" title="Buňky"><div class="viewSelector2"></div></div>
<div tabindex="0" id="devViewButton2" class="viewSelector" onclick="onDeviceViewChange(2)" onkeypress="if (event.key == 'Enter') { onDeviceViewChange(2); }" title="List"><div class="viewSelector1"></div></div>
<div tabindex="0" id="devViewButton3" class="viewSelector" onclick="onDeviceViewChange(3)" onkeypress="if (event.key == 'Enter') { onDeviceViewChange(3); }" title="Desktopy"><div class="viewSelector3"></div></div>
<div tabindex="0" id="devViewButton4" class="viewSelector" onclick="onDeviceViewChange(4)" onkeypress="if (event.key == 'Enter') { onDeviceViewChange(4); }" title="Mapa"><div class="viewSelector4"></div></div>
<div tabindex="0" id="devViewButton4" class="viewSelector" onclick="onDeviceViewChange(4)" onkeypress="if (event.key == 'Enter') { onDeviceViewChange(4); }" title="Mapa" style="display:none"><div class="viewSelector4"></div></div>
</div><div><h1>Moje zařízení</h1></div>
<table id="devListToolbarSpan" class="noselect">
<tbody><tr>
@ -214,7 +214,7 @@
<option value="1">Buňky</option>
<option value="2">List</option>
<option value="3">Desktopy</option>
<option id="viewselectmapoption" value="4">Mapa</option>
<option id="viewselectmapoption" value="4" style="display:none">Mapa</option>
</select>
</div>
<div style="display:none" id="devListToolbarSort">
@ -3768,7 +3768,9 @@
// Load the entire map
function loadmap() {
if (xxmap == null) return;
if ((features & 0x8000) == 0) { QV('viewselectmapoption', false); QV('devViewButton4', false); xxmap = null; return; } // Geolocation not supported
if ((features & 0x8000) == 0) { xxmap = null; return; } // Geolocation not supported
QV('viewselectmapoption', true);
QV('devViewButton4', true);
try {
// Initialize a Source Vector
xxmap.markersSource = new ol.source.Vector();

View File

@ -185,7 +185,7 @@
<div tabindex="0" id="devViewButton1" class="viewSelector" onclick="onDeviceViewChange(1)" onkeypress="if (event.key == 'Enter') { onDeviceViewChange(1); }" title="Columns"><div class="viewSelector2"></div></div>
<div tabindex="0" id="devViewButton2" class="viewSelector" onclick="onDeviceViewChange(2)" onkeypress="if (event.key == 'Enter') { onDeviceViewChange(2); }" title="Liste"><div class="viewSelector1"></div></div>
<div tabindex="0" id="devViewButton3" class="viewSelector" onclick="onDeviceViewChange(3)" onkeypress="if (event.key == 'Enter') { onDeviceViewChange(3); }" title="Desktops"><div class="viewSelector3"></div></div>
<div tabindex="0" id="devViewButton4" class="viewSelector" onclick="onDeviceViewChange(4)" onkeypress="if (event.key == 'Enter') { onDeviceViewChange(4); }" title="Carte"><div class="viewSelector4"></div></div>
<div tabindex="0" id="devViewButton4" class="viewSelector" onclick="onDeviceViewChange(4)" onkeypress="if (event.key == 'Enter') { onDeviceViewChange(4); }" title="Carte" style="display:none"><div class="viewSelector4"></div></div>
</div><div><h1>Mes Appareils</h1></div>
<table id="devListToolbarSpan" class="noselect">
<tbody><tr>
@ -214,7 +214,7 @@
<option value="1">Columns</option>
<option value="2">Liste</option>
<option value="3">Desktops</option>
<option id="viewselectmapoption" value="4">Carte</option>
<option id="viewselectmapoption" value="4" style="display:none">Carte</option>
</select>
</div>
<div style="display:none" id="devListToolbarSort">
@ -3768,7 +3768,9 @@
// Load the entire map
function loadmap() {
if (xxmap == null) return;
if ((features & 0x8000) == 0) { QV('viewselectmapoption', false); QV('devViewButton4', false); xxmap = null; return; } // Geolocation not supported
if ((features & 0x8000) == 0) { xxmap = null; return; } // Geolocation not supported
QV('viewselectmapoption', true);
QV('devViewButton4', true);
try {
// Initialize a Source Vector
xxmap.markersSource = new ol.source.Vector();