From a82b24d4c1757701df0ab1ee8c3963b7d23c31de Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Tue, 2 Feb 2021 11:19:20 +0100 Subject: [PATCH 1/2] specify width and height Was too small, almost invisible. --- app/views/spree/admin/orders/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/spree/admin/orders/index.html.haml b/app/views/spree/admin/orders/index.html.haml index b72a0506a6..6ab4d5a238 100644 --- a/app/views/spree/admin/orders/index.html.haml +++ b/app/views/spree/admin/orders/index.html.haml @@ -81,7 +81,7 @@ %span{'ng-bind-html' => 'order.display_total'} %td.actions %div.row-loading-icons - %span{ng: {show: 'rowStatus[order.id] == "loading"', cloak: true}} + %div{ng: {show: 'rowStatus[order.id] == "loading"', cloak: true}, style: "width: 30px; height: 30px;"} = render partial: "components/spinner" %i.success.icon-ok-sign{ng: {show: 'rowStatus[order.id] == "success"'} } %i.error.icon-remove-sign.with-tip{ng: {show: 'rowStatus[order.id] == "error"'}, 'ofn-with-tip' => t('.order_not_updated')} From 7aef8a609e686282c333a1d7cdd152fb3d9c3392 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Thu, 4 Feb 2021 11:51:46 +0100 Subject: [PATCH 2/2] Use method image_path Instead of using URL, use the image_path method which computes the path to an image asset in the public images directory. --- .../javascripts/templates/admin/modals/bulk_invoice.html.haml | 2 +- .../javascripts/templates/admin/modals/image_upload.html.haml | 2 +- .../admin/panels/exchange_products_panel_footer.html.haml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/templates/admin/modals/bulk_invoice.html.haml b/app/assets/javascripts/templates/admin/modals/bulk_invoice.html.haml index 16ddb39508..b77175f7ce 100644 --- a/app/assets/javascripts/templates/admin/modals/bulk_invoice.html.haml +++ b/app/assets/javascripts/templates/admin/modals/bulk_invoice.html.haml @@ -6,7 +6,7 @@ %p.error{ ng: { show: 'error' } } {{error}} -%img.spinner{ src: "/assets/spinning-circles.svg", ng: { show: "loading" } } +%img.spinner{ src: image_path("spinning-circles.svg"), ng: { show: "loading" } } %p{ ng: { show: "loading" } } = t('js.admin.orders.index.please_wait') diff --git a/app/assets/javascripts/templates/admin/modals/image_upload.html.haml b/app/assets/javascripts/templates/admin/modals/image_upload.html.haml index f864bbee5f..27234ea444 100644 --- a/app/assets/javascripts/templates/admin/modals/image_upload.html.haml +++ b/app/assets/javascripts/templates/admin/modals/image_upload.html.haml @@ -3,7 +3,7 @@ %form#image_upload{ name: 'form', novalidate: true, enctype: 'multipart/form-data', multipart: true, ng: { controller: "ProductImageCtrl" } } %div.image-preview - %img.spinner{ src: "/assets/spinning-circles.svg", ng: { hide: "!imageUploader.isUploading" }} + %img.spinner{ src: image_path("spinning-circles.svg"), ng: { hide: "!imageUploader.isUploading" }} %img.preview{ng: {src: "{{imagePreview}}", class: "{'faded': imageUploader.isUploading}"}} %label{for: 'image-upload', class: 'button'} {{ 'admin.products.index.upload_an_image' | t }} diff --git a/app/assets/javascripts/templates/admin/panels/exchange_products_panel_footer.html.haml b/app/assets/javascripts/templates/admin/panels/exchange_products_panel_footer.html.haml index 7db48a869a..469d3b066a 100644 --- a/app/assets/javascripts/templates/admin/panels/exchange_products_panel_footer.html.haml +++ b/app/assets/javascripts/templates/admin/panels/exchange_products_panel_footer.html.haml @@ -6,6 +6,6 @@ .sixteen.columns.alpha#loading{ 'ng-show' => 'productsLoading()' } %br - %img.spinner{ src: "/assets/spinning-circles.svg" } + %img.spinner{ src: image_path("spinning-circles.svg")} %h1 {{ 'js.admin.panels.exchange_products.loading_variants' | t }}