mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-26 00:36:01 +08:00
Merge pull request #3230 from okriuchykhin/ok_SCI_5586
Fix experiment workflow image loading [SCI-5586]
This commit is contained in:
commit
39f8cca364
1 changed files with 6 additions and 5 deletions
|
@ -271,20 +271,21 @@
|
|||
}
|
||||
|
||||
function loadExperimentWorkflowImages() {
|
||||
$('.workflowimg-container').each(function() {
|
||||
let container = $(this);
|
||||
$('.experiment-card').each(function() {
|
||||
let card = $(this);
|
||||
let container = $(this).find('.workflowimg-container').first();
|
||||
if (container.data('workflowimg-present') === false) {
|
||||
let imgUrl = container.data('workflowimg-url');
|
||||
container.find('.workflowimg-spinner').removeClass('hidden');
|
||||
card.find('.workflowimg-spinner').removeClass('hidden');
|
||||
$.ajax({
|
||||
url: imgUrl,
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
container.html(data.workflowimg);
|
||||
card.find('.workflowimg-container').html(data.workflowimg);
|
||||
},
|
||||
error: function() {
|
||||
container.find('.workflowimg-spinner').addClass('hidden');
|
||||
card.find('.workflowimg-spinner').addClass('hidden');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue