chat: fix autoGrow
This commit is contained in:
parent
debd5308e0
commit
a3cdaeda3a
3 changed files with 10 additions and 7 deletions
|
@ -46,10 +46,9 @@ do($ = window.jQuery, window) ->
|
||||||
|
|
||||||
@el.find('.zammad-chat-header').click @toggle
|
@el.find('.zammad-chat-header').click @toggle
|
||||||
@el.find('.zammad-chat-controls').on 'submit', @onSubmit
|
@el.find('.zammad-chat-controls').on 'submit', @onSubmit
|
||||||
@el.find('.zammad-chat-input').on(
|
@el.find('.zammad-chat-input').on
|
||||||
keydown: @checkForEnter
|
keydown: @checkForEnter
|
||||||
input: @onInput
|
input: @onInput
|
||||||
).autoGrow { extraLine: false }
|
|
||||||
|
|
||||||
@session_id = undefined
|
@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
|
console.log 'Zammad Chat: Too many clients in queue. Clients in queue: ', pipe.data.queue
|
||||||
|
|
||||||
onReady: =>
|
onReady: =>
|
||||||
@show() if @options.show
|
if @options.show
|
||||||
|
@show()
|
||||||
|
@el.find('.zammad-chat-input').autoGrow
|
||||||
|
extraLine: false
|
||||||
|
|
||||||
onInput: =>
|
onInput: =>
|
||||||
# remove unread-state from messages
|
# remove unread-state from messages
|
||||||
|
|
|
@ -150,8 +150,6 @@ var bind = function(fn, me){ return function(){ return fn.apply(me, arguments);
|
||||||
this.el.find('.zammad-chat-input').on({
|
this.el.find('.zammad-chat-input').on({
|
||||||
keydown: this.checkForEnter,
|
keydown: this.checkForEnter,
|
||||||
input: this.onInput
|
input: this.onInput
|
||||||
}).autoGrow({
|
|
||||||
extraLine: false
|
|
||||||
});
|
});
|
||||||
this.session_id = void 0;
|
this.session_id = void 0;
|
||||||
if (!window.WebSocket) {
|
if (!window.WebSocket) {
|
||||||
|
@ -262,7 +260,10 @@ var bind = function(fn, me){ return function(){ return fn.apply(me, arguments);
|
||||||
|
|
||||||
ZammadChat.prototype.onReady = function() {
|
ZammadChat.prototype.onReady = function() {
|
||||||
if (this.options.show) {
|
if (this.options.show) {
|
||||||
return this.show();
|
this.show();
|
||||||
|
return this.el.find('.zammad-chat-input').autoGrow({
|
||||||
|
extraLine: false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
2
public/assets/chat/chat.min.js
vendored
2
public/assets/chat/chat.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue