Better handle of data view when missing info
Also data update
This commit is contained in:
parent
408825f004
commit
f27d1a8dad
@ -51,6 +51,7 @@
|
||||
<li><span class="title">lieu :</span><span class="content place"> </span></li>
|
||||
<li><span class="title">état photo :</span><span class="content photo"> </span></li>
|
||||
<li><span class="title">aide requise :</span><span class="content help"> </span></li>
|
||||
<li><span class="title">tags :</span><span class="content tag"> </span></li>
|
||||
<li><span class="title">commentaire :</span><span class="content comment"> </span></li>
|
||||
<li><span class="content original"><a href="photos/paintings/original/42.jpg">photo originale ⭧</a></span></li>
|
||||
</ul>
|
||||
|
@ -52,8 +52,8 @@ jQuery(document).ready(function($)
|
||||
//dimensions.sort();
|
||||
genres.sort();
|
||||
themes.sort();
|
||||
places.sort();
|
||||
tags.sort();
|
||||
places.sort(Intl.Collator().compare);
|
||||
tags.sort(Intl.Collator().compare);
|
||||
|
||||
/*for (dimension of dimensions)
|
||||
{
|
||||
@ -463,14 +463,27 @@ jQuery(document).ready(function($)
|
||||
var idx = item.opts.fancyboxIndex - 1; // painting number
|
||||
if (item.opts.fancyboxIndex >= 1000)
|
||||
idx = item.opts.fancyboxIndex - 1000 + 383 - 1; // inédit: index starts at 1000 // 383: total number of paintings except inédit
|
||||
return '\
|
||||
<div id="info">\
|
||||
<span class="info"><a href="painting.html?number=' + data[idx].number + '">ℹ︎</span></a></span>\
|
||||
<span class="title">' + data[idx].title + '</span><span class="year">' + (data[idx].month != '—' ? data[idx].month + ' ' : '') + data[idx].year + '</span>\
|
||||
<span class="format">' + data[idx].paint + ' sur ' + data[idx].support + ' (' + data[idx].dimension + ')</span>\
|
||||
<span class="comment">' + data[idx].comment + '</span>\
|
||||
</div>\
|
||||
';
|
||||
|
||||
function generateCartel()
|
||||
{
|
||||
cartel = '<div id="info"><span class="info">';
|
||||
cartel += '<a href="painting.html?number=' + data[idx].number + '">ℹ︎</span></a></span>';
|
||||
cartel += '<span class="title">' + data[idx].title + '</span><span class="year">';
|
||||
if (data[idx].month != '—')
|
||||
cartel += data[idx].month + ' ';
|
||||
if (data[idx].year != '—')
|
||||
cartel += data[idx].year;
|
||||
cartel += '</span><span class="format">' + data[idx].paint + ' sur ' + data[idx].support.toLowerCase();
|
||||
if (data[idx].dimension != '—')
|
||||
cartel += ' (' + data[idx].dimension + ')';
|
||||
cartel += '</span>';
|
||||
if (data[idx].comment != '—')
|
||||
cartel += '<span class="comment">' + data[idx].comment + '</span>';
|
||||
cartel += '</div>';
|
||||
return cartel;
|
||||
}
|
||||
|
||||
return generateCartel();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -31,14 +31,26 @@ jQuery(document).ready(function($)
|
||||
if (item.opts.fancyboxIndex >= 1000)
|
||||
idx = item.opts.fancyboxIndex - 1000 + 383 - 1; // inédit: index starts at 1000 // 383: total number of paintings except inédit
|
||||
|
||||
return '\
|
||||
<div id="info">\
|
||||
<span class="info"><a href="painting.html?number=' + data[idx].number + '">ℹ︎</span></a></span>\
|
||||
<span class="title">' + data[idx].title + '</span><span class="year">' + (data[idx].month != '—' ? data[idx].month + ' ' : '') + data[idx].year + '</span>\
|
||||
<span class="format">' + data[idx].paint + ' sur ' + data[idx].support.toLowerCase() + ' (' + data[idx].dimension + ')</span>\
|
||||
<span class="comment">' + data[idx].comment + '</span>\
|
||||
</div>\
|
||||
';
|
||||
function generateCartel()
|
||||
{
|
||||
cartel = '<div id="info"><span class="info">';
|
||||
cartel += '<a href="painting.html?number=' + data[idx].number + '">ℹ︎</span></a></span>';
|
||||
cartel += '<span class="title">' + data[idx].title + '</span><span class="year">';
|
||||
if (data[idx].month != '—')
|
||||
cartel += data[idx].month + ' ';
|
||||
if (data[idx].year != '—')
|
||||
cartel += data[idx].year;
|
||||
cartel += '</span><span class="format">' + data[idx].paint + ' sur ' + data[idx].support.toLowerCase();
|
||||
if (data[idx].dimension != '—')
|
||||
cartel += ' (' + data[idx].dimension + ')';
|
||||
cartel += '</span>';
|
||||
if (data[idx].comment != '—')
|
||||
cartel += '<span class="comment">' + data[idx].comment + '</span>';
|
||||
cartel += '</div>';
|
||||
return cartel;
|
||||
}
|
||||
|
||||
return generateCartel();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -38,6 +38,7 @@ jQuery(document).ready(function($)
|
||||
$(".metadata .content.date").append(data[i].month + " " + data[i].year);
|
||||
else
|
||||
$(".metadata .content.date").append(data[i].year);
|
||||
|
||||
$(".metadata .content.dimension").append(data[i].dimension);
|
||||
$(".metadata .content.support").append(data[i].support);
|
||||
$(".metadata .content.genre").append(data[i].genre);
|
||||
@ -55,7 +56,15 @@ jQuery(document).ready(function($)
|
||||
else
|
||||
$(".metadata .content.help").append("non");
|
||||
|
||||
$(".metadata .content.comment").append(data[i].comment);
|
||||
if (data[i].tags != "—")
|
||||
$(".metadata .content.tag").append(data[i].tags);
|
||||
else
|
||||
$(".metadata .content.tag").parent().css("display", "none");
|
||||
|
||||
if (data[i].comment != "—")
|
||||
$(".metadata .content.comment").append(data[i].comment);
|
||||
else
|
||||
$(".metadata .content.comment").parent().css("display", "none");
|
||||
|
||||
if (data[i].photo != "none")
|
||||
$(".metadata .content.original a").attr("href", "photos/paintings/original/" + data[i].number + ".jpg");
|
||||
@ -68,9 +77,16 @@ jQuery(document).ready(function($)
|
||||
$("#info .year").append(data[i].month + " " + data[i].year);
|
||||
else
|
||||
$("#info .year").append(data[i].year);
|
||||
format = data[i].paint + " sur " + data[i].support.toLowerCase();
|
||||
format += " (" + data[i].dimension + ")";
|
||||
|
||||
format = data[i].paint + " sur " + data[i].support.toLowerCase();
|
||||
|
||||
if (data[i].dimension != "—")
|
||||
format += " (" + data[i].dimension + ")";
|
||||
$("#info .format").append(format);
|
||||
$("#info .comment").prepend(data[i].comment);
|
||||
|
||||
if (data[i].comment != "—")
|
||||
$("#info .comment").prepend(data[i].comment);
|
||||
else
|
||||
$("#info .comment").css("display", "none");
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user