Open text box per default.
This commit is contained in:
parent
eac5403042
commit
dde403c795
1 changed files with 13 additions and 8 deletions
|
@ -720,13 +720,14 @@ class Edit extends App.Controller
|
||||||
open: 148
|
open: 148
|
||||||
closed: 20
|
closed: 20
|
||||||
|
|
||||||
|
|
||||||
@dragEventCounter = 0
|
@dragEventCounter = 0
|
||||||
@attachments = []
|
@attachments = []
|
||||||
|
|
||||||
@render()
|
@render()
|
||||||
|
|
||||||
if @textarea.text().trim()
|
if @defaults.body
|
||||||
@ticketEdit.addClass('is-open')
|
@open_textarea(null, true)
|
||||||
|
|
||||||
stopPropagation: (e) ->
|
stopPropagation: (e) ->
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
|
@ -920,9 +921,13 @@ class Edit extends App.Controller
|
||||||
else
|
else
|
||||||
@remove_textarea_catcher()
|
@remove_textarea_catcher()
|
||||||
|
|
||||||
open_textarea: =>
|
open_textarea: (event, withoutAnimation) =>
|
||||||
console.log('OT', @textareaCatcher , @textarea.text().trim() , @attachments.length)
|
if !@ticketEdit.hasClass('is-open')
|
||||||
if !@textareaCatcher and !@textarea.text().trim() and !@attachments.length
|
duration = 300
|
||||||
|
|
||||||
|
if withoutAnimation
|
||||||
|
duration = 0
|
||||||
|
|
||||||
@ticketEdit.addClass('is-open')
|
@ticketEdit.addClass('is-open')
|
||||||
|
|
||||||
@textarea.velocity
|
@textarea.velocity
|
||||||
|
@ -930,7 +935,7 @@ class Edit extends App.Controller
|
||||||
minHeight: "#{ @textareaHeight.open - 38 }px"
|
minHeight: "#{ @textareaHeight.open - 38 }px"
|
||||||
marginBottom: 38
|
marginBottom: 38
|
||||||
options:
|
options:
|
||||||
duration: 300
|
duration: duration
|
||||||
easing: 'easeOutQuad'
|
easing: 'easeOutQuad'
|
||||||
complete: => @add_textarea_catcher()
|
complete: => @add_textarea_catcher()
|
||||||
|
|
||||||
|
@ -953,14 +958,14 @@ class Edit extends App.Controller
|
||||||
properties:
|
properties:
|
||||||
translateX: -@attachmentInputHolder.position().left + "px"
|
translateX: -@attachmentInputHolder.position().left + "px"
|
||||||
options:
|
options:
|
||||||
duration: 300
|
duration: duration
|
||||||
easing: 'easeOutQuad'
|
easing: 'easeOutQuad'
|
||||||
|
|
||||||
@attachmentHint.velocity
|
@attachmentHint.velocity
|
||||||
properties:
|
properties:
|
||||||
opacity: 0
|
opacity: 0
|
||||||
options:
|
options:
|
||||||
duration: 300
|
duration: duration
|
||||||
|
|
||||||
add_textarea_catcher: ->
|
add_textarea_catcher: ->
|
||||||
@textareaCatcher = new App.clickCatcher
|
@textareaCatcher = new App.clickCatcher
|
||||||
|
|
Loading…
Reference in a new issue