framework/ember/app/routes/index/index.js
Toby Zerner 12b0418eb7 Improve post composer + replying
- Make it modular so that different entry points can show different
things and respond differently (reply, new discussion, edit post)
- Resizable
- Fullscreen
- Confirm on close
2015-02-02 16:57:59 +10:30

22 lines
656 B
JavaScript

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');
}
}
});