View | Details | Raw Unified | Return to bug 29803
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-2 / +6 lines)
Lines 1543-1551 Link Here
1543
            });
1543
            });
1544
        } /* /verify_images */
1544
        } /* /verify_images */
1545
1545
1546
        let counter_wait = 0;
1546
        function wait_for_images(cb){
1547
        function wait_for_images(cb){
1547
1548
1548
            var loaded = 1;
1549
            var loaded = 1;
1550
            counter_wait++;
1549
1551
1550
            [% IF GoogleJackets %]
1552
            [% IF GoogleJackets %]
1551
                if ( loaded ) {
1553
                if ( loaded ) {
Lines 1565-1573 Link Here
1565
                }
1567
                }
1566
            [% END %]
1568
            [% END %]
1567
1569
1568
            if (!loaded) {
1570
            if (!loaded && counter_wait < 50) {// Do not wait more than 5 seconds
1569
                window.setTimeout(function(){wait_for_images(cb);}, 100);
1571
                window.setTimeout(function(){wait_for_images(cb);}, 100);
1570
            } else {
1572
            } else {
1573
                if (counter_wait >= 50 ) {
1574
                    console.log("Could not retrieve the images")
1575
                }
1571
                cb();
1576
                cb();
1572
            }
1577
            }
1573
        }
1578
        }
1574
- 

Return to bug 29803