Merge branch 'master' of https://github.com/jonatkins/ingress-intel-total-conversion
This commit is contained in:
@ -50,7 +50,7 @@ window.search.Query.prototype.init = function() {
|
||||
|
||||
this.list = $('<ul>')
|
||||
.appendTo(this.container)
|
||||
.append($('<li>').text('No results'));
|
||||
.append($('<li>').text(this.confirmed ? 'No local results, searching online...' : 'No local results.'));
|
||||
|
||||
this.container.accordion({
|
||||
collapsible: true,
|
||||
@ -195,6 +195,8 @@ window.search.doSearch = function(term, confirmed) {
|
||||
// clear results
|
||||
if(term == '') return;
|
||||
|
||||
if(useAndroidPanes()) show('info');
|
||||
|
||||
$('#search').tooltip().tooltip('close');
|
||||
|
||||
window.search.lastSearch = new window.search.Query(term, confirmed);
|
||||
@ -270,6 +272,15 @@ addHook('search', function(query) {
|
||||
if(!query.confirmed) return;
|
||||
|
||||
$.getJSON(NOMINATIM + encodeURIComponent(query.term), function(data) {
|
||||
if(data.length == 0) {
|
||||
query.addResult({
|
||||
title: 'No results on OpenStreetMap',
|
||||
icon: '//www.openstreetmap.org/favicon.ico',
|
||||
onSelected: function() {return true;},
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
data.forEach(function(item) {
|
||||
var result = {
|
||||
title: item.display_name,
|
||||
|
Reference in New Issue
Block a user