fix attachment position

This commit is contained in:
Felix Niklas 2014-10-07 15:59:21 +02:00
parent 95e79b28f8
commit 9fe00faaf3
3 changed files with 38 additions and 7 deletions

View file

@ -135,6 +135,7 @@ class LayoutRefCommunicationReply extends App.ControllerContent
'.attachmentUpload': 'attachmentUpload' '.attachmentUpload': 'attachmentUpload'
'.attachmentUpload-progressBar':'progressBar' '.attachmentUpload-progressBar':'progressBar'
'.js-percentage': 'progressText' '.js-percentage': 'progressText'
'.text-bubble': 'textBubble'
events: events:
'focus .js-textarea': 'open_textarea' 'focus .js-textarea': 'open_textarea'
@ -196,12 +197,18 @@ class LayoutRefCommunicationReply extends App.ControllerContent
@textarea.velocity @textarea.velocity
properties: properties:
minHeight: "#{ @textareaHeight.open - 38 }px" minHeight: "#{ @textareaHeight.open - 38 }px"
marginBottom: 38
options: options:
duration: duration duration: duration
easing: 'easeOutQuad' easing: 'easeOutQuad'
complete: => @add_textarea_catcher() complete: => @add_textarea_catcher()
@textBubble.velocity
properties:
paddingBottom: 28
options:
duration: duration
easing: 'easeOutQuad'
# scroll to bottom # scroll to bottom
# @textarea.velocity "scroll", # @textarea.velocity "scroll",
# container: @textarea.scrollParent() # container: @textarea.scrollParent()
@ -248,12 +255,18 @@ class LayoutRefCommunicationReply extends App.ControllerContent
@textarea.velocity @textarea.velocity
properties: properties:
minHeight: "#{ @textareaHeight.closed }px" minHeight: "#{ @textareaHeight.closed }px"
marginBottom: 0
options: options:
duration: 300 duration: 300
easing: 'easeOutQuad' easing: 'easeOutQuad'
complete: => @ticketEdit.removeClass('is-open') complete: => @ticketEdit.removeClass('is-open')
@textBubble.velocity
properties:
paddingBottom: 0
options:
duration: 300
easing: 'easeOutQuad'
@attachmentPlaceholder.velocity @attachmentPlaceholder.velocity
properties: properties:
translateX: 0 translateX: 0

View file

@ -698,6 +698,7 @@ class Edit extends App.Controller
'.attachmentUpload': 'attachmentUpload' '.attachmentUpload': 'attachmentUpload'
'.attachmentUpload-progressBar':'progressBar' '.attachmentUpload-progressBar':'progressBar'
'.js-percentage': 'progressText' '.js-percentage': 'progressText'
'.text-bubble': 'textBubble'
'.edit-control-item': 'editControlItem' '.edit-control-item': 'editControlItem'
#'.edit-controls': 'editControls' #'.edit-controls': 'editControls'
#'.recipient-picker': 'recipientPicker' #'.recipient-picker': 'recipientPicker'
@ -975,12 +976,18 @@ class Edit extends App.Controller
@textarea.velocity @textarea.velocity
properties: properties:
minHeight: "#{ @textareaHeight.open - 38 }px" minHeight: "#{ @textareaHeight.open - 38 }px"
marginBottom: 38
options: options:
duration: duration duration: duration
easing: 'easeOutQuad' easing: 'easeOutQuad'
complete: => @add_textarea_catcher() complete: => @add_textarea_catcher()
@textBubble.velocity
properties:
paddingBottom: 28
options:
duration: duration
easing: 'easeOutQuad'
# scroll to bottom # scroll to bottom
@textarea.velocity "scroll", @textarea.velocity "scroll",
container: @textarea.scrollParent() container: @textarea.scrollParent()
@ -1027,12 +1034,18 @@ class Edit extends App.Controller
@textarea.velocity @textarea.velocity
properties: properties:
minHeight: "#{ @textareaHeight.closed }px" minHeight: "#{ @textareaHeight.closed }px"
marginBottom: 0
options: options:
duration: 300 duration: 300
easing: 'easeOutQuad' easing: 'easeOutQuad'
complete: => @ticketEdit.removeClass('is-open') complete: => @ticketEdit.removeClass('is-open')
@textBubble.velocity
properties:
paddingBottom: 0
options:
duration: 300
easing: 'easeOutQuad'
@attachmentPlaceholder.velocity @attachmentPlaceholder.velocity
properties: properties:
translateX: 0 translateX: 0

View file

@ -472,11 +472,14 @@ textarea,
box-shadow: 0 0 0 3px hsl(201,62%,90%); box-shadow: 0 0 0 3px hsl(201,62%,90%);
} }
.richtext.form-control {
padding-bottom: 28px;
}
.richtext.form-control [contenteditable] { .richtext.form-control [contenteditable] {
height: auto; height: auto;
min-height: 82px; min-height: 82px;
background: none; background: none;
margin-bottom: 28px;
} }
.has-error .form-control, .has-error .form-control,
@ -2918,6 +2921,8 @@ footer {
border-color: #b3b3b3; border-color: #b3b3b3;
white-space: normal; white-space: normal;
border-radius: 5px; border-radius: 5px;
padding-left: 12px;
padding-right: 12px;
} }
.ticket-edit .text-bubble [contenteditable], .ticket-edit .text-bubble [contenteditable],
@ -2954,10 +2959,10 @@ footer {
overflow: hidden; overflow: hidden;
} }
.ticket-edit .attachments:not(:empty) { .attachments:not(:empty) {
padding: 9px 5px; padding: 9px 5px;
border-top: 1px solid hsl(0,0%,93%); border-top: 1px solid hsl(0,0%,93%);
margin: 0 -20px 50px; margin: 6px -12px 30px;
} }
.attachment { .attachment {