Fix quotation marks consistency in js
This commit is contained in:
parent
e9d87f25e6
commit
01a4db0ab0
@ -83,7 +83,7 @@ function submitUser(action) {
|
|||||||
xhr.onreadystatechange = function() {
|
xhr.onreadystatechange = function() {
|
||||||
if (xhr.readyState == 4) {
|
if (xhr.readyState == 4) {
|
||||||
var error = true;
|
var error = true;
|
||||||
var message = "";
|
var message = '';
|
||||||
if (xhr.status == 200) {
|
if (xhr.status == 200) {
|
||||||
var xml = xhr.responseXML;
|
var xml = xhr.responseXML;
|
||||||
if (xml) {
|
if (xml) {
|
||||||
|
@ -40,7 +40,7 @@ function init() {
|
|||||||
mapTypeId: google.maps.MapTypeId.ROADMAP,
|
mapTypeId: google.maps.MapTypeId.ROADMAP,
|
||||||
scaleControl: true
|
scaleControl: true
|
||||||
};
|
};
|
||||||
map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
|
map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
|
||||||
}
|
}
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
map = undefined;
|
map = undefined;
|
||||||
@ -50,7 +50,7 @@ function cleanup() {
|
|||||||
popup = undefined;
|
popup = undefined;
|
||||||
polyOptions = undefined;
|
polyOptions = undefined;
|
||||||
mapOptions = undefined;
|
mapOptions = undefined;
|
||||||
document.getElementById("map-canvas").innerHTML = '';
|
document.getElementById('map-canvas').innerHTML = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
function displayTrack(xml, update) {
|
function displayTrack(xml, update) {
|
||||||
@ -188,7 +188,7 @@ function zoomToBounds(b) {
|
|||||||
|
|
||||||
function gm_authFailure() {
|
function gm_authFailure() {
|
||||||
gm_error = true;
|
gm_error = true;
|
||||||
message = sprintf(lang['apifailure'], "Google Maps");
|
message = sprintf(lang['apifailure'], 'Google Maps');
|
||||||
message += '<br><br>' + lang['gmauthfailure'];
|
message += '<br><br>' + lang['gmauthfailure'];
|
||||||
message += '<br><br>' + lang['gmapilink'];
|
message += '<br><br>' + lang['gmapilink'];
|
||||||
showModal(message);
|
showModal(message);
|
||||||
|
@ -185,7 +185,7 @@ function init() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// change mouse cursor when over marker
|
// change mouse cursor when over marker
|
||||||
map.on("pointermove", function(e) {
|
map.on('pointermove', function(e) {
|
||||||
var hit = map.forEachFeatureAtPixel(e.pixel, function(feature, layer) {
|
var hit = map.forEachFeatureAtPixel(e.pixel, function(feature, layer) {
|
||||||
if (layer.get('name') == 'Markers') {
|
if (layer.get('name') == 'Markers') {
|
||||||
return true;
|
return true;
|
||||||
@ -287,7 +287,7 @@ function cleanup() {
|
|||||||
olStyles = undefined;
|
olStyles = undefined;
|
||||||
removeElementById('popup');
|
removeElementById('popup');
|
||||||
removeElementById('switcher');
|
removeElementById('switcher');
|
||||||
document.getElementById("map-canvas").innerHTML = '';
|
document.getElementById('map-canvas').innerHTML = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
function displayTrack(xml, update) {
|
function displayTrack(xml, update) {
|
||||||
|
14
js/main.js
14
js/main.js
@ -135,7 +135,7 @@ function getXHR() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function loadTrack(userid, trackid, update) {
|
function loadTrack(userid, trackid, update) {
|
||||||
var title = document.getElementById("track").getElementsByClassName("menutitle")[0];
|
var title = document.getElementById('track').getElementsByClassName('menutitle')[0];
|
||||||
if (trackid < 0) { return; }
|
if (trackid < 0) { return; }
|
||||||
if (latest == 1) { trackid = 0; }
|
if (latest == 1) { trackid = 0; }
|
||||||
var xhr = getXHR();
|
var xhr = getXHR();
|
||||||
@ -262,7 +262,7 @@ function exportFile(type, userid, trackid) {
|
|||||||
|
|
||||||
function importFile(input) {
|
function importFile(input) {
|
||||||
var form = input.parentElement;
|
var form = input.parentElement;
|
||||||
var title = form.parentElement.getElementsByClassName("menutitle")[0];
|
var title = form.parentElement.getElementsByClassName('menutitle')[0];
|
||||||
var sizeMax = form.elements['MAX_FILE_SIZE'].value;
|
var sizeMax = form.elements['MAX_FILE_SIZE'].value;
|
||||||
if (input.files && input.files.length == 1 && input.files[0].size > sizeMax) {
|
if (input.files && input.files.length == 1 && input.files[0].size > sizeMax) {
|
||||||
alert(sprintf(lang['isizefailure'], sizeMax));
|
alert(sprintf(lang['isizefailure'], sizeMax));
|
||||||
@ -272,7 +272,7 @@ function importFile(input) {
|
|||||||
xhr.onreadystatechange = function() {
|
xhr.onreadystatechange = function() {
|
||||||
if (xhr.readyState == 4) {
|
if (xhr.readyState == 4) {
|
||||||
var error = true;
|
var error = true;
|
||||||
var message = "";
|
var message = '';
|
||||||
if (xhr.status == 200) {
|
if (xhr.status == 200) {
|
||||||
var xml = xhr.responseXML;
|
var xml = xhr.responseXML;
|
||||||
if (xml) {
|
if (xml) {
|
||||||
@ -298,9 +298,9 @@ function importFile(input) {
|
|||||||
xhr = null;
|
xhr = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xhr.open("POST", "utils/import.php", true);
|
xhr.open('POST', 'utils/import.php', true);
|
||||||
xhr.send(new FormData(form));
|
xhr.send(new FormData(form));
|
||||||
input.value = "";
|
input.value = '';
|
||||||
setLoader(title);
|
setLoader(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -400,7 +400,7 @@ function selectUser(f) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getTracks(userid, trackid) {
|
function getTracks(userid, trackid) {
|
||||||
var title = document.getElementById("track").getElementsByClassName("menutitle")[0];
|
var title = document.getElementById('track').getElementsByClassName('menutitle')[0];
|
||||||
var xhr = getXHR();
|
var xhr = getXHR();
|
||||||
xhr.onreadystatechange = function () {
|
xhr.onreadystatechange = function () {
|
||||||
if (xhr.readyState == 4) {
|
if (xhr.readyState == 4) {
|
||||||
@ -431,7 +431,7 @@ function fillOptions(xml, uid, tid) {
|
|||||||
for (var i = 0; i < trackLen; i++) {
|
for (var i = 0; i < trackLen; i++) {
|
||||||
var trackid = getNode(tracks[i], 'trackid');
|
var trackid = getNode(tracks[i], 'trackid');
|
||||||
var trackname = getNode(tracks[i], 'trackname');
|
var trackname = getNode(tracks[i], 'trackname');
|
||||||
var option = document.createElement("option");
|
var option = document.createElement('option');
|
||||||
option.value = trackid;
|
option.value = trackid;
|
||||||
option.innerHTML = htmlEncode(trackname);
|
option.innerHTML = htmlEncode(trackname);
|
||||||
trackSelect.appendChild(option);
|
trackSelect.appendChild(option);
|
||||||
|
@ -48,14 +48,14 @@ function submitPass() {
|
|||||||
xhr.onreadystatechange = function () {
|
xhr.onreadystatechange = function () {
|
||||||
if (xhr.readyState == 4) {
|
if (xhr.readyState == 4) {
|
||||||
var error = true;
|
var error = true;
|
||||||
var message = "";
|
var message = '';
|
||||||
if (xhr.status == 200) {
|
if (xhr.status == 200) {
|
||||||
var xml = xhr.responseXML;
|
var xml = xhr.responseXML;
|
||||||
if (xml) {
|
if (xml) {
|
||||||
var root = xml.getElementsByTagName('root');
|
var root = xml.getElementsByTagName('root');
|
||||||
if (root.length && getNode(root[0], 'error') == 0) {
|
if (root.length && getNode(root[0], 'error') == 0) {
|
||||||
removeModal();
|
removeModal();
|
||||||
alert(lang["actionsuccess"]);
|
alert(lang['actionsuccess']);
|
||||||
error = false;
|
error = false;
|
||||||
} else if (root.length) {
|
} else if (root.length) {
|
||||||
errorMsg = getNode(root[0], 'message');
|
errorMsg = getNode(root[0], 'message');
|
||||||
|
@ -67,7 +67,7 @@ function submitTrack(action) {
|
|||||||
xhr.onreadystatechange = function() {
|
xhr.onreadystatechange = function() {
|
||||||
if (xhr.readyState == 4) {
|
if (xhr.readyState == 4) {
|
||||||
var error = true;
|
var error = true;
|
||||||
var message = "";
|
var message = '';
|
||||||
if (xhr.status == 200) {
|
if (xhr.status == 200) {
|
||||||
var xml = xhr.responseXML;
|
var xml = xhr.responseXML;
|
||||||
if (xml) {
|
if (xml) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user