fix z-index problem with tooltip in metrics box, add message for no match in filter-search, removed access mode 'not available' question-mark icon from search page and landing
This commit is contained in:
parent
6679e6bac0
commit
5bfc4d8f22
|
@ -203,8 +203,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ng-template #dropInfo let-option=option>
|
<ng-template #dropInfo let-option=option>
|
||||||
<div class="uk-dropdown" uk-dropdown="pos: bottom-left; mode:click">
|
<div class="uk-dropdown" uk-dropdown="pos: bottom-left; mode:click; container: #modal-container;">
|
||||||
<div class="uk-padding-small uk-width-medium" [innerHTML]="getMetricsTooltip(option) | safeHtml">
|
<div class="uk-padding-small uk-width-medium uk-text-small" [innerHTML]="getMetricsTooltip(option) | safeHtml">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
|
@ -38,7 +38,7 @@ export class ParsingFunctions {
|
||||||
|
|
||||||
public open = 'open_access';
|
public open = 'open_access';
|
||||||
public closed = 'closed_access';
|
public closed = 'closed_access';
|
||||||
public unknown = 'question_mark';
|
// public unknown = 'question_mark';
|
||||||
|
|
||||||
private instanceWithDoiExists: boolean = false;
|
private instanceWithDoiExists: boolean = false;
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ export class ParsingFunctions {
|
||||||
}
|
}
|
||||||
|
|
||||||
available.downloadUrl = properties.doiURL + identifiers.get("doi")[0];
|
available.downloadUrl = properties.doiURL + identifiers.get("doi")[0];
|
||||||
available.accessRightIcon = this.unknown;
|
// available.accessRightIcon = this.unknown;
|
||||||
/*
|
/*
|
||||||
if(title != undefined && title['url'] == "") {
|
if(title != undefined && title['url'] == "") {
|
||||||
title['url'] = url;
|
title['url'] = url;
|
||||||
|
@ -355,14 +355,17 @@ export class ParsingFunctions {
|
||||||
if (available.accessRight) {
|
if (available.accessRight) {
|
||||||
if (available.accessRight.toLowerCase().indexOf('open') !== -1) {
|
if (available.accessRight.toLowerCase().indexOf('open') !== -1) {
|
||||||
available.accessRightIcon = this.open;
|
available.accessRightIcon = this.open;
|
||||||
} else if (available.accessRight.toLowerCase().indexOf('not available') !== -1) {
|
}
|
||||||
available.accessRightIcon = this.unknown;
|
// else if (available.accessRight.toLowerCase().indexOf('not available') !== -1) {
|
||||||
} else {
|
// available.accessRightIcon = this.unknown;
|
||||||
|
// }
|
||||||
|
else {
|
||||||
available.accessRightIcon = this.closed;
|
available.accessRightIcon = this.closed;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
available.accessRightIcon = this.unknown;
|
|
||||||
}
|
}
|
||||||
|
// else {
|
||||||
|
// available.accessRightIcon = this.unknown;
|
||||||
|
// }
|
||||||
|
|
||||||
if (instance.hasOwnProperty("license")) {
|
if (instance.hasOwnProperty("license")) {
|
||||||
available.license = Array.isArray(instance['license']) ? instance['license'][0] : instance['license'];
|
available.license = Array.isArray(instance['license']) ? instance['license'][0] : instance['license'];
|
||||||
|
|
|
@ -357,8 +357,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ng-template #dropInfo let-option=option>
|
<ng-template #dropInfo let-option=option>
|
||||||
<div class="uk-dropdown" uk-dropdown="pos: bottom-left; mode:click">
|
<div class="uk-dropdown" uk-dropdown="pos: bottom-left; mode:click; container: #modal-container;">
|
||||||
<div class="uk-padding-small uk-width-medium" [innerHTML]="getMetricsTooltip(option) | safeHtml">
|
<div class="uk-padding-small uk-width-medium uk-text-small" [innerHTML]="getMetricsTooltip(option) | safeHtml">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
|
@ -1246,8 +1246,8 @@
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
<ng-template #dropInfo let-option=option let-isCompact=isCompact>
|
<ng-template #dropInfo let-option=option let-isCompact=isCompact>
|
||||||
<div class="default-dropdown uk-dropdown" uk-dropdown="pos: bottom-left; mode:click">
|
<div class="default-dropdown uk-dropdown" uk-dropdown="pos: bottom-left; mode:click; container: #modal-container;">
|
||||||
<div class="uk-padding-small uk-width-medium" [innerHTML]="getMetricsTooltip(option, isCompact) | safeHtml">
|
<div class="uk-padding-small uk-width-medium uk-text-small" [innerHTML]="getMetricsTooltip(option, isCompact) | safeHtml">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<div class="uk-margin-small-left">
|
<div class="uk-margin-small-left">
|
||||||
<div class="uk-text-meta">Top 100 values are shown in the filters</div>
|
<div class="uk-text-meta">Top 100 values are shown in the filters</div>
|
||||||
<div class="uk-flex uk-flex-bottom uk-margin-top">
|
<div class="uk-flex uk-flex-bottom uk-margin-top">
|
||||||
<div input class="uk-width-1-2@m uk-margin-right" [placeholder]="{label: 'Search', static: true}" inputClass="inner small" [(value)]="keyword"></div>
|
<div input class="uk-width-1-2@m uk-margin-right" [placeholder]="{label: 'Search', static: true}" inputClass="inner small" [(value)]="keyword" (valueChange)="initMatching()"></div>
|
||||||
<div *ngIf="showResultCount === true" input type="select" class="uk-width-expand" placeholder="Sort by"
|
<div *ngIf="showResultCount === true" input type="select" class="uk-width-expand" placeholder="Sort by"
|
||||||
inputClass="border-bottom" [(value)]="sortBy" [options]="sortByOptions" (valueChange)="sort()"></div>
|
inputClass="border-bottom" [(value)]="sortBy" [options]="sortByOptions" (valueChange)="sort()"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -28,8 +28,12 @@
|
||||||
<ng-container *ngFor="let value of this.sortedValues">
|
<ng-container *ngFor="let value of this.sortedValues">
|
||||||
<div *ngIf="filterKeywords(value.name)" title="{{value.name}}"
|
<div *ngIf="filterKeywords(value.name)" title="{{value.name}}"
|
||||||
class="uk-animation-fade uk-text-small">
|
class="uk-animation-fade uk-text-small">
|
||||||
<ng-container
|
<ng-container *ngTemplateOutlet="input_label_wrapper; context: {filter: filter, value: value}"></ng-container>
|
||||||
*ngTemplateOutlet="input_label_wrapper; context: {filter: filter, value: value}"></ng-container>
|
</div>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="!hasMatch">
|
||||||
|
<div class="uk-padding-small uk-text-meta">
|
||||||
|
No filters available with that term
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,7 +5,8 @@ import {
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
OnInit,
|
OnInit,
|
||||||
OnChanges,
|
OnChanges,
|
||||||
SimpleChanges
|
SimpleChanges,
|
||||||
|
ChangeDetectorRef
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import {Filter, Value} from './searchHelperClasses.class';
|
import {Filter, Value} from './searchHelperClasses.class';
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
|
@ -42,7 +43,11 @@ export class SearchFilterComponent implements OnInit, OnChanges {
|
||||||
sub;
|
sub;
|
||||||
public isOpen: boolean = false;
|
public isOpen: boolean = false;
|
||||||
sortedValues;
|
sortedValues;
|
||||||
constructor(private _router: Router, private route: ActivatedRoute) {
|
hasMatch: boolean = false;
|
||||||
|
|
||||||
|
constructor(private _router: Router,
|
||||||
|
private route: ActivatedRoute,
|
||||||
|
private cdr: ChangeDetectorRef) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
|
@ -115,6 +120,7 @@ export class SearchFilterComponent implements OnInit, OnChanges {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.hasMatch = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,7 +254,11 @@ export class SearchFilterComponent implements OnInit, OnChanges {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.sortedValues = Object.assign(sorted);
|
this.sortedValues = Object.assign(sorted);
|
||||||
|
}
|
||||||
|
|
||||||
|
initMatching() {
|
||||||
|
this.hasMatch = false;
|
||||||
|
this.cdr.detectChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
toggle(event) {
|
toggle(event) {
|
||||||
|
|
Loading…
Reference in New Issue