Skip to content

Commit

Permalink
remove cancel within filters
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc committed Oct 25, 2021
1 parent aea6cf5 commit d9c6ce6
Showing 1 changed file with 26 additions and 38 deletions.
64 changes: 26 additions & 38 deletions app/grants/templates/grants/explorer.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,12 @@
Categories <span v-if="params.grant_types.length"> • [[params.grant_types.length]]</span>
</template>
<b-dropdown-form>
<b-form-checkbox-group id="checkbox-group-types" v-model.lazy="params.grant_types" aria-describedby="ariaDescribedby" name="grant_types">
<template v-for="grant_type in grant_types" v-if="grant_type.is_visible">
<b-form-checkbox @input="fetchGrants(1)" class="mb-3" :value="grant_type.keyword">[[grant_type.label]]</b-form-checkbox>
</template>
</b-form-checkbox-group>
<b-dropdown-divider></b-dropdown-divider>
<div>
<b-button variant="link" size="sm" :class="{'disabled' : !params.grant_types.length}" @click="params.grant_types=[], closeDropdown('grantFlitersDropdown')">Clear</b-button>
<div class="mt-2">
<b-form-checkbox-group id="checkbox-group-types" v-model.lazy="params.grant_types" aria-describedby="ariaDescribedby" name="grant_types">
<template v-for="grant_type in grant_types" v-if="grant_type.is_visible">
<b-form-checkbox @input="fetchGrants(1)" class="mb-3" :value="grant_type.keyword">[[grant_type.label]]</b-form-checkbox>
</template>
</b-form-checkbox-group>
</div>
</b-dropdown-form>
</b-dropdown>
Expand All @@ -138,14 +136,12 @@
Tags <span v-if="params.grant_tags?.length"> • [[params.grant_tags.length]]</span>
</template>
<b-dropdown-form>
<b-form-checkbox-group id="checkbox-group-tags" v-model="params.grant_tags" aria-describedby="ariaDescribedby" name="grant_tags">
<template v-for="tag in tagsOptions">
<b-form-checkbox @input="fetchGrants(1)" class="mb-3" :value="tag.name">[[tag.name]]</b-form-checkbox>
</template>
</b-form-checkbox-group>
<b-dropdown-divider></b-dropdown-divider>
<div>
<b-button variant="link" size="sm" :class="{'disabled' : !params.grant_tags.length}" @click="params.grant_tags=[], closeDropdown('tagFiltersDropdown')">Clear</b-button>
<div class="mt-2">
<b-form-checkbox-group id="checkbox-group-tags" v-model="params.grant_tags" aria-describedby="ariaDescribedby" name="grant_tags">
<template v-for="tag in tagsOptions">
<b-form-checkbox @input="fetchGrants(1)" class="mb-3" :value="tag.name">[[tag.name]]</b-form-checkbox>
</template>
</b-form-checkbox-group>
</div>
</b-dropdown-form>
</b-dropdown>
Expand All @@ -156,14 +152,12 @@
Regions <span v-if="params.grant_regions?.length"> • [[params.grant_regions.length]]</span>
</template>
<b-dropdown-form>
<b-form-checkbox-group id="checkbox-group-regions" v-model="params.grant_regions" aria-describedby="ariaDescribedby" name="grant_regions" stacked>
<template v-for="region in grantRegions">
<b-form-checkbox @input="fetchGrants(1)" class="mb-3" :value="region.name">[[region.label]]</b-form-checkbox>
</template>
</b-form-checkbox-group>
<b-dropdown-divider></b-dropdown-divider>
<div>
<b-button variant="link" size="sm" :class="{'disabled' : !params.grant_regions.length}" @click="params.grant_regions=[], closeDropdown('regionFiltersDropdown')">Clear</b-button>
<div class="mt-2">
<b-form-checkbox-group id="checkbox-group-regions" v-model="params.grant_regions" aria-describedby="ariaDescribedby" name="grant_regions" stacked>
<template v-for="region in grantRegions">
<b-form-checkbox @input="fetchGrants(1)" class="mb-3" :value="region.name">[[region.label]]</b-form-checkbox>
</template>
</b-form-checkbox-group>
</div>
</b-dropdown-form>
</b-dropdown>
Expand All @@ -174,14 +168,12 @@
Blockchains <span v-if="params.tenants?.length"> • [[params.tenants.length]]</span>
</template>
<b-dropdown-form>
<b-form-checkbox-group id="checkbox-group-tenants" v-model="params.tenants" aria-describedby="ariaDescribedby" name="tenants" stacked>
<template v-for="tenant in grantTenants">
<b-form-checkbox @input="fetchGrants(1)" class="mb-3" :value="tenant.name">[[tenant.label]]</b-form-checkbox>
</template>
</b-form-checkbox-group>
<b-dropdown-divider></b-dropdown-divider>
<div>
<b-button variant="link" size="sm" :class="{'disabled' : !params.tenants.length}" @click="params.tenants=[], closeDropdown('tenantFiltersDropdown')">Clear</b-button>
<div class="mt-2">
<b-form-checkbox-group id="checkbox-group-tenants" v-model="params.tenants" aria-describedby="ariaDescribedby" name="tenants" stacked>
<template v-for="tenant in grantTenants">
<b-form-checkbox @input="fetchGrants(1)" class="mb-3" :value="tenant.name">[[tenant.label]]</b-form-checkbox>
</template>
</b-form-checkbox-group>
</div>
</b-dropdown-form>
</b-dropdown>
Expand All @@ -194,12 +186,12 @@
• [[ [params.idle, params.only_contributions, params.me, params.following].filter((v)=>v).length ]]</span>
</template>
<b-dropdown-form>
<div class="pt-2">
<div class="mt-2">
<b-form-checkbox @input="fetchGrants(1)" id="idle" v-model="params.idle" name="idle"> Show Idle Grants</b-form-checkbox>
<b-dropdown-text class="font-smaller-4"style="width: 230px;">Grants not updated in 3 months</b-dropdown-text>
</div>
<b-dropdown-divider></b-dropdown-divider>
<div>
<div class="d-block">
<b-dropdown-header id="dropdown-header-shortcuts">
My Shortcuts
</b-dropdown-header>
Expand All @@ -210,10 +202,6 @@
<b-form-checkbox @input="fetchGrants(1)" id="following" v-model="params.following" name="following"> Following</b-form-checkbox>
<b-dropdown-text class="font-smaller-4 pb-2" style="width: 230px;">Grants I’ve followed</b-dropdown-text>
</div>
<b-dropdown-divider></b-dropdown-divider>
<div>
<b-button variant="link" size="sm" @click="params.idle=false,params.only_contributions=false, params.me=false, params.following=false, closeDropdown('moreFiltersDropdown')">Clear</b-button>
</div>
</b-dropdown-form>
</b-dropdown>

Expand Down

0 comments on commit d9c6ce6

Please sign in to comment.