fixes #2350 highlight edited tag with a checkmark

This commit is contained in:
Perrom 2025-04-14 11:20:31 +02:00 committed by GitHub
parent 122cbf7567
commit 38e771aa8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 36 additions and 1 deletions

View file

@ -125,10 +125,15 @@ $('.tag-box').each(function() {
$(".TagSubmit").on('click', function () {
$('.TagSubmit').hide();
$('.TagLoading').show();
renameTag($(".RenameTagPopInContainer").find(".tag-property-input").attr("id"), $(".RenameTagPopInContainer").find(".tag-property-input").val()).then(() => {
$tagboxid = ($(".RenameTagPopInContainer").find(".tag-property-input").attr("id"))
renameTag($tagboxid, $(".RenameTagPopInContainer").find(".tag-property-input").val()).then(() => {
$('.TagSubmit').show();
$('.TagLoading').hide();
rename_tag_close();
cleanCheckmark();
$('[data-id='+$tagboxid+']').wrap('<div class="tag-changed"></div>');
$('.tag-changed').prepend('<i class="icon-ok-circled tag-checkmark"></i>');
$('.tag-changed').prepend('<i class="icon-ok tag-checkmark-fill"></i>');
}).catch((message) => {
$('.TagSubmit').show();
$('.TagLoading').hide();
@ -136,6 +141,12 @@ $(".TagSubmit").on('click', function () {
})
});
function cleanCheckmark(){
$('.tag-changed > *').unwrap();
$('.tag-checkmark').remove();
$('.tag-checkmark-fill').remove();
}
/*-------
Add a tag
-------*/
@ -972,6 +983,7 @@ function updatePage() {
newPage = actualPage;
dataToDisplay = tagToDisplay();
tagBoxes = $('.tag-box');
cleanCheckmark();
$('.pageLoad').fadeIn();;
$('.tag-box').animate({opacity:0}, 500).promise().then(() => {

View file

@ -4465,6 +4465,21 @@ a#showPermissions:hover {text-decoration: none;}
font-size: 1em;
font-weight: bold;
}
.tag-checkmark{
position: absolute;
transform: scale(1.5);
padding: 2.5px 0px;
color: #6ccd5d;
z-index: 1;
}
.tag-checkmark-fill{
position: absolute;
padding: 2.5px 0px;
color: white;
opacity: 0;
z-index: 2;
}
/* Picture Edit */
#pictureModify {

View file

@ -1355,6 +1355,14 @@ background:#6C2D2D!important;
background-color:#f22;
}
.tag-checkmark{
color: #4da48f !important;
}
.tag-checkmark-fill{
opacity: 1 !important;
}
/* Album Move (and album search) */
.move-cat-container, .search-album-elem {
background-color: #333;