Merge branch 'dev' into pagination
This commit is contained in:
@ -363,12 +363,12 @@ jQuery(document).ready(function($)
|
||||
return true;
|
||||
splitTag = tag.split(", ");
|
||||
|
||||
for (t of splitTag)
|
||||
for (t of paramTag)
|
||||
{
|
||||
if (paramTag.includes(t))
|
||||
return true;
|
||||
if (!splitTag.includes(t))
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
function checkPhoto(photo)
|
||||
@ -446,22 +446,32 @@ jQuery(document).ready(function($)
|
||||
else
|
||||
result += '<td> </td>'
|
||||
|
||||
result += '<td><a href="painting.html?number=' + i.number + '"><img src="styles/icons/eye.svg" alt="Voir"></a></td>';
|
||||
result += '<td><a data-fancybox="exposition-list" href="';
|
||||
if (i.photo == "none")
|
||||
result += 'images/unknown.jpg';
|
||||
else
|
||||
result += 'photos/paintings/normal/' + i.number + '.jpg'
|
||||
result += '" data-fancybox-index="' + i.number + '"><img src="styles/icons/eye.svg"></a></td>';
|
||||
result += "</tr>";
|
||||
|
||||
$("table").append(result);
|
||||
|
||||
// gallery
|
||||
paintingHtml = '<div class="gallery-item">';
|
||||
if (i.photo == "none")
|
||||
{
|
||||
paintingHtml = '<a data-fancybox="exposition" href="images/unknown.jpg" data-fancybox-index="' + i.number + '">'
|
||||
paintingHtml += '<a data-fancybox="exposition" href="images/unknown.jpg" data-fancybox-index="' + i.number + '">'
|
||||
paintingHtml += '<img src="images/unknown.jpg" alt="Tableau ' + i.number + '"></a>'
|
||||
}
|
||||
else
|
||||
{
|
||||
paintingHtml = '<a data-fancybox="exposition" href="photos/paintings/normal/' + i.number + '.jpg" data-fancybox-index="' + i.number + '">'
|
||||
paintingHtml += '<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>'
|
||||
}
|
||||
paintingHtml += '<span class="item-title">' + i.title;
|
||||
if (i.year != '—')
|
||||
paintingHtml += ' (' + i.year + ')';
|
||||
paintingHtml += '</span></div>';
|
||||
$(".gallery").append(paintingHtml);
|
||||
}
|
||||
$(".explorer .result").append("La recherche donne un résultat de <strong>" + numberOfItem + " élément" + (numberOfItem > 1 ? "s" : "") + "</strong>.");
|
||||
@ -513,7 +523,7 @@ jQuery(document).ready(function($)
|
||||
|
||||
|
||||
// fancybox configuration
|
||||
$('[data-fancybox="exposition"]').fancybox(
|
||||
$('[data-fancybox="exposition"], [data-fancybox="exposition-list"]').fancybox(
|
||||
{
|
||||
infobar: false,
|
||||
toolbar: true,
|
||||
|
@ -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