cms/app-client/app/routes/tabs/thematiques.js
changeset 240 aa101458cd4e
parent 237 69a9f3687902
child 243 0f29cc270f9e
equal deleted inserted replaced
239:1c8883feeab0 240:aa101458cd4e
     5     index: 0,
     5     index: 0,
     6     limit: 40,
     6     limit: 40,
     7     sort: 'alphabetical',
     7     sort: 'alphabetical',
     8 
     8 
     9     themes: [],
     9     themes: [],
       
    10 
       
    11     all: Ember.computed(function() {
       
    12         return this.store.findAll('theme');
       
    13     }),
    10 
    14 
    11     model: Ember.observer('index', function() {
    15     model: Ember.observer('index', function() {
    12         var self = this;
    16         var self = this;
    13         var promise = this.store.query('theme', {
    17         var promise = this.store.query('theme', {
    14             'limit': this.get('limit'),
    18             'limit': this.get('limit'),
    24         return promise;
    28         return promise;
    25     }),
    29     }),
    26 
    30 
    27     setupController: function(controller, model) {
    31     setupController: function(controller, model) {
    28         this._super(...arguments);
    32         this._super(...arguments);
       
    33         controller.set('all', this.get('all'));
    29         // Add ArrayProxy to template context.
    34         // Add ArrayProxy to template context.
    30         controller.set('themes', this.get('themes'));
    35         controller.set('themes', this.get('themes'));
    31     },
    36     },
    32 
    37 
    33     actions: {
    38     actions: {