From c7b60cc6e3fe5bf5ea8f350c42987985dda450a2 Mon Sep 17 00:00:00 2001 From: apapachristou Date: Fri, 13 Sep 2019 13:52:24 +0300 Subject: [PATCH] Adds any option on grant status filter sections on /explore and /explore-plans, makes tooltip font-size larger --- .../explore-dataset-filters.component.html | 33 +++++++------------ .../explore-dataset-filters.component.ts | 5 +-- .../explore-dmp-filters.component.html | 1 + .../explore-dmp-filters.component.ts | 14 ++++---- dmp-frontend/src/assets/i18n/en.json | 1 + .../src/assets/scss/core/_tooltip.scss | 3 +- 6 files changed, 26 insertions(+), 31 deletions(-) diff --git a/dmp-frontend/src/app/ui/explore-dataset/filters/explore-dataset-filters.component.html b/dmp-frontend/src/app/ui/explore-dataset/filters/explore-dataset-filters.component.html index 9a38cf264..46331edea 100644 --- a/dmp-frontend/src/app/ui/explore-dataset/filters/explore-dataset-filters.component.html +++ b/dmp-frontend/src/app/ui/explore-dataset/filters/explore-dataset-filters.component.html @@ -3,33 +3,29 @@
- + search - +
{{ 'FACET-SEARCH.GRANT-STATUS.TITLE' | translate }}
- - {{ 'FACET-SEARCH.GRANT-STATUS.OPTIONS.ACTIVE' | translate }} + {{ 'FACET-SEARCH.GRANT-STATUS.OPTIONS.ANY' | translate }} - - {{ 'FACET-SEARCH.GRANT-STATUS.OPTIONS.INACTIVE' | translate }} + {{ 'FACET-SEARCH.GRANT-STATUS.OPTIONS.ACTIVE' | translate }} + + + {{ 'FACET-SEARCH.GRANT-STATUS.OPTIONS.INACTIVE' | translate }}
{{'CRITERIA.DATA-SETS.RELATED-DMP' | translate}}
- + arrow_drop_down @@ -38,9 +34,7 @@
{{ 'FACET-SEARCH.GRANT.TITLE' | translate }}
- + arrow_drop_down @@ -49,9 +43,7 @@
{{ 'FACET-SEARCH.PROFILES.TITLE' | translate }}
- + arrow_drop_down @@ -60,10 +52,7 @@
{{ 'FACET-SEARCH.DMP-ORGANISATIONS.TITLE' | translate }}
- + arrow_drop_down diff --git a/dmp-frontend/src/app/ui/explore-dataset/filters/explore-dataset-filters.component.ts b/dmp-frontend/src/app/ui/explore-dataset/filters/explore-dataset-filters.component.ts index d7703250e..0b167651b 100644 --- a/dmp-frontend/src/app/ui/explore-dataset/filters/explore-dataset-filters.component.ts +++ b/dmp-frontend/src/app/ui/explore-dataset/filters/explore-dataset-filters.component.ts @@ -133,13 +133,14 @@ export class ExploreDatasetFiltersComponent extends BaseComponent implements OnI public grantStatusChanged(event) { this.facetCriteria.grantStatus = event.value; - if (!event.source.checked) { + if (event.value === 'null') { this.facetCriteria.grantStatus = null; this.grants = Observable.of([]); this.facetCriteria.grants = []; } // if (event.option.selected) { - if (event.source.checked) { + // if (event.source.checked) { + else { // const grantCriteria = new GrantCriteria(); // grantCriteria.grantStateType = this.facetCriteria.grantStatus; //grantCriteria['length'] = 10; diff --git a/dmp-frontend/src/app/ui/explore-dmp/dmp-explore-filters/explore-dmp-filters.component.html b/dmp-frontend/src/app/ui/explore-dmp/dmp-explore-filters/explore-dmp-filters.component.html index 01a237ab4..c32321aa8 100644 --- a/dmp-frontend/src/app/ui/explore-dmp/dmp-explore-filters/explore-dmp-filters.component.html +++ b/dmp-frontend/src/app/ui/explore-dmp/dmp-explore-filters/explore-dmp-filters.component.html @@ -10,6 +10,7 @@
{{ 'FACET-SEARCH.GRANT-STATUS.TITLE' | translate }}
+ {{ 'FACET-SEARCH.GRANT-STATUS.OPTIONS.ANY' | translate }} {{ 'FACET-SEARCH.GRANT-STATUS.OPTIONS.ACTIVE' | translate }} {{ 'FACET-SEARCH.GRANT-STATUS.OPTIONS.INACTIVE' | translate }}
diff --git a/dmp-frontend/src/app/ui/explore-dmp/dmp-explore-filters/explore-dmp-filters.component.ts b/dmp-frontend/src/app/ui/explore-dmp/dmp-explore-filters/explore-dmp-filters.component.ts index 75370ee25..657872315 100644 --- a/dmp-frontend/src/app/ui/explore-dmp/dmp-explore-filters/explore-dmp-filters.component.ts +++ b/dmp-frontend/src/app/ui/explore-dmp/dmp-explore-filters/explore-dmp-filters.component.ts @@ -120,19 +120,19 @@ export class ExploreDmpFiltersComponent extends BaseCriteriaComponent implements this.profiles = this.datasetProfileService.getDatasetProfiles(); const fields: Array = new Array(); fields.push('asc'); - this.dmpOrganisations = this.organisationService.searchPublicOrganisations(new DataTableRequest(0 , null, { fields: fields })).map(x => x.data); + this.dmpOrganisations = this.organisationService.searchPublicOrganisations(new DataTableRequest(0, null, { fields: fields })).map(x => x.data); } ngAfterViewInit(): void { // this.accordion.openAll(); } - OnChange($event){ + OnChange($event) { console.log($event); } - OnIndeterminateChange($event){ - console.log($event); + OnIndeterminateChange($event) { + console.log($event); } controlModified() { @@ -157,14 +157,16 @@ export class ExploreDmpFiltersComponent extends BaseCriteriaComponent implements this.facetCriteria.grantStatus = event.value; // this.facetCriteria.grantStatus = +event.source.ariaLabel; // For checkboxes // this.facetCriteria.grantStatus = event.option.value.value; // For - if (!event.source.checked) { + // if (!event.source.checked) { + if (event.value === 'null') { this.facetCriteria.grantStatus = null; this.grants = Observable.of([]); this.facetCriteria.grants = []; } // if (event.checked) { // if (event.option.selected) { - if (event.source.checked) { + // if (event.source.checked) { + else { const fields: Array = new Array(); fields.push('asc'); const dataTableRequest: DataTableRequest = new DataTableRequest(0, null, { fields: fields }); diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json index 086358a28..5ac861ac7 100644 --- a/dmp-frontend/src/assets/i18n/en.json +++ b/dmp-frontend/src/assets/i18n/en.json @@ -962,6 +962,7 @@ "GRANT-STATUS": { "TITLE": "Grant Status", "OPTIONS": { + "ANY": "Any", "ACTIVE": "Active", "INACTIVE": "Inactive" } diff --git a/dmp-frontend/src/assets/scss/core/_tooltip.scss b/dmp-frontend/src/assets/scss/core/_tooltip.scss index d5e160718..4d2594a80 100644 --- a/dmp-frontend/src/assets/scss/core/_tooltip.scss +++ b/dmp-frontend/src/assets/scss/core/_tooltip.scss @@ -49,5 +49,6 @@ } .mat-tooltip{ - text-align: center; + text-align: center; + font-size: 11px; }