mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
fixes #2350 highlight edited tag with a checkmark
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user