Use explicit flex styles instead of "level" for grid filters etc.

just to be more precise, and consistent
This commit is contained in:
Lance Edgar 2024-04-25 20:45:03 -05:00
parent daf68cad01
commit 25a27af29c
3 changed files with 25 additions and 41 deletions

View file

@ -3,10 +3,6 @@
* Grid Filters * Grid Filters
******************************/ ******************************/
.filters .filter {
margin-bottom: 0.5rem;
}
.filters .filter-fieldname .field, .filters .filter-fieldname .field,
.filters .filter-fieldname .field label { .filters .filter-fieldname .field label {
width: 100%; width: 100%;

View file

@ -195,26 +195,20 @@
<%def name="make_grid_filter_component()"> <%def name="make_grid_filter_component()">
<script type="text/x-template" id="grid-filter-template"> <script type="text/x-template" id="grid-filter-template">
<div class="filter"
v-show="filter.visible"
style="display: flex; gap: 0.5rem;">
<div class="level filter" v-show="filter.visible"> <div class="filter-fieldname">
<div class="level-left" <b-button @click="filter.active = !filter.active"
style="align-items: start;"> icon-pack="fas"
:icon-left="filter.active ? 'check' : null">
<div class="level-item filter-fieldname"> {{ filter.label }}
</b-button>
<b-field>
<b-button @click="filter.active = !filter.active"
icon-pack="fas"
:icon-left="filter.active ? 'check' : null">
{{ filter.label }}
</b-button>
</b-field>
</div> </div>
<b-field grouped v-show="filter.active" <div v-show="filter.active"
class="level-item" style="display: flex; gap: 0.5rem;">
style="align-items: start;">
<b-select v-model="filter.verb" <b-select v-model="filter.verb"
@input="focusValue()" @input="focusValue()"
@ -266,11 +260,8 @@
ref="valueInput"> ref="valueInput">
</b-input> </b-input>
</b-field> </div>
</div>
</div><!-- level-left -->
</div><!-- level -->
</script> </script>
<script> <script>

View file

@ -2,26 +2,26 @@
<form action="${form.action_url}" method="GET" @submit.prevent="applyFilters()"> <form action="${form.action_url}" method="GET" @submit.prevent="applyFilters()">
<grid-filter v-for="key in filtersSequence" <div style="display: flex; flex-direction: column; gap: 0.5rem;">
:key="key" <grid-filter v-for="key in filtersSequence"
:filter="filters[key]" :key="key"
ref="gridFilters"> :filter="filters[key]"
</grid-filter> ref="gridFilters">
</grid-filter>
</div>
<b-field grouped> <div style="display: flex; gap: 0.5rem; margin-top: 0.5rem;">
<b-button type="is-primary" <b-button type="is-primary"
native-type="submit" native-type="submit"
icon-pack="fas" icon-pack="fas"
icon-left="check" icon-left="check">
class="control">
Apply Filters Apply Filters
</b-button> </b-button>
<b-button v-if="!addFilterShow" <b-button v-if="!addFilterShow"
icon-pack="fas" icon-pack="fas"
icon-left="plus" icon-left="plus"
class="control"
@click="addFilterButton"> @click="addFilterButton">
Add Filter Add Filter
</b-button> </b-button>
@ -44,15 +44,13 @@
<b-button @click="resetView()" <b-button @click="resetView()"
icon-pack="fas" icon-pack="fas"
icon-left="home" icon-left="home">
class="control">
Default View Default View
</b-button> </b-button>
<b-button @click="clearFilters()" <b-button @click="clearFilters()"
icon-pack="fas" icon-pack="fas"
icon-left="trash" icon-left="trash">
class="control">
No Filters No Filters
</b-button> </b-button>
@ -60,12 +58,11 @@
<b-button @click="saveDefaults()" <b-button @click="saveDefaults()"
icon-pack="fas" icon-pack="fas"
icon-left="save" icon-left="save"
class="control"
:disabled="savingDefaults"> :disabled="savingDefaults">
{{ savingDefaults ? "Working, please wait..." : "Save Defaults" }} {{ savingDefaults ? "Working, please wait..." : "Save Defaults" }}
</b-button> </b-button>
% endif % endif
</b-field> </div>
</form> </form>