Better handle of data view when missing info
Also data update
This commit is contained in:
@ -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");
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user