article_new: remove old recipient list

This commit is contained in:
Felix Niklas 2015-12-04 11:23:57 +01:00
parent 83a7163b7c
commit ad080b6831
2 changed files with 0 additions and 71 deletions

View file

@ -21,12 +21,9 @@ class App.TicketZoomArticleNew extends App.Controller
'click .js-toggleVisibility': 'toggleVisibility' 'click .js-toggleVisibility': 'toggleVisibility'
'click .js-articleTypeItem': 'selectArticleType' 'click .js-articleTypeItem': 'selectArticleType'
'click .js-selectedArticleType': 'showSelectableArticleType' 'click .js-selectedArticleType': 'showSelectableArticleType'
'click .recipient-picker': 'toggle_recipients'
'click .recipient-list': 'stopPropagation'
'click .js-mail-inputs': 'stopPropagation' 'click .js-mail-inputs': 'stopPropagation'
'click .js-writeArea': 'stopPropagation' 'click .js-writeArea': 'stopPropagation'
'click .list-entry-type div': 'change_type' 'click .list-entry-type div': 'change_type'
'submit .recipient-list form': 'add_recipient'
'focus .js-textarea': 'openTextarea' 'focus .js-textarea': 'openTextarea'
#'dragenter': 'onDragenter' #'dragenter': 'onDragenter'
#'dragleave': 'onDragleave' #'dragleave': 'onDragleave'
@ -231,72 +228,10 @@ class App.TicketZoomArticleNew extends App.Controller
) )
@subscribeIdTextModule = ticket.subscribe( callback ) @subscribeIdTextModule = ticket.subscribe( callback )
toggle_recipients: =>
if !@pickRecipientsCatcher
@show_recipients()
else
@hide_recipients()
show_recipients: ->
padding = 15
@recipientPicker.addClass('is-open')
@recipientList.removeClass('hide')
pickerDimensions = @recipientPicker.get(0).getBoundingClientRect()
availableHeight = @recipientPicker.scrollParent().outerHeight()
top = pickerDimensions.height/2 - @recipientList.height()/2
bottomDistance = availableHeight - padding - (pickerDimensions.top + top + @recipientList.height())
if bottomDistance < 0
top += bottomDistance
arrowCenter = -top + pickerDimensions.height/2
@recipientListArrow.css('top', arrowCenter)
@recipientList.css('top', top)
$.Velocity.hook(@recipientList, 'transformOriginX', '0')
$.Velocity.hook(@recipientList, 'transformOriginY', "#{ arrowCenter }px")
@recipientList.velocity
properties:
scale: [ 1, 0 ]
opacity: [ 1, 0 ]
options:
speed: 300
easing: [ 0.34, 1.61, 0.7, 1 ]
@pickRecipientsCatcher = new App.ClickCatcher
holder: @el.offsetParent()
callback: @hide_recipients
zIndexScale: 6
hide_recipients: =>
@pickRecipientsCatcher.remove()
@pickRecipientsCatcher = null
@recipientPicker.removeClass('is-open')
@recipientList.velocity
properties:
scale: [ 0, 1 ]
opacity: [ 0, 1 ]
options:
speed: 300
easing: [ 500, 20 ]
complete: -> @recipientList.addClass('hide')
change_type: (e) -> change_type: (e) ->
$(e.target).addClass('active').siblings('.active').removeClass('active') $(e.target).addClass('active').siblings('.active').removeClass('active')
# store $(this).data('value') # store $(this).data('value')
add_recipient: (e) ->
e.stopPropagation()
e.preventDefault()
# store recipient
toggleVisibility: (event) -> toggleVisibility: (event) ->
event.stopPropagation() event.stopPropagation()
if @articleNewEdit.hasClass 'is-public' if @articleNewEdit.hasClass 'is-public'

View file

@ -33,12 +33,6 @@
</div> </div>
</div> </div>
<div class="article-content zIndex-5 bubble-gap"> <div class="article-content zIndex-5 bubble-gap">
<!--
<label class="recipients"><%- @T('Recipients') %>
<div class="avatar" style="background-image: url(https://pbs.twimg.com/profile_images/1216362658/DSC_0084-p_normal.jpg)"></div>
<div class="avatar" style="background-image: url(https://pbs.twimg.com/profile_images/1216362658/DSC_0084-p_bigger.jpg)"></div>
</label>
-->
<div class="internal-border"> <div class="internal-border">
<div class="input form-group"> <div class="input form-group">