Re-Enabled some features in new article widget.
This commit is contained in:
parent
fdaae821d4
commit
80b9f5ddad
2 changed files with 20 additions and 50 deletions
|
@ -681,7 +681,7 @@ class TicketMeta extends App.Controller
|
|||
|
||||
class Edit extends App.Controller
|
||||
elements:
|
||||
'.js-textarea' : 'textarea'
|
||||
'.js-textarea': 'textarea'
|
||||
'.attachmentPlaceholder': 'attachmentPlaceholder'
|
||||
'.attachmentPlaceholder-inputHolder': 'attachmentInputHolder'
|
||||
'.attachmentPlaceholder-hint': 'attachmentHint'
|
||||
|
@ -690,7 +690,7 @@ class Edit extends App.Controller
|
|||
'.attachmentUpload': 'attachmentUpload'
|
||||
'.attachmentUpload-progressBar':'progressBar'
|
||||
'.js-percentage': 'progressText'
|
||||
#'.edit-control-item' : 'editControlItem'
|
||||
'.edit-control-item': 'editControlItem'
|
||||
#'.edit-controls': 'editControls'
|
||||
#'.recipient-picker': 'recipientPicker'
|
||||
#'.recipient-list': 'recipientList'
|
||||
|
@ -733,7 +733,6 @@ class Edit extends App.Controller
|
|||
e.stopPropagation()
|
||||
|
||||
release: =>
|
||||
#@autosaveStop()
|
||||
if @subscribeIdTextModule
|
||||
App.Ticket.unsubscribe(@subscribeIdTextModule)
|
||||
|
||||
|
@ -773,13 +772,14 @@ class Edit extends App.Controller
|
|||
icon: 'note'
|
||||
},
|
||||
]
|
||||
console.log('DEvvvvvV', @defaults)
|
||||
|
||||
@html App.view('ticket_zoom/edit')(
|
||||
ticket: ticket
|
||||
articleTypes: articleTypes
|
||||
article: @defaults
|
||||
isCustomer: @isRole('Customer')
|
||||
)
|
||||
@setArticleType(@type)
|
||||
|
||||
configure_attributes = [
|
||||
{ name: 'customer_id', display: 'Recipients', tag: 'user_autocompletion', null: false, placeholder: 'Enter Person or Organisation/Company', minLengt: 2, disableCreateUser: false },
|
||||
|
@ -802,7 +802,7 @@ class Edit extends App.Controller
|
|||
# show text module UI
|
||||
if !@isRole('Customer')
|
||||
textModule = new App.WidgetTextModule(
|
||||
el: @el
|
||||
el: @$('.js-textarea').parent()
|
||||
data:
|
||||
ticket: ticket
|
||||
)
|
||||
|
@ -922,6 +922,7 @@ class Edit extends App.Controller
|
|||
@remove_textarea_catcher()
|
||||
|
||||
open_textarea: (event, withoutAnimation) =>
|
||||
console.log('ticketEdit', @ticketEdit.hasClass('is-open'))
|
||||
if !@ticketEdit.hasClass('is-open')
|
||||
duration = 300
|
||||
|
||||
|
@ -940,20 +941,19 @@ class Edit extends App.Controller
|
|||
complete: => @add_textarea_catcher()
|
||||
|
||||
# scroll to bottom
|
||||
# @textarea.velocity "scroll",
|
||||
# container: @textarea.scrollParent()
|
||||
# offset: 99999
|
||||
# duration: 300
|
||||
# easing: 'easeOutQuad'
|
||||
# queue: false
|
||||
@textarea.velocity "scroll",
|
||||
container: @textarea.scrollParent()
|
||||
offset: 99999
|
||||
duration: 300
|
||||
easing: 'easeOutQuad'
|
||||
queue: false
|
||||
|
||||
# @editControlItem.velocity "transition.slideRightIn",
|
||||
# duration: 300
|
||||
# stagger: 50
|
||||
# drag: true
|
||||
@editControlItem.velocity "transition.slideRightIn",
|
||||
duration: 300
|
||||
stagger: 50
|
||||
drag: true
|
||||
|
||||
# move attachment text to the left bottom (bottom happens automatically)
|
||||
|
||||
@attachmentPlaceholder.velocity
|
||||
properties:
|
||||
translateX: -@attachmentInputHolder.position().left + "px"
|
||||
|
@ -1004,7 +1004,7 @@ class Edit extends App.Controller
|
|||
options:
|
||||
duration: 300
|
||||
|
||||
# @editControlItem.css('display', 'none')
|
||||
@editControlItem.css('display', 'none')
|
||||
|
||||
onDragenter: (event) =>
|
||||
# on the first event,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div class="bubble-grid horizontal">
|
||||
<div class="vertical center edit-controls">
|
||||
<%- App.User.fullLocal( @S('id') ).avatar(false, 'right', 'zIndex-5') %>
|
||||
<div class="dark pop-select zIndex-7 edit-control-item" style="display: block;">
|
||||
<div class="dark pop-select zIndex-7 edit-control-item">
|
||||
<div class="pop-selected u-clickable centered">
|
||||
<div class="gray <%- @article.type %> channel icon"></div>
|
||||
</div>
|
||||
|
@ -18,7 +18,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="visibility-toggle zIndex-7 u-clickable edit-control-item" style="display: block;">
|
||||
<div class="visibility-toggle zIndex-7 u-clickable edit-control-item">
|
||||
<div class="internal-visibility centered" title="<%- @T("unset internal") %>">
|
||||
<div class="internal visibility icon"></div>
|
||||
</div>
|
||||
|
@ -39,37 +39,7 @@
|
|||
<div class="bubble-arrow"></div>
|
||||
<div class="js-textarea ticketEdit-body" contenteditable="true" data-name="body"><%= @article.body %></div>
|
||||
<!-- .text-bubble grows with textarea (and expanding clone) -->
|
||||
|
||||
<div class="shortcut dropdown">
|
||||
<ul class="dropdown-menu" style="width: 240px; max-height: 200px;">
|
||||
<li><a href="#">shortcut 1</a></li>
|
||||
<li><a href="#">shortcut 2</a></li>
|
||||
<li><a href="#">shortcut 3</a></li>
|
||||
<li><a href="#">shortcut 4</a></li>
|
||||
<li><a href="#">shortcut 5</a></li>
|
||||
<li><a href="#">shortcut 6</a></li>
|
||||
<li><a href="#">shortcut 7</a></li>
|
||||
<li><a href="#">shortcut 8</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="attachments"></div>
|
||||
<!--
|
||||
</div>
|
||||
<div class="attachment horizontal">
|
||||
<div class="attachment-name u-highlight">sega-genesis-box.gif</div>
|
||||
<div class="attachment-size">2.4mb</div>
|
||||
<div class="attachment-delete js-delete align-right u-clickable">
|
||||
<div class="delete icon"></div><%- @T('Delete File') %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="attachment horizontal">
|
||||
<div class="attachment-name u-highlight">license-key.txt</div>
|
||||
<div class="attachment-size">7kb</div>
|
||||
<div class="attachment-delete js-delete align-right u-clickable">
|
||||
<div class="delete icon"></div><%- @T('Delete File') %>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="article-attachment u-unclickable">
|
||||
<div class="attachmentPlaceholder">
|
||||
<span class="attachmentPlaceholder-hint">Antwort eingeben oder</span>
|
||||
|
|
Loading…
Reference in a new issue