Mercurial > hg > GlobalNeighbors
comparison globalneighbors/templates/index.html @ 20:2fef925fbf37
display country + population in autocomplete drop down
| author | Jeff Hammel <k0scist@gmail.com> | 
|---|---|
| date | Sun, 25 Jun 2017 16:12:08 -0700 | 
| parents | 94af113e498a | 
| children | 
   comparison
  equal
  deleted
  inserted
  replaced
| 19:811adc9736eb | 20:2fef925fbf37 | 
|---|---|
| 19 } | 19 } | 
| 20 }, | 20 }, | 
| 21 template: { | 21 template: { | 
| 22 type: "custom", | 22 type: "custom", | 
| 23 method: function (value, item) { | 23 method: function (value, item) { | 
| 24 return '<a href="/' + item.geonameid + '">' + value + '</a>'; | 24 return '<a href="/' + item.geonameid + '"><b>' + value + '</b> ' + item["country code"] + '<br/><small>Population: ' + item.population + '</small></a>'; | 
| 25 } | 25 } | 
| 26 } | 26 } | 
| 27 }; | 27 }; | 
| 28 $( "#cities" ).easyAutocomplete(options); | 28 $( "#cities" ).easyAutocomplete(options); | 
| 29 }); | 29 }); | 
