Improved translations and added language change support in overview for batch feature.
This commit is contained in:
parent
e4193c640f
commit
4d2e578edf
5 changed files with 36 additions and 24 deletions
|
@ -30,6 +30,10 @@ class App.TicketOverview extends App.Controller
|
|||
@batchSupport = @permissionCheck('ticket.agent')
|
||||
@render()
|
||||
|
||||
# rerender view, e. g. on language change
|
||||
@bind 'ui:rerender', =>
|
||||
@renderBatchOverlay()
|
||||
|
||||
startDragItem: (event) =>
|
||||
return if !@batchSupport
|
||||
@grabbedItem = $(event.currentTarget)
|
||||
|
@ -547,6 +551,8 @@ class App.TicketOverview extends App.Controller
|
|||
keyboardOn: @keyboardOn
|
||||
keyboardOff: @keyboardOff
|
||||
|
||||
@renderBatchOverlay(elLocal.filter('.js-batch-overlay'))
|
||||
|
||||
@html elLocal
|
||||
|
||||
@el.find('.main').on('click', =>
|
||||
|
@ -562,6 +568,13 @@ class App.TicketOverview extends App.Controller
|
|||
App.OverviewListCollection.fetch(@view)
|
||||
@delay(update, 2800, 'overview:fetch')
|
||||
|
||||
renderBatchOverlay: (elLocal) =>
|
||||
if elLocal
|
||||
elLocal.html( App.view('ticket_overview/batch_overlay')() )
|
||||
return
|
||||
@batchOverlay.html( App.view('ticket_overview/batch_overlay')() )
|
||||
@refreshElements()
|
||||
|
||||
renderOptions: =>
|
||||
macros = App.Macro.findAllByAttribute('active', true)
|
||||
groups = App.Group.findAllByAttribute('active', true)
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
<div class="stat-graphic">
|
||||
<%- @Icon('reopening', "reopening-icon #{@StatsTicketReopen.state}-color") %>
|
||||
</div>
|
||||
<div class="stat-label"><%- @T('%s% are being reopened', @StatsTicketReopen.percent) %></div>
|
||||
<div class="stat-label"><%- @T('%s% have been reopened', @StatsTicketReopen.percent) %></div>
|
||||
<div class="stat-detail"><%- @T('Average: %s%', @StatsTicketReopen.average_per_agent) %></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
<div class="batch-overlay-backdrop js-batch-overlay-backdrop"></div>
|
||||
<div class="batch-overlay-cancel js-batch-cancel">
|
||||
<%- @T('drag here to cancel') %>
|
||||
</div>
|
||||
<div class="batch-overlay-circle batch-overlay-circle--top js-batch-macro-circle">
|
||||
<div class="batch-overlay-circle-label"><%- @T('run macro') %></div>
|
||||
<%- @Icon('arrow-up') %>
|
||||
</div>
|
||||
<div class="batch-overlay-circle batch-overlay-circle--bottom js-batch-assign-circle">
|
||||
<%- @Icon('arrow-down') %>
|
||||
<div class="batch-overlay-circle-label"><%- @T('assign tickets') %></div>
|
||||
</div>
|
||||
<div class="batch-overlay-assign batch-overlay-box js-batch-assign">
|
||||
<div class="batch-overlay-box-inner js-batch-assign-inner"></div>
|
||||
</div>
|
||||
<div class="batch-overlay-macro batch-overlay-box js-batch-macro"></div>
|
||||
<div class="batch-overlay-assign batch-overlay-assign-group batch-overlay-box js-batch-assign-group">
|
||||
<div class="batch-overlay-assign-group-name js-batch-assign-group-name"></div>
|
||||
<div class="batch-overlay-box-inner js-batch-assign-group-inner"></div>
|
||||
</div>
|
|
@ -3,25 +3,4 @@
|
|||
<div class="overview-header"></div>
|
||||
<div class="overview-table"></div>
|
||||
</div>
|
||||
<div class="batch-overlay js-batch-overlay">
|
||||
<div class="batch-overlay-backdrop js-batch-overlay-backdrop"></div>
|
||||
<div class="batch-overlay-cancel js-batch-cancel">
|
||||
<%- @T('drag here to cancel') %>
|
||||
</div>
|
||||
<div class="batch-overlay-circle batch-overlay-circle--top js-batch-macro-circle">
|
||||
<div class="batch-overlay-circle-label"><%- @T('run macro') %></div>
|
||||
<%- @Icon('arrow-up') %>
|
||||
</div>
|
||||
<div class="batch-overlay-circle batch-overlay-circle--bottom js-batch-assign-circle">
|
||||
<%- @Icon('arrow-down') %>
|
||||
<div class="batch-overlay-circle-label"><%- @T('assign tickets') %></div>
|
||||
</div>
|
||||
<div class="batch-overlay-assign batch-overlay-box js-batch-assign">
|
||||
<div class="batch-overlay-box-inner js-batch-assign-inner"></div>
|
||||
</div>
|
||||
<div class="batch-overlay-macro batch-overlay-box js-batch-macro"></div>
|
||||
<div class="batch-overlay-assign batch-overlay-assign-group batch-overlay-box js-batch-assign-group">
|
||||
<div class="batch-overlay-assign-group-name js-batch-assign-group-name"></div>
|
||||
<div class="batch-overlay-box-inner js-batch-assign-group-inner"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="batch-overlay js-batch-overlay"></div>
|
|
@ -5,7 +5,7 @@
|
|||
</div>
|
||||
<div class="popover-content js-content">
|
||||
<div class="activity-placeholder js-noNotifications">
|
||||
<%- @T("No unread notifications for you. :) ") %>
|
||||
<%- @T("No unread notifications for you. :)") %>
|
||||
</div>
|
||||
<div class="js-items"></div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue