Create the composer view with the defaultContainer. This is in prep for redeploying

on RC5. Ideally we'll change how the composer is instantiated altogether but that will
have to wait for a future release.
This commit is contained in:
Robin Ward 2013-06-07 18:04:51 -04:00
parent a6f67d85eb
commit b46b533e70
1 changed files with 6 additions and 1 deletions

View File

@ -217,9 +217,14 @@ Discourse.ComposerController = Discourse.Controller.extend({
var view = this.get('view');
var composerController = this;
if (!view) {
view = Discourse.ComposerView.create({ controller: this });
// TODO: We should refactor how composer is inserted. It should probably use a
// {{render}} and then the controller and view will be wired up automatically.
appView = Discourse.__container__.lookup('view:application');
view = appView.createChildView(Discourse.ComposerView, {controller: this});
view.appendTo($('#main'));
this.set('view', view);
// the next runloop is too soon, need to get the control rendered and then
// we need to change stuff, otherwise css animations don't kick in
Em.run.next(function() {