Skip to content
Snippets Groups Projects
Commit 188a16ca authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Eingabefelder in der Routenlpanung funktionieren nun auch im Firefox

parent 9b7f0799
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -3,7 +3,7 @@
"css/mapSearch.css": "css/mapSearch-76d41e667d.css",
"css/routing.css": "css/routing-ff9f65b5af.css",
"css/staticPages.css": "css/staticPages-1bcf334d2e.css",
"js/findRoute.js": "js/findRoute-ff860249a5.js",
"js/findRoute.js": "js/findRoute-d5dbfd8ce4.js",
"js/iframeSearch.js": "js/iframeSearch-e5cb1880a2.js",
"js/mapSearch.js": "js/mapSearch-2053e0e1b8.js",
"js/routing.js": "js/routing-f6c48c011c.js"
......
......@@ -93313,6 +93313,12 @@ function initRouteFinder() {
var firstEmpty = false;
var waypointHtml = $('<ul id="waypoint-container"></ul>');
if (waypoints.length >= 1) {
if(waypoints[0] === ""){
html = $("<input id=\"0\" class=\"form-control\" placeholder=\"Klicke auf die Karte um diesen Wegpunkt einzufügen.\" value=\"\"></input>");
addSearchEvent(html);
$("#route-content").append(html);
firstEmpty = true;
}
$.each(waypoints, function(index, value) {
var html;
if (typeof value[0] !== "undefined" || value === 'gps') {
......@@ -93344,20 +93350,29 @@ function initRouteFinder() {
}
addPositionMarker(lon, lat, index);
$(waypointHtml).append(html);
} else {
if (!firstEmpty) {
html = $("<input id=\"" + index + "\" class=\"form-control\" placeholder=\"Klicke auf die Karte um diesen Wegpunkt einzufügen.\" value=\"\"></input>");
firstEmpty = true;
} else {
html = $("<input id=\"" + index + "\" class=\"form-control\" placeholder=\"\" value=\"\"></input>");
}
/*
addSearchEvent(html);
*/
}
$(waypointHtml).append(html);
 
});
$("#route-content").append(waypointHtml);
if(waypoints[waypoints.length-1] === ""){
if (!firstEmpty) {
html = $("<input id=\"" + (waypoints.length-1) + "\" class=\"form-control\" placeholder=\"Klicke auf die Karte um diesen Wegpunkt einzufügen.\" value=\"\"></input>");
firstEmpty = true;
} else {
html = $("<input id=\"" + (waypoints.length-1) + "\" class=\"form-control\" placeholder=\"\" value=\"\"></input>");
}
addSearchEvent(html);
$("#route-content").append(html);
}
}
$("#route-content").append(waypointHtml);
}
// Describes the number of unfilled waypoints
var unfilled = 0;
......@@ -93389,7 +93404,16 @@ function initRouteFinder() {
// Add the Listener for adding Waypoints
$("#add-waypoint").click(function() {
clearMarkers();
waypoints.splice(waypoints.length, 0, '');
var newWaypoints = [];
$.each(waypoints, function(index, value){
if(index === 0){
newWaypoints.push(value);
}else if(index > 0 && value !== ""){
newWaypoints.push(value);
}
});
newWaypoints.push('');
waypoints = newWaypoints;
refreshUrl();
});
// We should add a Place to display Informations About the Route
This diff is collapsed.
......@@ -109,6 +109,12 @@ function initRouteFinder() {
var firstEmpty = false;
var waypointHtml = $('<ul id="waypoint-container"></ul>');
if (waypoints.length >= 1) {
if(waypoints[0] === ""){
html = $("<input id=\"0\" class=\"form-control\" placeholder=\"Klicke auf die Karte um diesen Wegpunkt einzufügen.\" value=\"\"></input>");
addSearchEvent(html);
$("#route-content").append(html);
firstEmpty = true;
}
$.each(waypoints, function(index, value) {
var html;
if (typeof value[0] !== "undefined" || value === 'gps') {
......@@ -140,20 +146,29 @@ function initRouteFinder() {
}
addPositionMarker(lon, lat, index);
$(waypointHtml).append(html);
} else {
if (!firstEmpty) {
html = $("<input id=\"" + index + "\" class=\"form-control\" placeholder=\"Klicke auf die Karte um diesen Wegpunkt einzufügen.\" value=\"\"></input>");
firstEmpty = true;
} else {
html = $("<input id=\"" + index + "\" class=\"form-control\" placeholder=\"\" value=\"\"></input>");
}
/*
addSearchEvent(html);
*/
}
$(waypointHtml).append(html);
});
$("#route-content").append(waypointHtml);
if(waypoints[waypoints.length-1] === ""){
if (!firstEmpty) {
html = $("<input id=\"" + (waypoints.length-1) + "\" class=\"form-control\" placeholder=\"Klicke auf die Karte um diesen Wegpunkt einzufügen.\" value=\"\"></input>");
firstEmpty = true;
} else {
html = $("<input id=\"" + (waypoints.length-1) + "\" class=\"form-control\" placeholder=\"\" value=\"\"></input>");
}
addSearchEvent(html);
$("#route-content").append(html);
}
}
$("#route-content").append(waypointHtml);
}
// Describes the number of unfilled waypoints
var unfilled = 0;
......@@ -185,7 +200,16 @@ function initRouteFinder() {
// Add the Listener for adding Waypoints
$("#add-waypoint").click(function() {
clearMarkers();
waypoints.splice(waypoints.length, 0, '');
var newWaypoints = [];
$.each(waypoints, function(index, value){
if(index === 0){
newWaypoints.push(value);
}else if(index > 0 && value !== ""){
newWaypoints.push(value);
}
});
newWaypoints.push('');
waypoints = newWaypoints;
refreshUrl();
});
// We should add a Place to display Informations About the Route
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment