mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-08 09:43:01 +02:00
Related to #1607 Fix multi http calls on tag rename
This commit is contained in:
@@ -105,6 +105,21 @@ $('.tag-box').each(function() {
|
||||
setupTagbox($(this))
|
||||
})
|
||||
|
||||
//Call the API when rename a tag
|
||||
$(".TagSubmit").on('click', function () {
|
||||
$('.TagSubmit').hide();
|
||||
$('.TagLoading').show();
|
||||
renameTag($(".RenameTagPopInContainer").find(".tag-property-input").attr("id"), $(".RenameTagPopInContainer").find(".tag-property-input").val()).then(() => {
|
||||
$('.TagSubmit').show();
|
||||
$('.TagLoading').hide();
|
||||
rename_tag_close();
|
||||
}).catch((message) => {
|
||||
$('.TagSubmit').show();
|
||||
$('.TagLoading').hide();
|
||||
console.error(message)
|
||||
})
|
||||
});
|
||||
|
||||
/*-------
|
||||
Add a tag
|
||||
-------*/
|
||||
@@ -251,14 +266,6 @@ function set_up_popin(id, tagName) {
|
||||
$(".ClosePopIn").on('click', function () {
|
||||
rename_tag_close()
|
||||
});
|
||||
$(".TagSubmit").on('click', function () {
|
||||
renameTag($(".RenameTagPopInContainer").find(".tag-property-input").attr("id"), $(".RenameTagPopInContainer").find(".tag-property-input").val()).then(() => {
|
||||
console.log("then");
|
||||
rename_tag_close();
|
||||
}).catch((message) => {
|
||||
console.log(message);
|
||||
})
|
||||
});
|
||||
$(".TagSubmit").html(str_yes_rename_confirmation);
|
||||
$(".RenameTagPopInContainer").find(".tag-property-input").val(tagName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user