# HG changeset patch # User ymh # Date 1478168081 -3600 # Node ID 4f6118afabeeac45482418518dfded8258a5a571 # Parent f4fed295115b56e06303e595ed49284b15e0f089 Carto improvement: - add count on hover, - carto filter use geonames id resolution - geonames id in filter diff -r f4fed295115b -r 4f6118afabee cms/app-client/app/components/visu-carto.js --- a/cms/app-client/app/components/visu-carto.js Thu Nov 03 09:44:11 2016 +0100 +++ b/cms/app-client/app/components/visu-carto.js Thu Nov 03 11:14:41 2016 +0100 @@ -88,6 +88,7 @@ object['color'] = self.get('color'); } else { object['value'] = departments.get('count'); + object['title'] = area.title + " (" + departments.get('count') + ")"; } france2016LowAreas.push(object); }); @@ -110,7 +111,8 @@ var object = { 'id': area.id, 'selectable': true, - 'value': countries.get('count') + 'value': countries.get('count'), + 'title': area.title + " (" + countries.get('count') + ")" }; if(area.id === 'FR') { object['autoZoom'] = true; @@ -139,6 +141,7 @@ object['color'] = self.get('color'); } else { object['value'] = continent.get('count'); + object['title'] = area.title + " (" + continent.get('count') + ")"; } continentsLowAreas.push(object); }); @@ -191,7 +194,7 @@ clickMapObject: function(event) { this.set('locationQueryParam', event.mapObject.id); this.sendAction('setLocation', event.mapObject.id); - this.get('filter').set('location', event.mapObject.title); + this.get('filter').set('location', event.mapObject.id); }, homeButtonClicked: function(event) { diff -r f4fed295115b -r 4f6118afabee cms/app-client/app/templates/components/filter-component.hbs --- a/cms/app-client/app/templates/components/filter-component.hbs Thu Nov 03 09:44:11 2016 +0100 +++ b/cms/app-client/app/templates/components/filter-component.hbs Thu Nov 03 11:14:41 2016 +0100 @@ -1,7 +1,7 @@ {{#if (ifOr filter.location filter.language filter.discourse filter.date filter.theme)}}