[Tag Manager] If there are no tags, highlight the add tag btn

This commit is contained in:
Matthieu Leproux
2022-05-11 12:39:46 +02:00
parent 04a4df7e0a
commit 5d19c0d4c8
4 changed files with 25 additions and 2 deletions
+5
View File
@@ -86,6 +86,11 @@ function recycleTagBox(tagBox, id, name, url_name, count) {
//Number On Badge
function updateBadge() {
$('.badge-number').html(dataTags.length);
if (dataTags.length == 0) {
$(".tag-header #add-tag .add-tag-label").addClass("highlight");
} else {
$(".tag-header #add-tag .add-tag-label").removeClass("highlight");
}
}
//Add a tag
+1 -1
View File
@@ -116,7 +116,7 @@ var str_tag_found = '{'<b>%d</b> tag found'|@translate}';
</div>
<form id='add-tag' class='not-in-selection-mode'>
<span class='icon-cancel-circled'></span>
<label class='add-tag-label icon-plus-circled'>
<label class='add-tag-label icon-plus-circled {if $total == 0} highlight {/if}'>
<p>{'Add a tag'|@translate}</p>
<div class='add-tag-container'>
<input type='text' id='add-tag-input' placeholder="{'New tag'|@translate}">
+8 -1
View File
@@ -3335,11 +3335,18 @@ a#showPermissions:hover {text-decoration: none;}
cursor: pointer;
}
.tag-header #add-tag .add-tag-label.highlight {
background: #ffa646;
box-shadow: 0 2px #af7200;
color: white;
}
.tag-header #add-tag.input-mode .add-tag-label {
background: none;
box-shadow: none;
cursor: auto;
padding: 0px
padding: 0px;
color: inherit;
}
.tag-header #add-tag .add-tag-label::before {
+11
View File
@@ -1121,6 +1121,17 @@ li.plupload_delete a:hover {background: url("images/cancelhover.svg")!important;
background-color: #333 !important;
}
.tag-header #add-tag .add-tag-label.highlight {
background: #f7a43c !important;
box-shadow: 0 2px #af7200;
color: #444 !important;
}
.tag-header #add-tag.input-mode .add-tag-label.highlight {
background: transparent !important;
box-shadow: none;
color: inherit !important;
}
.tag-container .tag-box p {
color: #aaa;
}