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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-2 / +2 lines)
Lines 1880-1886 Link Here
1880
                                    KOHA.Google.GetCoverFromIsbn([% covernewwindow | html %]);
1880
                                    KOHA.Google.GetCoverFromIsbn([% covernewwindow | html %]);
1881
                                [% END %]
1881
                                [% END %]
1882
                                [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
1882
                                [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
1883
                                    KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]',[% covernewwindow | html %]);
1883
                                    KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]', $("#bibliodescriptions"));
1884
                                [% END %]
1884
                                [% END %]
1885
                                [% IF OpenLibraryCovers %]
1885
                                [% IF OpenLibraryCovers %]
1886
                                    KOHA.OpenLibrary.GetCoverFromIsbn();
1886
                                    KOHA.OpenLibrary.GetCoverFromIsbn();
Lines 1906-1912 Link Here
1906
                                    KOHA.Google.GetCoverFromIsbn([% covernewwindow | html %]);
1906
                                    KOHA.Google.GetCoverFromIsbn([% covernewwindow | html %]);
1907
                                [% END %]
1907
                                [% END %]
1908
                                [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
1908
                                [% IF ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) %]
1909
                                    KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]',[% covernewwindow | html %]);
1909
                                    KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]', $("#bibliodescriptions"));
1910
                                [% END %]
1910
                                [% END %]
1911
                                [% IF OpenLibraryCovers %]
1911
                                [% IF OpenLibraryCovers %]
1912
                                    KOHA.OpenLibrary.GetCoverFromIsbn();
1912
                                    KOHA.OpenLibrary.GetCoverFromIsbn();
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/coce.js (-4 / +5 lines)
Lines 14-22 KOHA.coce = { Link Here
14
     * and run a search with all collected isbns to coce cover service.
14
     * and run a search with all collected isbns to coce cover service.
15
     * The result is asynchronously returned, and used to append <img>.
15
     * The result is asynchronously returned, and used to append <img>.
16
     */
16
     */
17
    getURL: function(host, provider) {
17
    getURL: function(host, provider, parent=null) {
18
        var ids = [];
18
        var ids = [];
19
        $("[id^=coce-thumbnail]").each(function() {
19
        const thumbnail_selector = "[id^=coce-thumbnail]";
20
        let thumbnail_nodes = parent ? parent.find(thumbnail_selector) : $(thumbnail_selector);
21
        thumbnail_nodes.each(function() {
20
            var id = $(this).attr("class"); // id=isbn
22
            var id = $(this).attr("class"); // id=isbn
21
            if (id !== '') { ids.push(id); }
23
            if (id !== '') { ids.push(id); }
22
        });
24
        });
Lines 40-46 KOHA.coce = { Link Here
40
                            }
42
                            }
41
                        };
43
                        };
42
                        $(this).attr('href', url);
44
                        $(this).attr('href', url);
43
                        $(this).empty().append(img);
45
                        $(this).append(img);
44
                    });
46
                    });
45
                }
47
                }
46
            },
48
            },
47
- 

Return to bug 32412