Added loader icon.
This commit is contained in:
parent
acacee59e2
commit
b6dd55b8bf
2 changed files with 14 additions and 11 deletions
|
@ -130,20 +130,21 @@ class App.UiElement.ticket_selector
|
|||
elementLast.after(elementClone)
|
||||
item.find('.js-filterElement').first().remove()
|
||||
|
||||
triggerSearch = ->
|
||||
item.find('.js-previewCounterContainer').addClass('hide')
|
||||
item.find('.js-previewLoader').removeClass('hide')
|
||||
App.Delay.set(
|
||||
search,
|
||||
600,
|
||||
'preview',
|
||||
)
|
||||
|
||||
# bind for preview
|
||||
item.on('change', 'select.form-control', (e) ->
|
||||
App.Delay.set(
|
||||
search,
|
||||
600,
|
||||
'preview',
|
||||
)
|
||||
triggerSearch()
|
||||
)
|
||||
item.on('change keyup', 'input.form-control', (e) ->
|
||||
App.Delay.set(
|
||||
search,
|
||||
600,
|
||||
'preview',
|
||||
)
|
||||
triggerSearch()
|
||||
)
|
||||
|
||||
item
|
||||
|
@ -160,6 +161,8 @@ class App.UiElement.ticket_selector
|
|||
processData: true,
|
||||
success: (data, status, xhr) =>
|
||||
App.Collection.loadAssets( data.assets )
|
||||
item.find('.js-previewCounterContainer').removeClass('hide')
|
||||
item.find('.js-previewLoader').addClass('hide')
|
||||
@ticketTable(data.ticket_ids, data.ticket_count, item)
|
||||
)
|
||||
|
||||
|
|
|
@ -25,6 +25,6 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="js-preview">
|
||||
<h3><%- @T('Preview') %><span class="subtitle"> <span class="u-highlight js-previewCounter">?</span> <%- @T('matches') %></span></h3>
|
||||
<h3><%- @T('Preview') %><span class="subtitle js-previewCounterContainer hide"> <span class="u-highlight js-previewCounter">?</span> <%- @T('matches') %></span> <span class="tiny loading icon js-previewLoader hide" style="margin-left: 3px;"></span></h3>
|
||||
<div class="js-previewTable"></div>
|
||||
</div>
|
Loading…
Reference in a new issue