Merge branch 'develop' of github.com:martini/zammad into develop
This commit is contained in:
commit
f7edea8ce8
1 changed files with 13 additions and 7 deletions
|
@ -12,12 +12,7 @@ class App.CustomerChat extends App.Controller
|
||||||
|
|
||||||
return if !@isRole('Chat')
|
return if !@isRole('Chat')
|
||||||
|
|
||||||
@i = 0
|
|
||||||
@chatWindows = {}
|
@chatWindows = {}
|
||||||
@totalQuestions = 7
|
|
||||||
@answered = 0
|
|
||||||
@correct = 0
|
|
||||||
@wrong = 0
|
|
||||||
@maxChats = 4
|
@maxChats = 4
|
||||||
|
|
||||||
@messageCounter = 0
|
@messageCounter = 0
|
||||||
|
@ -134,6 +129,17 @@ class App.CustomerChat extends App.Controller
|
||||||
chat.render()
|
chat.render()
|
||||||
@chatWindows[session.session_id] = chat
|
@chatWindows[session.session_id] = chat
|
||||||
|
|
||||||
|
if @windowCount() is 1
|
||||||
|
chat.focus()
|
||||||
|
|
||||||
|
windowCount: =>
|
||||||
|
count = 0
|
||||||
|
|
||||||
|
for chat of @chatWindows
|
||||||
|
count++
|
||||||
|
|
||||||
|
return count
|
||||||
|
|
||||||
removeChat: (session_id) =>
|
removeChat: (session_id) =>
|
||||||
delete @chatWindows[session_id]
|
delete @chatWindows[session_id]
|
||||||
@updateMeta()
|
@updateMeta()
|
||||||
|
@ -242,8 +248,8 @@ class chatWindow extends App.Controller
|
||||||
else
|
else
|
||||||
@addMessage message.content, 'customer'
|
@addMessage message.content, 'customer'
|
||||||
|
|
||||||
# set focus
|
focus: =>
|
||||||
#@input.get(0).focus()
|
@input.focus()
|
||||||
|
|
||||||
onTransitionend: (event) =>
|
onTransitionend: (event) =>
|
||||||
# chat window is done with animation - adjust scroll-bars
|
# chat window is done with animation - adjust scroll-bars
|
||||||
|
|
Loading…
Reference in a new issue