Lines 1122-1130
Link Here
|
1122 |
var interface = "[% interface | html %]"; |
1122 |
var interface = "[% interface | html %]"; |
1123 |
var theme = "[% theme | html %]"; |
1123 |
var theme = "[% theme | html %]"; |
1124 |
// http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html |
1124 |
// http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html |
1125 |
function verify_cover_images() { |
1125 |
function verify_cover_images(container) { |
1126 |
// Loop over each container in the template which contains covers |
1126 |
// Loop over each container in the template which contains covers |
1127 |
$(".cover-slider").each(function(){ |
1127 |
let cover_sliders = container ? container.find('.cover-slider') : $(".cover-slider"); |
|
|
1128 |
cover_sliders.each(function(){ |
1128 |
var lightbox_descriptions = []; |
1129 |
var lightbox_descriptions = []; |
1129 |
var first_shown = 0; |
1130 |
var first_shown = 0; |
1130 |
$(this).find(".cover-image").each( function( index ){ |
1131 |
$(this).find(".cover-image").each( function( index ){ |
Lines 1189-1195
Link Here
|
1189 |
|
1190 |
|
1190 |
}); |
1191 |
}); |
1191 |
|
1192 |
|
1192 |
$(".cover-slider").each(function(){ |
1193 |
cover_sliders.each(function(){ |
1193 |
var coverSlide = this; |
1194 |
var coverSlide = this; |
1194 |
var coverImages = $(this).find(".cover-image"); |
1195 |
var coverImages = $(this).find(".cover-image"); |
1195 |
if( coverImages.length > 1 ){ |
1196 |
if( coverImages.length > 1 ){ |
Lines 1231-1236
Link Here
|
1231 |
}); |
1232 |
}); |
1232 |
} |
1233 |
} |
1233 |
|
1234 |
|
|
|
1235 |
let build_items_table_drawncallback = function (table) { |
1236 |
let tab_id = table.parents('.tab-pane').attr('id'); |
1237 |
verify_cover_images($("#" + tab_id + '_table')); |
1238 |
}; |
1239 |
|
1234 |
function removeLocalImage(imagenumber) { |
1240 |
function removeLocalImage(imagenumber) { |
1235 |
var thumbnail = $("#imagenumber-" + imagenumber ); |
1241 |
var thumbnail = $("#imagenumber-" + imagenumber ); |
1236 |
var copy = thumbnail.html(); |
1242 |
var copy = thumbnail.html(); |
Lines 1710-1716
Link Here
|
1710 |
|
1716 |
|
1711 |
let items_tab_ids = [ 'holdings', 'otherholdings' ]; |
1717 |
let items_tab_ids = [ 'holdings', 'otherholdings' ]; |
1712 |
items_tab_ids.forEach( function( tab_id, index ) { |
1718 |
items_tab_ids.forEach( function( tab_id, index ) { |
1713 |
build_items_table(tab_id, false); |
1719 |
build_items_table(tab_id, false, {}, build_items_table_drawncallback); |
1714 |
|
1720 |
|
1715 |
[% IF bundlesEnabled %] |
1721 |
[% IF bundlesEnabled %] |
1716 |
// Add event listener for opening and closing bundle details |
1722 |
// Add event listener for opening and closing bundle details |
1717 |
- |
|
|