Added missing call of getLocation if getGeolocation fails.

This commit is contained in:
Kasper D. Fischer 2014-05-12 15:46:37 +00:00
parent 3de24436a0
commit 55a6c166b6
Notes: subgit 2018-03-07 17:58:51 +01:00
r630 www/trunk

View File

@ -87,12 +87,9 @@ function ajaxLoadEvents(stime, etime) {
var location
// try to use location with reverse geolocation lookup (nominatim), check cache first
// use getLocation if it fails or description -> text if it also fails
if ( geolocationTable[id] ) {
location = geolocationTable[id];
} else {
location = getGeolocation(id, lat, lng);
( location ) ? null : location = $(this).find('description > text').text();
};
( location = geolocationTable[id] ) ? null : location = getGeolocation(id, lat, lng);
( location ) ? null : location = getLocation(lat, lng)[0];
( location ) ? null : $(this).find('description > text').text();
// create table row: Date, Time, Mag, Location
if ( !eventTable[id] && $.inArray(type, config['event']['typeWhitelist'] )+1 && $.inArray(evaluationStatus, config['event']['evaluationBlacklist'])<0 && Number(mag)+0.05 >= config['event']['minMag'] ) {
// general event info (1st line)