1
0
mirror of https://github.com/flarum/core.git synced 2025-08-01 22:20:21 +02:00

Composer and replying tweaks/bug-fixes

This commit is contained in:
Toby Zerner
2015-02-06 14:06:22 +10:30
parent e6135d60b2
commit abd3aa2e1a
6 changed files with 61 additions and 44 deletions

View File

@@ -27,6 +27,7 @@ export default Ember.Controller.extend(Ember.Evented, {
this.confirmExit().then(function() {
composer.set('content', null);
Ember.run.next(function() {
newContent.set('composer', composer);
composer.set('content', newContent);
});
});
@@ -61,10 +62,10 @@ export default Ember.Controller.extend(Ember.Evented, {
hide: function() {
this.set('position', PositionEnum.HIDDEN);
var content = this.get('content');
if (content) {
content.send('reset');
}
},
clearContent: function() {
this.set('content', null);
},
close: function() {
@@ -75,17 +76,23 @@ export default Ember.Controller.extend(Ember.Evented, {
},
minimize: function() {
this.set('position', PositionEnum.MINIMIZED);
if (this.get('position') !== PositionEnum.HIDDEN) {
this.set('position', PositionEnum.MINIMIZED);
}
},
fullscreen: function() {
this.set('position', PositionEnum.FULLSCREEN);
this.trigger('focus');
if (this.get('position') !== PositionEnum.HIDDEN) {
this.set('position', PositionEnum.FULLSCREEN);
this.trigger('focus');
}
},
exitFullscreen: function() {
this.set('position', PositionEnum.NORMAL);
this.trigger('focus');
if (this.get('position') === PositionEnum.FULLSCREEN) {
this.set('position', PositionEnum.NORMAL);
this.trigger('focus');
}
}
}