Use a spinner icon instead of the word "Loading" for thumbnails that are being processed in the background in a batch upload. Also use morphdom to update thumbnails so we only update the parts of the DOM that actually changed.
8 lines
344 B
Plaintext
8 lines
344 B
Plaintext
<% @upload_media_assets.each do |upload_media_asset| %>
|
|
$(function() {
|
|
let $el = $(".upload-media-asset-preview[data-id=<%= upload_media_asset.id %>]").get(0);
|
|
let html = "<%= j render("upload_media_assets/preview", upload_media_asset: upload_media_asset, size: params.fetch(:size, 180)) %>";
|
|
morphdom($el, html);
|
|
});
|
|
<% end %>
|