style: filter-badge

This commit is contained in:
devezhao 2020-12-03 17:41:31 +08:00
parent 0d5ee7472a
commit ea763b8d83
2 changed files with 25 additions and 34 deletions

View file

@ -495,12 +495,33 @@ div.dataTables_wrapper div.dataTables_filter {
content: '\f2fb';
}
div.dataTables_filter .filter-tips.badge {
div.dataTables_filter .filter-badge {
float: left;
margin-left: 5px;
margin-top: 4px;
background-color: #fff8f2;
background-color: #fff;
color: #a04100;
border: 1px solid #ddd;
padding: 6px 12px;
font-size: 1rem;
font-weight: normal;
border-radius: 99px;
margin-top: 1px;
}
div.dataTables_filter .filter-badge .close {
opacity: 1;
text-shadow: none;
font-weight: normal;
color: #bbb;
margin-left: 7px;
}
div.dataTables_filter .filter-badge:hover {
border-color: #fbbc05;
}
div.dataTables_filter .filter-badge:hover .close {
color: #fbbc05;
}
.adv-search,
@ -3583,36 +3604,6 @@ a.icon-link > .zmdi {
margin-left: -15px;
}
.badge-border {
display: inline-block;
border-color: #fbbc05;
color: #fbbc05;
font-size: 1rem;
font-weight: normal;
position: relative;
padding: 4px 30px 3px 6px;
cursor: default;
overflow: hidden;
}
.badge-border .close {
position: absolute;
height: 100%;
width: 24px;
border-left: 1px solid #fbbc05;
top: 0;
right: 0;
padding-top: 4px;
opacity: 1;
text-shadow: none;
font-weight: normal;
}
.badge-border:hover .close {
background-color: #fbbc05;
color: #fff !important;
}
a.avatar.x26 img {
width: 26px;
height: 26px;

View file

@ -1045,7 +1045,7 @@ $(document).ready(() => {
const via = $urlp('via', location.hash)
if (via) {
wpc.protocolFilter = `via:${via}`
const $cleanVia = $(`<div class="badge badge-border filter-tips">${$L('DatasFiltered')}<a class="close" title="${$L('ViewAllDatas')}">&times;</a></div>`).appendTo('.dataTables_filter')
const $cleanVia = $(`<div class="badge filter-badge">${$L('DatasFiltered')}<a class="close" title="${$L('ViewAllDatas')}">&times;</a></div>`).appendTo('.dataTables_filter')
$cleanVia.find('a').click(() => {
wpc.protocolFilter = null
RbListPage.reload()