diff --git a/app/assets/javascripts/app/controllers/layout_ref.coffee b/app/assets/javascripts/app/controllers/layout_ref.coffee index 9849d3e62..d4ff5b290 100644 --- a/app/assets/javascripts/app/controllers/layout_ref.coffee +++ b/app/assets/javascripts/app/controllers/layout_ref.coffee @@ -2183,11 +2183,19 @@ class ChatToTicketRef extends App.ControllerContent elements: '.js-scrollHolder': 'scrollHolder' + '.js-boxFade': 'boxFade' + '.js-attachments': 'attachments' + '.js-chatBox': 'chatBox' + + events: + 'input .js-textInput': 'placeBoxFade' constructor: -> super @render() @scrollToBottom() + @boxFade.height @chatBox.outerHeight() + @placeBoxFade() render: -> @html App.view('layout_ref/chat_to_ticket')() @@ -2195,6 +2203,14 @@ class ChatToTicketRef extends App.ControllerContent scrollToBottom: -> @scrollHolder.scrollTop(@scrollHolder.prop('scrollHeight')) + placeBoxFade: => + y1 = @attachments.offset().top - @boxFade.offset().top + + @boxFade.html App.view('layout_ref/boxFade') + width: @attachments.offset().left - @boxFade.offset().left + height: @boxFade.height() + y1: y1 + y2: y1 + @attachments.outerHeight() App.Config.set( 'layout_ref/chat_to_ticket', ChatToTicketRef, 'Routes' ) diff --git a/app/assets/javascripts/app/views/layout_ref/boxFade.jst.eco b/app/assets/javascripts/app/views/layout_ref/boxFade.jst.eco new file mode 100644 index 000000000..81b545360 --- /dev/null +++ b/app/assets/javascripts/app/views/layout_ref/boxFade.jst.eco @@ -0,0 +1,9 @@ + \ 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 index 30b676bed..40bf0b8bd 100644 --- 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 @@ -1,5 +1,5 @@