Improve wishes progressbar

This commit is contained in:
grandeljay 2022-02-27 13:36:12 +01:00
parent df15efcf4d
commit 5471bdd3c9

View file

@ -91,7 +91,10 @@ $(function () {
progress.slideDown(); progress.slideDown();
progress.removeClass('indeterminate'); progress.removeClass('indeterminate');
progress.progress({ progress.progress({
total: cards.length total: cards.length,
onSuccess: function() {
$(this).slideUp();
}
}); });
} else { } else {
progress.slideUp(); progress.slideUp();
@ -140,7 +143,7 @@ $(function () {
.then(handleFetchError) .then(handleFetchError)
.then(handleFetchResponse) .then(handleFetchResponse)
.then(function(response) { .then(function(response) {
card.html(response.html); card.replaceWith(response.html);
}) })
.catch(function(error) { .catch(function(error) {
console.log(error); console.log(error);
@ -149,6 +152,8 @@ $(function () {
card.attr('data-cache', 'true'); card.attr('data-cache', 'true');
card.removeClass('loading'); card.removeClass('loading');
progress.progress('increment');
$('.ui.dropdown').dropdown(); $('.ui.dropdown').dropdown();
}); });