mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
related to #1607 removed old way to rename tag
This commit is contained in:
committed by
plegall
parent
cc1b6ea9e6
commit
9d38a57326
@@ -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({
|
||||
|
||||
@@ -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}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user