related to #1609 handle badges on album creation

This commit is contained in:
Matthieu Leproux
2022-04-06 09:57:32 +02:00
parent f493aeaed1
commit d5e3c08878

View File

@@ -85,11 +85,17 @@ $(document).ready(() => {
cont.find(".nb-subcats").hide();
}
if (node.nb_images != 0) {
if (node.nb_images != 0 && node.nb_images) {
cont.find(".nb-images").text(node.nb_images);
} else {
cont.find(".nb-images").hide();
}
if (node.last_updates) {
cont.find(".last-update").text(node.last_updates);
} else {
cont.find(".last-update").hide();
}
}
var url_split = window.location.href.split("#");
@@ -323,7 +329,9 @@ $(document).ready(() => {
);
}
setSubcatsBadge(parent_node);
if (parent_node) {
setSubcatsBadge(parent_node);
}
$(".move-cat-add").unbind("click").on("click", function () {
openAddAlbumPopIn();