Merge branch 'dev' into pagination
This commit is contained in:
@ -13,16 +13,21 @@ jQuery(document).ready(function($)
|
||||
if (paintingList.length % (14 + 1) == 0)
|
||||
canDisplay = false;
|
||||
|
||||
paintingHtml = '<div class="gallery-item ';
|
||||
if (canDisplay)
|
||||
{
|
||||
paintingHtml = '<a class="active" data-fancybox="exposition" href="photos/paintings/normal/' + i.number + '.jpg" data-fancybox-index="' + i.number + '">'
|
||||
paintingHtml += 'active"><a data-fancybox="exposition" href="photos/paintings/normal/' + i.number + '.jpg" data-fancybox-index="' + i.number + '">'
|
||||
paintingHtml += '<img src="photos/paintings/mini/' + i.number + '.jpg" alt="Tableau ' + i.number + '"></a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
paintingHtml = '<a class="inactive" data-fancybox="exposition" href="photos/paintings/normal/' + i.number + '.jpg" data-fancybox-index="' + i.number + '">'
|
||||
paintingHtml += 'inactive"><a data-fancybox="exposition" href="photos/paintings/normal/' + i.number + '.jpg" data-fancybox-index="' + i.number + '">'
|
||||
paintingHtml += '<img src="photos/paintings/mini/" alt="Tableau ' + i.number + '"></a>';
|
||||
}
|
||||
paintingHtml += '<span class="item-title">' + i.title;
|
||||
if (i.year != '—')
|
||||
paintingHtml += ' (' + i.year + ')';
|
||||
paintingHtml += '</span></div>';
|
||||
$(".gallery").append(paintingHtml);
|
||||
}
|
||||
}
|
||||
@ -47,14 +52,14 @@ jQuery(document).ready(function($)
|
||||
if (previousArray.length > 0)
|
||||
{
|
||||
for (i of previousArray)
|
||||
$('[data-fancybox-index="'+i+'"]').removeClass("active").addClass("inactive");
|
||||
$('[data-fancybox-index="'+i+'"]').parent().removeClass("active").addClass("inactive");
|
||||
}
|
||||
|
||||
previousArray = response;
|
||||
|
||||
$.each(response, function(index, item)
|
||||
{
|
||||
$('[data-fancybox-index="'+item+'"]').removeClass("inactive").addClass("active");
|
||||
$('[data-fancybox-index="'+item+'"]').parent().removeClass("inactive").addClass("active");
|
||||
$('[data-fancybox-index="'+item+'"] img').attr("src", "photos/paintings/mini/"+item+".jpg");
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user