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>
|
||||
<ng-template #dropInfo let-option=option>
|
||||
<div class="uk-dropdown" uk-dropdown="pos: bottom-left; mode:click">
|
||||
<div class="uk-padding-small uk-width-medium" [innerHTML]="getMetricsTooltip(option) | safeHtml">
|
||||
<div class="uk-dropdown" uk-dropdown="pos: bottom-left; mode:click; container: #modal-container;">
|
||||
<div class="uk-padding-small uk-width-medium uk-text-small" [innerHTML]="getMetricsTooltip(option) | safeHtml">
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
|
|
@ -38,7 +38,7 @@ export class ParsingFunctions {
|
|||
|
||||
public open = 'open_access';
|
||||
public closed = 'closed_access';
|
||||
public unknown = 'question_mark';
|
||||
// public unknown = 'question_mark';
|
||||
|
||||
private instanceWithDoiExists: boolean = false;
|
||||
|
||||
|
@ -194,7 +194,7 @@ export class ParsingFunctions {
|
|||
}
|
||||
|
||||
available.downloadUrl = properties.doiURL + identifiers.get("doi")[0];
|
||||
available.accessRightIcon = this.unknown;
|
||||
// available.accessRightIcon = this.unknown;
|
||||
/*
|
||||
if(title != undefined && title['url'] == "") {
|
||||
title['url'] = url;
|
||||
|
@ -355,14 +355,17 @@ export class ParsingFunctions {
|
|||
if (available.accessRight) {
|
||||
if (available.accessRight.toLowerCase().indexOf('open') !== -1) {
|
||||
available.accessRightIcon = this.open;
|
||||
} else if (available.accessRight.toLowerCase().indexOf('not available') !== -1) {
|
||||
available.accessRightIcon = this.unknown;
|
||||
} else {
|
||||
}
|
||||
// else if (available.accessRight.toLowerCase().indexOf('not available') !== -1) {
|
||||
// available.accessRightIcon = this.unknown;
|
||||
// }
|
||||
else {
|
||||
available.accessRightIcon = this.closed;
|
||||
}
|
||||
} else {
|
||||
available.accessRightIcon = this.unknown;
|
||||
}
|
||||
// else {
|
||||
// available.accessRightIcon = this.unknown;
|
||||
// }
|
||||
|
||||
if (instance.hasOwnProperty("license")) {
|
||||
available.license = Array.isArray(instance['license']) ? instance['license'][0] : instance['license'];
|
||||
|
|
|
@ -357,8 +357,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<ng-template #dropInfo let-option=option>
|
||||
<div class="uk-dropdown" uk-dropdown="pos: bottom-left; mode:click">
|
||||
<div class="uk-padding-small uk-width-medium" [innerHTML]="getMetricsTooltip(option) | safeHtml">
|
||||
<div class="uk-dropdown" uk-dropdown="pos: bottom-left; mode:click; container: #modal-container;">
|
||||
<div class="uk-padding-small uk-width-medium uk-text-small" [innerHTML]="getMetricsTooltip(option) | safeHtml">
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
|
|
@ -1246,8 +1246,8 @@
|
|||
</ng-template>
|
||||
|
||||
<ng-template #dropInfo let-option=option let-isCompact=isCompact>
|
||||
<div class="default-dropdown uk-dropdown" uk-dropdown="pos: bottom-left; mode:click">
|
||||
<div class="uk-padding-small uk-width-medium" [innerHTML]="getMetricsTooltip(option, isCompact) | safeHtml">
|
||||
<div class="default-dropdown uk-dropdown" uk-dropdown="pos: bottom-left; mode:click; container: #modal-container;">
|
||||
<div class="uk-padding-small uk-width-medium uk-text-small" [innerHTML]="getMetricsTooltip(option, isCompact) | safeHtml">
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<div class="uk-margin-small-left">
|
||||
<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 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"
|
||||
inputClass="border-bottom" [(value)]="sortBy" [options]="sortByOptions" (valueChange)="sort()"></div>
|
||||
</div>
|
||||
|
@ -28,8 +28,12 @@
|
|||
<ng-container *ngFor="let value of this.sortedValues">
|
||||
<div *ngIf="filterKeywords(value.name)" title="{{value.name}}"
|
||||
class="uk-animation-fade uk-text-small">
|
||||
<ng-container
|
||||
*ngTemplateOutlet="input_label_wrapper; context: {filter: filter, value: value}"></ng-container>
|
||||
<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>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
|
|
@ -5,7 +5,8 @@ import {
|
|||
EventEmitter,
|
||||
OnInit,
|
||||
OnChanges,
|
||||
SimpleChanges
|
||||
SimpleChanges,
|
||||
ChangeDetectorRef
|
||||
} from '@angular/core';
|
||||
import {Filter, Value} from './searchHelperClasses.class';
|
||||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
|
@ -42,7 +43,11 @@ export class SearchFilterComponent implements OnInit, OnChanges {
|
|||
sub;
|
||||
public isOpen: boolean = false;
|
||||
sortedValues;
|
||||
constructor(private _router: Router, private route: ActivatedRoute) {
|
||||
hasMatch: boolean = false;
|
||||
|
||||
constructor(private _router: Router,
|
||||
private route: ActivatedRoute,
|
||||
private cdr: ChangeDetectorRef) {
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
@ -115,6 +120,7 @@ export class SearchFilterComponent implements OnInit, OnChanges {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
this.hasMatch = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -248,7 +254,11 @@ export class SearchFilterComponent implements OnInit, OnChanges {
|
|||
});
|
||||
}
|
||||
this.sortedValues = Object.assign(sorted);
|
||||
}
|
||||
|
||||
initMatching() {
|
||||
this.hasMatch = false;
|
||||
this.cdr.detectChanges();
|
||||
}
|
||||
|
||||
toggle(event) {
|
||||
|
|
Loading…
Reference in New Issue