cms/app-client/app/routes/application.js
changeset 404 0a5eef6ad2fe
parent 401 9ff56cc0c656
child 414 5c6c526a7fc1
equal deleted inserted replaced
403:cbd92ebb8c67 404:0a5eef6ad2fe
    62         res['notice'] = { refreshModel: false };
    62         res['notice'] = { refreshModel: false };
    63         return res;
    63         return res;
    64     }),
    64     }),
    65 
    65 
    66     actions: {
    66     actions: {
       
    67         loading(transition) {
       
    68           let controller = this.controllerFor('application');
       
    69           controller.set('isLoading', true);
       
    70           transition.promise.finally(function() {
       
    71               controller.set('isLoading', false);
       
    72           });
       
    73         },
    67 
    74 
    68         didTransition: function() {
    75         didTransition: function() {
    69             // Append body classname depending on the route
    76             // Append body classname depending on the route
    70             Ember.$('body').removeClass((this.controller.get('currentPath') || '').replace(/\//g, '-').dasherize());
    77             Ember.$('body').removeClass((this.controller.get('currentPath') || '').replace(/\//g, '-').dasherize());
    71             Ember.run.once(this, function() {
    78             Ember.run.once(this, function() {