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 110-115 Link Here
110
                                </div>
110
                                </div>
111
                            [% END %]
111
                            [% END %]
112
112
113
                            [% IF OpenLibraryCovers %]
114
                                <div class="cover-image" id="openlibrary-coverimg">
115
                                    <div title="[% img_title | html %]" class="[% normalized_isbn | html %]" id="openlibrary-thumbnail-preview" data-use-data-link="1"></div>
116
                                    <div class="hint">Image from OpenLibrary</div>
117
                                </div>
118
                            [% END %]
119
113
                            [% IF Koha.Preference('OPACCustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %]
120
                            [% IF Koha.Preference('OPACCustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %]
114
                                [% SET custom_cover_image_url = biblio.custom_cover_image_url %]
121
                                [% SET custom_cover_image_url = biblio.custom_cover_image_url %]
115
                                [% IF custom_cover_image_url %]
122
                                [% IF custom_cover_image_url %]
Lines 1502-1507 Link Here
1502
                KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]',[% covernewwindow | html %]);
1509
                KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]',[% covernewwindow | html %]);
1503
            [% END %]
1510
            [% END %]
1504
1511
1512
            [% IF OpenLibraryCovers %]
1513
                KOHA.OpenLibrary.GetCoverFromIsbn();
1514
            [% END %]
1515
1505
        function verify_images() {
1516
        function verify_images() {
1506
            // Loop over each container in the template which contains covers
1517
            // Loop over each container in the template which contains covers
1507
            $(".cover-slider").each(function(){
1518
            $(".cover-slider").each(function(){
Lines 1543-1548 Link Here
1543
                                lightbox_descriptions.push("Image from Syndetics")
1554
                                lightbox_descriptions.push("Image from Syndetics")
1544
                            } else if( div.attr("id") == "googlejacket-coverimg" ){
1555
                            } else if( div.attr("id") == "googlejacket-coverimg" ){
1545
                                lightbox_descriptions.push(_("Image from Google Jacket (<a href='%s'>see the original image</a>)").format($(img).data('link')));
1556
                                lightbox_descriptions.push(_("Image from Google Jacket (<a href='%s'>see the original image</a>)").format($(img).data('link')));
1557
                            } else if( div.attr("id") == "openlibrary-coverimg" ){
1558
                                lightbox_descriptions.push(_("Image from OpenLibrary (<a href='%s'>see the original image</a>)").format($(img).data('link')));
1546
                            } else if( div.attr("id") == "coce-coverimg" ){
1559
                            } else if( div.attr("id") == "coce-coverimg" ){
1547
                                // Identify which service's image is being loaded by Coce
1560
                                // Identify which service's image is being loaded by Coce
1548
                                var coce_description;
1561
                                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