mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-04 14:44:26 +08:00
Fix css for saved filters dropdown [SCI-6516] (#3843)
Co-authored-by: Anton <anton@scinote.net>
This commit is contained in:
parent
24127af83f
commit
afce0e34c4
5 changed files with 25 additions and 3 deletions
|
@ -34,6 +34,7 @@
|
|||
.saved-filters-list {
|
||||
max-height: 300px;
|
||||
overflow-y: auto;
|
||||
width: 250px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,12 +78,25 @@
|
|||
.saved-filters-element {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
padding: .5em 1em;
|
||||
padding: 0 1em;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: $color-concrete;
|
||||
}
|
||||
|
||||
span {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.btn-light {
|
||||
color: $color-silver-chalice;
|
||||
flex-shrink: 0;
|
||||
margin-left: auto;
|
||||
|
||||
&:hover {
|
||||
color: $color-black;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,6 +86,7 @@ window.initRepositoryFilter = () => {
|
|||
created() {
|
||||
this.dataTableElement = $($('#filterContainer').data('datatable-id'));
|
||||
},
|
||||
|
||||
components: {
|
||||
'filter-container': FilterContainer
|
||||
},
|
||||
|
|
|
@ -75,7 +75,8 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
filters: this.defaultFilters
|
||||
filters: this.defaultFilters,
|
||||
savedFilterScrollbar: null
|
||||
}
|
||||
},
|
||||
components: { ColumnElement, FilterElement, SavedFilterElement },
|
||||
|
@ -141,6 +142,11 @@
|
|||
},
|
||||
toggleSavedFilters(e) {
|
||||
e.stopPropagation();
|
||||
if (this.savedFilterScrollbar) {
|
||||
this.savedFilterScrollbar.update();
|
||||
} else {
|
||||
this.savedFilterScrollbar = new PerfectScrollbar($('.saved-filters-list')[0]);
|
||||
}
|
||||
this.closeColumnsFilters();
|
||||
$('#savedFiltersContainer').toggleClass('open');
|
||||
},
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="saved-filters-element">
|
||||
<span @click="loadFilters">{{ savedFilter.attributes.name }}</span>
|
||||
<button v-if="canManageFilters" class="btn btn-light icon-btn" @click="deleteFilter">
|
||||
<i class="fas fa-trash"></i>
|
||||
<i :title="i18n.t('repositories.show.filters.delete_saved_filter')" class="fas fa-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -1410,6 +1410,7 @@ en:
|
|||
clear: "Clear"
|
||||
add_filter: "Add filter"
|
||||
apply: "Show results"
|
||||
delete_saved_filter: "Delete the saved filter"
|
||||
repository_filter:
|
||||
errors:
|
||||
column_not_found: "Filtering failed because one or more columns no longer exist. Please update your filter."
|
||||
|
|
Loading…
Reference in a new issue