cms/app-client/app/routes/tabs/carto.js
changeset 291 478cdcc56a63
parent 283 beebc85e0c6b
child 309 6ab16926b675
equal deleted inserted replaced
290:ca990333f838 291:478cdcc56a63
     1 import Ember from 'ember';
     1 import Ember from 'ember';
     2 
     2 
     3 export default Ember.Route.extend({
     3 export default Ember.Route.extend({
     4 
     4 
     5     locationQueryParam: 'world',
     5     modelQueryParam: 'world',
     6 
     6 
     7     model: function() {
     7     model: function() {
     8         return this.store.query('geostat', {
     8         return this.store.query('geostat', {
     9             'area': this.get('locationQueryParam'),
     9             'area': this.get('modelQueryParam'),
    10             'details': 1
    10             'details': 1
    11         });
    11         });
    12     },
    12     },
    13 
    13 
       
    14     deactivate: function () {
       
    15         this.set('modelQueryParam', 'world');
       
    16     },
       
    17 
       
    18     setupController: function(controller) {
       
    19         this._super(...arguments);
       
    20         controller.set('modelQueryParam', this.get('modelQueryParam'));
       
    21     },
       
    22 
    14     actions: {
    23     actions: {
    15         setlocationQueryParam: function(id) {
    24         setModelQueryParam: function(id) {
    16             this.set('locationQueryParam', id);
    25             this.set('modelQueryParam', id);
    17             this.refresh();
    26             this.refresh();
    18             
       
    19         }
    27         }
    20     }
    28     }
    21 
    29 
    22 });
    30 });