1
0
mirror of https://github.com/flarum/core.git synced 2025-08-12 11:24:30 +02:00

Refactor index pane

So that it only loads when needed, and caches results so things are
nice and snappy
This commit is contained in:
Toby Zerner
2015-02-06 10:32:45 +10:30
parent 0365ae6c71
commit 9ddc622929
10 changed files with 142 additions and 228 deletions

View File

@@ -1,21 +0,0 @@
import Ember from 'ember';
import AddCssClassToBodyMixin from '../../mixins/add-css-class-to-body';
export default Ember.Route.extend(AddCssClassToBodyMixin, {
// When we enter the discussions list view, we no longer want the
// discussions list to be in pane mode.
setupController: function(controller, model) {
this.controllerFor('index').set('paned', false);
this.controllerFor('index').set('paneShowing', false);
this._super(controller, model);
},
actions: {
didTransition: function() {
// @todo only if it's not a new discussion
this.controllerFor('composer').send('minimize');
}
}
});