cms/app-client/app/controllers/application.js
changeset 401 9ff56cc0c656
parent 394 48458e099b05
child 404 0a5eef6ad2fe
equal deleted inserted replaced
400:bc39bcecf6a4 401:9ff56cc0c656
    30     discourse: null,
    30     discourse: null,
    31     language: null,
    31     language: null,
    32     location: null,
    32     location: null,
    33     theme: null,
    33     theme: null,
    34 
    34 
    35     languageObserver: Ember.observer('language', 'date', 'date.[]', 'discourse', 'discourse.[]', 'location', 'theme', 'theme.[]', function() {
    35     localObserver: Ember.observer('language', 'date', 'date.[]', 'discourse', 'discourse.[]', 'location', 'theme', 'theme.[]', function() {
    36         this.get('filter').setProperties(this.getProperties('language', 'date', 'discourse', 'theme', 'location'));
    36         this.get('filter').setProperties(this.getProperties('language', 'date', 'discourse', 'theme', 'location'));
       
    37         // need to reset pagination
       
    38         this.set("page", 1);
    37     }),
    39     }),
    38     filterObserver: Ember.observer('filter', 'filter.language', 'filter.date', 'filter.date.[]', 'filter.discourse', 'filter.discourse.[]', 'filter.location', 'filter.theme', 'filter.theme.[]', function() {
    40     filterObserver: Ember.observer('filter', 'filter.language', 'filter.date', 'filter.date.[]', 'filter.discourse', 'filter.discourse.[]', 'filter.location', 'filter.theme', 'filter.theme.[]', function() {
    39         this.set('language', this.get('filter').get('language'));
       
    40         this.setProperties(this.get('filter').getProperties('language', 'date', 'discourse', 'theme', 'location'));
    41         this.setProperties(this.get('filter').getProperties('language', 'date', 'discourse', 'theme', 'location'));
       
    42         // need to reset pagination
       
    43         this.set("page", 1);
    41     }),
    44     }),
    42 
    45 
    43     itemObserver: Ember.observer('player.item', function() {
    46     itemObserver: Ember.observer('player.item', function() {
    44         var self = this;
    47         var self = this;
    45         this.store.findRecord('document', this.get('player').get('item'), { reload: true }).then(function(model){
    48         this.store.findRecord('document', this.get('player').get('item'), { reload: true }).then(function(model){