[Common] chat and comments panels didn't resize after toolbar changed to compact

This commit is contained in:
Maxim Kadushkin 2017-08-09 20:02:41 +03:00
parent 134c5c907e
commit 7687f38722
2 changed files with 17 additions and 0 deletions

View file

@ -64,6 +64,16 @@ define([
'message:add': _.bind(this.onSendMessage, this)
}
});
var me = this;
Common.NotificationCenter.on('layout:changed', function(area){
Common.Utils.asyncCall(function(e) {
if ( e == 'toolbar' && me.panelChat.$el.is(':visible') ) {
me.panelChat.updateLayout(true);
me.panelChat.setupAutoSizingTextBox();
}
}, this, area);
});
},
events: {

View file

@ -108,6 +108,13 @@ define([
Common.NotificationCenter.on('comments:updatefilter', _.bind(this.onUpdateFilter, this));
Common.NotificationCenter.on('app:comment:add', _.bind(this.onAppAddComment, this));
Common.NotificationCenter.on('layout:changed', function(area){
Common.Utils.asyncCall(function(e) {
if ( e == 'toolbar' && this.view.$el.is(':visible') ) {
this.onAfterShow();
}
}, this, area);
}.bind(this));
},
onLaunch: function () {
this.collection = this.getApplication().getCollection('Common.Collections.Comments');