mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-25 01:23:23 +00:00
Merge pull request #8523 from seballot/progress-for-ajax-request
Improve loading spinner display
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
$(document).ready ->
|
||||
progressTimer = null
|
||||
$(document).ajaxStart ->
|
||||
$("#progress").fadeIn()
|
||||
progressTimer = setTimeout ->
|
||||
$("#progress").fadeIn()
|
||||
, 500
|
||||
|
||||
$(document).ajaxStop ->
|
||||
$("#progress").fadeOut()
|
||||
clearTimeout(progressTimer) if progressTimer?
|
||||
$("#progress").stop().hide()
|
||||
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
|
||||
.sixteen.columns.alpha#loading{ 'ng-show' => 'productsLoading()' }
|
||||
%br
|
||||
%img.spinner{ src: image_path("/spinning-circles.svg")}
|
||||
%i.spinner.fa.fa-spin.fa-circle-o-notch
|
||||
%h1
|
||||
{{ 'js.admin.panels.exchange_products.loading_variants' | t }}
|
||||
|
||||
Reference in New Issue
Block a user