change sort function for geonames

This commit is contained in:
rolux 2011-05-28 10:46:39 +02:00
parent 96b597d324
commit 86411a6e22

View file

@ -105,7 +105,11 @@ Ox.ListMap = function(options, self) {
id: 'geoname',
removable: false,
map: function(v) {
return v.split(', ').reverse().join(', ')
var names = v.split(', ');
if (!Ox.getCountryByGeoname(names[names.length - 1])) {
names.push('~');
}
return names.reverse().join(', ')
},
operator: '+',
title: 'Geoname',