mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 18:21:04 +08:00
24 lines
650 B
JavaScript
24 lines
650 B
JavaScript
(function() {
|
|
function init() {
|
|
$('.workflowimg-container').each(function() {
|
|
let container = $(this);
|
|
if (container.data('workflowimg-present') === false) {
|
|
let imgUrl = container.data('workflowimg-url');
|
|
container.find('.workflowimg-spinner').removeClass('hidden');
|
|
$.ajax({
|
|
url: imgUrl,
|
|
type: 'GET',
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
container.html(data.workflowimg);
|
|
},
|
|
error: function() {
|
|
container.find('.workflowimg-spinner').addClass('hidden');
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}
|
|
|
|
init();
|
|
}());
|