diff --git a/app/assets/javascripts/app/controllers/layout_ref.js.coffee b/app/assets/javascripts/app/controllers/layout_ref.js.coffee index e3f9c6bb0..875932637 100644 --- a/app/assets/javascripts/app/controllers/layout_ref.js.coffee +++ b/app/assets/javascripts/app/controllers/layout_ref.js.coffee @@ -19,10 +19,6 @@ class Content extends App.ControllerContent super @render() - @textareaHeight = - open: 148 - closed: 20 - @dragEventCounter = 0 @attachments = [] @@ -151,6 +147,8 @@ class LayoutRefCommunicationReply extends App.ControllerContent open: 148 closed: 20 + @open_textarea(null, true) if @content + @dragEventCounter = 0 @attachments = [] @@ -171,8 +169,13 @@ class LayoutRefCommunicationReply extends App.ControllerContent else @remove_textarea_catcher() - open_textarea: => - if !@textareaCatcher and !@textarea.text() and !@attachments.length + open_textarea: (event, withoutAnimation) => + if !@ticketEdit.hasClass('is-open') + duration = 300 + + if withoutAnimation + duration = 0 + @ticketEdit.addClass('is-open') @textarea.velocity @@ -180,7 +183,7 @@ class LayoutRefCommunicationReply extends App.ControllerContent minHeight: "#{ @textareaHeight.open - 38 }px" marginBottom: 38 options: - duration: 300 + duration: duration easing: 'easeOutQuad' complete: => @add_textarea_catcher() @@ -203,14 +206,14 @@ class LayoutRefCommunicationReply extends App.ControllerContent properties: translateX: -@attachmentInputHolder.position().left + "px" options: - duration: 300 + duration: duration easing: 'easeOutQuad' @attachmentHint.velocity properties: opacity: 0 options: - duration: 300 + duration: duration add_textarea_catcher: -> @textareaCatcher = new App.clickCatcher diff --git a/app/assets/stylesheets/zzz.css.erb b/app/assets/stylesheets/zzz.css.erb index 61f69638d..b12ebac80 100644 --- a/app/assets/stylesheets/zzz.css.erb +++ b/app/assets/stylesheets/zzz.css.erb @@ -2508,6 +2508,7 @@ footer { padding: 5px; border-radius: 8px; margin: -5px; + overflow: hidden; } .is-internal .internal-border { @@ -2584,7 +2585,8 @@ footer { box-shadow: none; } - .ticket-article-item .attachments:not(:empty) { + .ticket-article-item .attachments { + border-top: 1px solid hsl(0,0%,93%); white-space: normal; margin: 0 -20px; padding: 26px 20px 7px 72px; @@ -2871,10 +2873,10 @@ footer { color: #b3b3b3; } - .attachments:not(:empty) { + .ticket-edit .attachments:not(:empty) { padding: 9px 5px; border-top: 1px solid hsl(0,0%,93%); - margin-bottom: 50px; + margin: 0 -20px 50px; } .attachment {