Merge branch 'master' of github.com:martini/zammad
This commit is contained in:
commit
97c330ab63
2 changed files with 37 additions and 1 deletions
|
@ -1,4 +1,9 @@
|
||||||
class App.TicketHistory extends App.ControllerModal
|
class App.TicketHistory extends App.ControllerModal
|
||||||
|
|
||||||
|
events:
|
||||||
|
'click [data-type=sortorder]': 'sortorder',
|
||||||
|
'click .close': 'close',
|
||||||
|
|
||||||
constructor: ->
|
constructor: ->
|
||||||
super
|
super
|
||||||
@fetch(@ticket_id)
|
@fetch(@ticket_id)
|
||||||
|
@ -49,3 +54,33 @@ class App.TicketHistory extends App.ControllerModal
|
||||||
|
|
||||||
# show frontend times
|
# show frontend times
|
||||||
@delay( @frontendTimeUpdate, 200 )
|
@delay( @frontendTimeUpdate, 200 )
|
||||||
|
|
||||||
|
sortorder: ->
|
||||||
|
isSorted = @el.find('.sorted')
|
||||||
|
@log 'is sorted?', isSorted
|
||||||
|
if isSorted.length
|
||||||
|
@sortstate = 'notsorted'
|
||||||
|
@html App.view('agent_ticket_history')(
|
||||||
|
objects: App.Collection.all( type: 'History' ),
|
||||||
|
state: @sortstate
|
||||||
|
)
|
||||||
|
else
|
||||||
|
@sortstate = 'sorted'
|
||||||
|
@html App.view('agent_ticket_history')(
|
||||||
|
objects: App.Collection.all( type: 'History' ).reverse(),
|
||||||
|
state: @sortstate
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@modalShow()
|
||||||
|
|
||||||
|
# enable user popups
|
||||||
|
@userPopups()
|
||||||
|
|
||||||
|
# show frontend times
|
||||||
|
@delay( @frontendTimeUpdate, 200 )
|
||||||
|
|
||||||
|
close: ->
|
||||||
|
# close modal
|
||||||
|
@modalHide()
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<a href="#" class="close">×</a>
|
<a href="#" class="close">×</a>
|
||||||
<h2><%- @T( 'History' ) %></h2>
|
<h2><%- @T( 'History' ) %></h2>
|
||||||
|
<a href="#" data-type="sortorder" id="sortorder" class="<%= @state %>"><%- @T( 'Change order' ) %></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue