@@ -, +, @@ detail page in the staff client - Amazon - Local cover images (including multiple local cover images) - Coce (serving up Amazon, Google, and OpenLibrary images) - Images from the CustomCoverImages preference --- koha-tmpl/intranet-tmpl/js/coce.js | 78 +++++----- .../intranet-tmpl/prog/css/src/staff-global.scss | 39 ++++- .../intranet-tmpl/prog/en/includes/js_includes.inc | 3 - .../prog/en/modules/catalogue/detail.tt | 169 +++++++++++++++------ koha-tmpl/intranet-tmpl/prog/js/localcovers.js | 50 +++--- 5 files changed, 217 insertions(+), 122 deletions(-) --- a/koha-tmpl/intranet-tmpl/js/coce.js +++ a/koha-tmpl/intranet-tmpl/js/coce.js @@ -6,45 +6,45 @@ if (KOHA === undefined || !KOHA) { var KOHA = {}; } */ KOHA.coce = { - /** - * Search all: - *
- * or - * - * and run a search with all collected isbns to coce cover service. - * The result is asynchronously returned, and used to append . - */ - getURL: function(host,provider,newWindow) { - var ids = []; - $("[id^=coce-thumbnail]").each(function(i) { - var id = $(this).attr("class"); // id=isbn - if ( id !== '' ) { ids.push(id); } - }); - if (ids.length == 0) return; - ids = ids.join(','); - var coceURL = host + '/cover?id=' + ids + '&provider=' + provider; - $.ajax({ - url: coceURL, - dataType: 'jsonp', - success: function(urlPerID){ - for (var id in urlPerID) { - var url = urlPerID[id]; - $("[id^=coce-thumbnail]."+id).each(function() { - var img = document.createElement("img"); - img.src = url; - img.classList.add("thumbnail"); - img.alt = "Cover image"; - img.onload = function(){ - // image dimensions can't be known until image has loaded - if( img.height == 1 && img.width == 1 ){ - $(this).remove(); + /** + * Search all: + * + * or + * + * and run a search with all collected isbns to coce cover service. + * The result is asynchronously returned, and used to append . + */ + getURL: function(host, provider, newWindow) { + var ids = []; + $("[id^=coce-thumbnail]").each(function(i) { + var id = $(this).attr("class"); // id=isbn + if (id !== '') { ids.push(id); } + }); + if (ids.length == 0) return; + ids = ids.join(','); + var coceURL = host + '/cover?id=' + ids + '&provider=' + provider; + $.ajax({ + url: coceURL, + dataType: 'jsonp', + success: function(urlPerID) { + for (var id in urlPerID) { + var url = urlPerID[id]; + $("[id^=coce-thumbnail]." + id).each(function() { + var img = document.createElement("img"); + img.src = url; + img.alt = "Cover image"; + img.onload = function() { + // image dimensions can't be known until image has loaded + if (img.height == 1 && img.width == 1) { + $(this).remove(); + } + }; + $(this).html(img); + }); } - } - $(this).html(img); - }); - } - } - }); - } + }, + + }); + } }; --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -4,7 +4,7 @@ ::selection { background: #538200; color: #FFFFFF; -} +} a { &:link, @@ -2091,6 +2091,43 @@ li { } } +#cover-slides { + background: #FFF url("[% interface | html %]/[% theme | html %]/img/spinner-small.gif") center center no-repeat; + border: 1px solid #b9d8d9; + border-radius: 3px; + margin: 5px; + padding: 10px 5px 5px 5px; + min-height: 175px; + + .hint { + font-size: 90%; + padding: .5em 0; + } + + a { + &.nav-active { + &:link, + &:visited { + color: #85ca11; + } + } + } +} + +.cover-image { + display: none; + + img { + height: auto; + max-width: 100%; + } +} + +.cover-nav { + display: inline-block; + padding: 3px 4px; +} + .searchhighlightblob { font-size: 75%; font-style: italic; --- a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc @@ -57,9 +57,6 @@ [% IF LocalCoverImages %] [% Asset.js("js/localcovers.js") | $raw %] - [% END %] [% IF Koha.Preference('AudioAlerts') || AudioAlertsPage %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -136,36 +136,63 @@ [% END %] [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || IntranetCoce || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] -