[Koha-bugs] [Bug 32642] Loading spinner always visible when cover image is short (OPAC)

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Mar 24 09:04:22 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642

Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Failed QA

--- Comment #8 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
The whole code around these images indeed requires some code digging to
understand whats going on ;)

I have the impression that the new lines:
            if( $(".cover-slider").find(".cover-image:visible").length > 0 ){
                $(".cover-slider").removeClass("cover-slides");
            }
should be placed elsewhere. Now they are executed after the recursive calls or
the callback. But this does not yet guarantee that all images are already
loaded. And it also means that the new lines could be executed repeatedly which
is unneeded.

In the callback verify_cover_images we activate the spinner actually:
                if( $(coverSlide).find(".cover-image:visible").length < 1 ){
                    $(coverSlide).remove();
                } else {
                    $(coverSlide).addClass("cover-slides");
                }

We should only remove the spinner when the image has been loaded locally. So
shouldnt we check if the local loading has been completed?
So remove the spinner in image onload and check image.complete ?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list