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