cms/app-client/app/routes/tabs/thematiques.js
changeset 299 2c16302b06f7
parent 243 0f29cc270f9e
child 337 2ea18460d5e3
equal deleted inserted replaced
298:a915633aa6cf 299:2c16302b06f7
     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     }),
       
    14 
    10 
    15     model: Ember.observer('index', function() {
    11     model: Ember.observer('index', function() {
    16         var self = this;
    12         var self = this;
    17         var promise = this.store.query('theme', {
    13         var promise = this.store.query('theme', {
    18             'limit': this.get('limit'),
    14             'limit': this.get('limit'),
    28         return promise;
    24         return promise;
    29     }),
    25     }),
    30 
    26 
    31     setupController: function(controller) {
    27     setupController: function(controller) {
    32         this._super(...arguments);
    28         this._super(...arguments);
    33         controller.set('all', this.get('all'));
       
    34         // Add ArrayProxy to template context.
       
    35         controller.set('themes', this.get('themes'));
    29         controller.set('themes', this.get('themes'));
    36     },
    30     },
    37 
    31 
    38     actions: {
    32     actions: {
    39 
    33