related to #1607 removed old way to rename tag

This commit is contained in:
Matthieu Leproux
2022-02-08 11:24:45 +01:00
committed by plegall
parent cc1b6ea9e6
commit 9d38a57326
2 changed files with 0 additions and 36 deletions
-28
View File
@@ -214,34 +214,6 @@ function setupTagbox(tagBox) {
rename_tag_open()
})
tagBox.find('.tag-rename .icon-cancel').on('click', function() {
tagBox.removeClass('edit-name');
tagBox.find('.tag-name-editable').val(tagBox.find('.tag-name').html());
})
tagBox.find('.tag-rename .validate').on('click', function() {
tagBox.find('.tag-rename form').submit();
})
tagBox.find('.tag-rename form').submit(function (e) {
let name = tagBox.find('.tag-name').html();
e.preventDefault();
new_name = tagBox.find('.tag-rename .tag-name-editable').val();
if (new_name != "") {
let loadState = new TemporaryState();
loadState.removeClass(tagBox.find('.tag-rename .validate'), 'icon-ok');
loadState.changeHTML(tagBox.find('.tag-rename .validate'), "<i class='icon-spin6 animate-spin'> </i>");
renameTag(tagBox.data('id'), new_name).then(() => {
showMessage(str_tag_renamed.replace('%s1', name).replace('%s2', new_name));
loadState.reverse();
tagBox.removeClass('edit-name');
}).catch((message) => {
loadState.reverse();
showError(message);
})
}
})
//Delete Tag
tagBox.find('.dropdown-option.delete').on('click', function () {
$.confirm({
-8
View File
@@ -63,14 +63,6 @@ var str_tag_found = '{'<b>%d</b> tag found'|@translate}';
<span class="select-checkbox">
<i class="icon-ok"> </i>
</span>
<div class="tag-rename">
<form>
<input type="text" class="tag-name-editable" value="{$tag_name}">
<input type="submit" hidden>
</form>
<span class="icon-ok validate"></span>
<span class="icon-cancel"></span>
</div>
{/function}
{/function}