tag badge number update fix

This commit is contained in:
Matthieu Leproux
2022-05-10 15:02:58 +02:00
parent 6856a3cff0
commit 7cafba043d
+2 -2
View File
@@ -85,7 +85,7 @@ function recycleTagBox(tagBox, id, name, url_name, count) {
//Number On Badge
function updateBadge() {
$('.badge-number').html(dataTags.length)
$('.badge-number').html(dataTags.length);
}
//Add a tag
@@ -164,7 +164,6 @@ function addTag(name) {
newTag = createTagBox(data.result.id, data.result.name, data.result.url_name, 0);
$('.tag-container').prepend(newTag);
setupTagbox(newTag);
updateBadge();
updateSearchInfo();
//Update the data
@@ -173,6 +172,7 @@ function addTag(name) {
id:data.result.id,
url_name:data.result.url_name
});
updateBadge();
resolve();
} else {
reject(str_already_exist.replace('%s', name));