update tooltip for research products in search
This commit is contained in:
parent
3f7a9dda90
commit
c8d27f6b57
|
@ -78,7 +78,7 @@ export class EntitiesSelectionComponent {
|
||||||
}
|
}
|
||||||
if(showPage[this.simpleView ? this.properties.searchLinkToResults : this.properties.searchLinkToAdvancedResults]
|
if(showPage[this.simpleView ? this.properties.searchLinkToResults : this.properties.searchLinkToAdvancedResults]
|
||||||
&& (showEntity["publication"] || showEntity["dataset"] || showEntity["software"] || showEntity["orp"])) {
|
&& (showEntity["publication"] || showEntity["dataset"] || showEntity["software"] || showEntity["orp"])) {
|
||||||
this.entities.push({label: OpenaireEntities.RESULTS, value: 'result', tooltip: OpenaireEntities.PUBLICATIONS+', '+OpenaireEntities.DATASETS+', '+OpenaireEntities.SOFTWARE+', '+OpenaireEntities.OTHER});
|
this.entities.push({label: OpenaireEntities.RESULTS, value: 'result', tooltip: OpenaireEntities.RESULTS+' ('+OpenaireEntities.PUBLICATIONS+', '+OpenaireEntities.DATASETS+', '+OpenaireEntities.SOFTWARE+', '+OpenaireEntities.OTHER+')'});
|
||||||
}
|
}
|
||||||
if(showPage[this.simpleView ? this.properties.searchLinkToProjects : this.properties.searchLinkToAdvancedProjects] && showEntity["project"]) {
|
if(showPage[this.simpleView ? this.properties.searchLinkToProjects : this.properties.searchLinkToAdvancedProjects] && showEntity["project"]) {
|
||||||
this.entities.push({label: OpenaireEntities.PROJECTS, value: 'project'});
|
this.entities.push({label: OpenaireEntities.PROJECTS, value: 'project'});
|
||||||
|
|
|
@ -59,7 +59,7 @@ declare var UIkit;
|
||||||
<label>{{placeholderInfo.label}} <sup *ngIf="required">*</sup></label>
|
<label>{{placeholderInfo.label}} <sup *ngIf="required">*</sup></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-flex" [class.uk-flex-middle]="type !== 'textarea'"
|
<div class="uk-flex" [class.uk-flex-middle]="type !== 'textarea'"
|
||||||
[attr.uk-tooltip]="(tooltip && formControl.value && !focused && type !== 'chips' && type !== 'textarea')?('title: ' + getLabel(formControl.value) + '; delay: 500; pos: bottom-left'):null">
|
[attr.uk-tooltip]="(tooltip && formControl.value && !focused && type !== 'chips' && type !== 'textarea')?('title: ' + getTooltip(formControl.value) + '; delay: 500; pos: bottom-left'):null">
|
||||||
<ng-template [ngIf]="type === 'text' || type === 'URL' || type === 'logoURL'">
|
<ng-template [ngIf]="type === 'text' || type === 'URL' || type === 'logoURL'">
|
||||||
<input #input class="input" [attr.placeholder]="placeholderInfo?.static?placeholderInfo.label:hint"
|
<input #input class="input" [attr.placeholder]="placeholderInfo?.static?placeholderInfo.label:hint"
|
||||||
[formControl]="formAsControl" [class.uk-text-truncate]="!focused">
|
[formControl]="formAsControl" [class.uk-text-truncate]="!focused">
|
||||||
|
@ -498,6 +498,11 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
||||||
return (option) ? option.label : (value);
|
return (option) ? option.label : (value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getTooltip(value: any): string {
|
||||||
|
let option = this.optionsArray.find(option => HelperFunctions.equals(option.value, value));
|
||||||
|
return (option) ? (option.tooltip ? option.tooltip : option.label) : (value);
|
||||||
|
}
|
||||||
|
|
||||||
focus(value: boolean, event = null) {
|
focus(value: boolean, event = null) {
|
||||||
if (this.focused) {
|
if (this.focused) {
|
||||||
this.formControl.markAsTouched();
|
this.formControl.markAsTouched();
|
||||||
|
|
Loading…
Reference in New Issue