diff --git a/app/assets/javascripts/app/controllers/layout_ref.coffee b/app/assets/javascripts/app/controllers/layout_ref.coffee index 4722a32a6..9849d3e62 100644 --- a/app/assets/javascripts/app/controllers/layout_ref.coffee +++ b/app/assets/javascripts/app/controllers/layout_ref.coffee @@ -2179,5 +2179,24 @@ class TwitterConversationRef extends App.ControllerContent App.Config.set( 'layout_ref/twitter_conversation', TwitterConversationRef, 'Routes' ) +class ChatToTicketRef extends App.ControllerContent + + elements: + '.js-scrollHolder': 'scrollHolder' + + constructor: -> + super + @render() + @scrollToBottom() + + render: -> + @html App.view('layout_ref/chat_to_ticket')() + + scrollToBottom: -> + @scrollHolder.scrollTop(@scrollHolder.prop('scrollHeight')) + + +App.Config.set( 'layout_ref/chat_to_ticket', ChatToTicketRef, 'Routes' ) + App.Config.set( 'LayoutRef', { prio: 1700, parent: '#current_user', name: 'Layout Reference', translate: true, target: '#layout_ref', role: [ 'Admin' ] }, 'NavBarRight' ) \ No newline at end of file diff --git a/app/assets/javascripts/app/views/layout_ref/chat_to_ticket.jst.eco b/app/assets/javascripts/app/views/layout_ref/chat_to_ticket.jst.eco new file mode 100644 index 000000000..1711d15d3 --- /dev/null +++ b/app/assets/javascripts/app/views/layout_ref/chat_to_ticket.jst.eco @@ -0,0 +1,208 @@ +