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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (+13 lines)
Lines 121-126 Link Here
121
                                </div>
121
                                </div>
122
                            [% END %]
122
                            [% END %]
123
123
124
                            [% IF OpenLibraryCovers %]
125
                                <div class="cover-image" id="openlibrary-coverimg">
126
                                    <div title="[% img_title | html %]" class="[% normalized_isbn | html %]" id="openlibrary-thumbnail-preview" data-use-data-link="1"></div>
127
                                    <div class="hint">Image from OpenLibrary</div>
128
                                </div>
129
                            [% END %]
130
124
                            [% IF Koha.Preference('OPACCustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %]
131
                            [% IF Koha.Preference('OPACCustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %]
125
                                [% SET custom_cover_image_url = biblio.custom_cover_image_url %]
132
                                [% SET custom_cover_image_url = biblio.custom_cover_image_url %]
126
                                [% IF custom_cover_image_url %]
133
                                [% IF custom_cover_image_url %]
Lines 1662-1667 Link Here
1662
                KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]',[% covernewwindow | html %]);
1669
                KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]',[% covernewwindow | html %]);
1663
            [% END %]
1670
            [% END %]
1664
1671
1672
            [% IF OpenLibraryCovers %]
1673
                KOHA.OpenLibrary.GetCoverFromIsbn();
1674
            [% END %]
1675
1665
        function verify_images() {
1676
        function verify_images() {
1666
            // Loop over each container in the template which contains covers
1677
            // Loop over each container in the template which contains covers
1667
            $(".cover-slider").each(function(){
1678
            $(".cover-slider").each(function(){
Lines 1703-1708 Link Here
1703
                                lightbox_descriptions.push("Image from Syndetics")
1714
                                lightbox_descriptions.push("Image from Syndetics")
1704
                            } else if( div.attr("id") == "googlejacket-coverimg" ){
1715
                            } else if( div.attr("id") == "googlejacket-coverimg" ){
1705
                                lightbox_descriptions.push(_("Image from Google Jacket (<a href='%s'>see the original image</a>)").format($(img).data('link')));
1716
                                lightbox_descriptions.push(_("Image from Google Jacket (<a href='%s'>see the original image</a>)").format($(img).data('link')));
1717
                            } else if( div.attr("id") == "openlibrary-coverimg" ){
1718
                                lightbox_descriptions.push(_("Image from OpenLibrary (<a href='%s'>see the original image</a>)").format($(img).data('link')));
1706
                            } else if( div.attr("id") == "coce-coverimg" ){
1719
                            } else if( div.attr("id") == "coce-coverimg" ){
1707
                                // Identify which service's image is being loaded by Coce
1720
                                // Identify which service's image is being loaded by Coce
1708
                                var coce_description;
1721
                                var coce_description;
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/openlibrary.js (-6 / +9 lines)
Lines 40-54 KOHA.OpenLibrary = new function() { Link Here
40
            var book = booksInfo[id];
40
            var book = booksInfo[id];
41
            var isbn = id.substring(5);
41
            var isbn = id.substring(5);
42
            $("[id^=openlibrary-thumbnail]."+isbn).each(function() {
42
            $("[id^=openlibrary-thumbnail]."+isbn).each(function() {
43
                var is_opacdetail = /openlibrary-thumbnail-preview/.exec($(this).attr("id"));
44
                var a = document.createElement("a");
43
                var a = document.createElement("a");
45
                a.href = booksInfo.url;
44
                a.href = booksInfo.url;
46
                if (book.cover) {
45
                if (book.cover) {
47
                    var img = document.createElement("img");
46
                    if ( $(this).data('use-data-link') ) {
48
                    if (is_opacdetail) {
47
                         var a = document.createElement("a");
49
                        img.src = book.cover.medium;
48
                         a.href = book.cover.large;
50
                        $(this).empty().append(img);
49
                         var img = document.createElement("img");
50
                         img.src = book.cover.medium;
51
                         img.setAttribute('data-link', book.cover.large);
52
                         a.append(img)
53
                         $(this).empty().append(a);
51
                    } else {
54
                    } else {
55
                        var img = document.createElement("img");
52
                        img.src = book.cover.medium;
56
                        img.src = book.cover.medium;
53
                        img.height = '110';
57
                        img.height = '110';
54
                        $(this).append(img);
58
                        $(this).append(img);
55
- 

Return to bug 28180