chat: fix autoGrow

This commit is contained in:
Felix Niklas 2015-11-11 10:48:54 +01:00
parent debd5308e0
commit a3cdaeda3a
3 changed files with 10 additions and 7 deletions

View file

@ -46,10 +46,9 @@ do($ = window.jQuery, window) ->
@el.find('.zammad-chat-header').click @toggle
@el.find('.zammad-chat-controls').on 'submit', @onSubmit
@el.find('.zammad-chat-input').on(
@el.find('.zammad-chat-input').on
keydown: @checkForEnter
input: @onInput
).autoGrow { extraLine: false }
@session_id = undefined
@ -126,7 +125,10 @@ do($ = window.jQuery, window) ->
console.log 'Zammad Chat: Too many clients in queue. Clients in queue: ', pipe.data.queue
onReady: =>
@show() if @options.show
if @options.show
@show()
@el.find('.zammad-chat-input').autoGrow
extraLine: false
onInput: =>
# remove unread-state from messages

View file

@ -150,8 +150,6 @@ var bind = function(fn, me){ return function(){ return fn.apply(me, arguments);
this.el.find('.zammad-chat-input').on({
keydown: this.checkForEnter,
input: this.onInput
}).autoGrow({
extraLine: false
});
this.session_id = void 0;
if (!window.WebSocket) {
@ -262,7 +260,10 @@ var bind = function(fn, me){ return function(){ return fn.apply(me, arguments);
ZammadChat.prototype.onReady = function() {
if (this.options.show) {
return this.show();
this.show();
return this.el.find('.zammad-chat-input').autoGrow({
extraLine: false
});
}
};

File diff suppressed because one or more lines are too long