summaryrefslogtreecommitdiff
path: root/public/static/js/geolocation.js
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-03-08 19:40:57 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-03-08 19:40:57 +0100
commit13d81d72ee7f63234dfffaa316edb62f6c90d90e (patch)
treeca44b666234bebab874c0867c2aef92e23d7d0cb /public/static/js/geolocation.js
parenta0040bceb6817d6e7ef0ac504b880c44da25cb7c (diff)
show hint in case of geolocation error
Diffstat (limited to 'public/static/js/geolocation.js')
-rw-r--r--public/static/js/geolocation.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/public/static/js/geolocation.js b/public/static/js/geolocation.js
index caf2a2a..6e638e0 100644
--- a/public/static/js/geolocation.js
+++ b/public/static/js/geolocation.js
@@ -4,6 +4,15 @@ $(document).ready(function() {
var showError = function(header, message, code) {
prePlaceholder.remove();
placeholder.remove();
+ var errnode = $(document.createElement('div'));
+ errnode.attr('class', 'error');
+ errnode.text(message + '. Alternativ kannst du unter „travelynx.de/s/Name der Station“ einchecken.');
+
+ var headnode = $(document.createElement('strong'));
+ headnode.text(header);
+ errnode.prepend(headnode);
+
+ $('div.geolocation').append(errnode);
};
var processResult = function(data) {