diff --git a/app/assets/javascripts/app/controllers/chat.coffee b/app/assets/javascripts/app/controllers/chat.coffee index 23239899f..ee665c6b0 100644 --- a/app/assets/javascripts/app/controllers/chat.coffee +++ b/app/assets/javascripts/app/controllers/chat.coffee @@ -366,14 +366,8 @@ class ChatWindow extends App.Controller @isAgentTyping = false @resetUnreadMessages() - chat = App.Chat.find(@session.chat_id) - @name = "#{chat.displayName()} [##{@session.id}]" - @title = '' - if @session && @session.preferences && @session.preferences.geo_ip - if @session.preferences.geo_ip.country_name - @title += @session.preferences.geo_ip.country_name - if @session.preferences.geo_ip.city_name - @title += " #{@session.preferences.geo_ip.city_name}" + @chat = App.Chat.find(@session.chat_id) + @name = "#{@chat.displayName()} ##{@session.id}" @on 'layout-change', @scrollToBottom @@ -407,7 +401,6 @@ class ChatWindow extends App.Controller render: -> @html App.view('customer_chat/chat_window') name: @name - title: @title @el.one 'transitionend', @onTransitionend @@ -435,6 +428,21 @@ class ChatWindow extends App.Controller @input.html(phrase) @sendMessage(1600) + @$('.js-info').popover( + trigger: 'hover' + html: true + animation: false + delay: 0 + placement: 'bottom' + container: 'body' # place in body do prevent it from animating + title: -> + App.i18n.translateContent('Details') + content: => + App.view('customer_chat/chat_window_info')( + session: @session + ) + ) + focus: => @input.focus() diff --git a/app/assets/javascripts/app/views/customer_chat/chat_window.jst.eco b/app/assets/javascripts/app/views/customer_chat/chat_window.jst.eco index 9eb7f9cbb..71a51e9f0 100644 --- a/app/assets/javascripts/app/views/customer_chat/chat_window.jst.eco +++ b/app/assets/javascripts/app/views/customer_chat/chat_window.jst.eco @@ -6,7 +6,7 @@ <%- @Icon('small-dot', 'icon-status-modified-inner-circle') %> -