[new-UI | Library]:

1. no-load-paging.component.ts: [Bug fix] Added pipe "number" to totalPages.
2. searchProjects.service.ts: Nothing but removed a ";" which was double.
3. search-input.component.ts: 
	a. Added "bordered" class when input is focused (showSearch) or when a keyword exists (selected).
	b. Added "uk-visible@m" and "uk-padding-small" clases when showing selected keyword (padding is added so that border does not move).
4. icons.ts: Added icon "info" (from uikit).
5. string-utils.class.ts: Removed a console.log from "HTMLToString()" method.


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60681 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2021-03-22 00:18:09 +00:00
parent 8b23de0974
commit 4e5ccfa88b
5 changed files with 9 additions and 5 deletions

View File

@ -10,7 +10,7 @@ import {Component, Input, Output, EventEmitter} from '@angular/core';
<span class="uk-text-muted uk-text-uppercase"> {{type}}, page </span>
<span class="uk-text-bold">{{page}}</span>
<span class="uk-text-muted uk-text-uppercase"> of </span>
<span class="uk-text-bold">{{paging.getTotalPages()}}</span>
<span class="uk-text-bold">{{paging.getTotalPages() | number}}</span>
</div>
<div class="float-children-right-at-medium margin-small-top-at-small uk-width-expand">
<paging-no-load #paging [currentPage]="page"

View File

@ -96,7 +96,7 @@ export class SearchProjectsService {
.pipe(map(res => [res['meta'].total, this.parseResults(res['results']),RefineResultsUtils.parse(res['refineResults'],refineFields, "project")]));
}
getFunders(properties:EnvProperties ):any {
let url = properties.searchAPIURLLAst+"projects?refine=true&fields=funder&size=0"+ "&format=json";;
let url = properties.searchAPIURLLAst+"projects?refine=true&fields=funder&size=0"+ "&format=json";
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
//.map(res => <any> res.json())

View File

@ -7,7 +7,7 @@ import {MatAutocompleteTrigger} from '@angular/material/autocomplete';
styleUrls: ['search-input.component.css'],
template: `
<div class="uk-flex uk-flex-middle uk-flex-center search-input" [ngClass]="colorClass">
<div *ngIf="control" class="uk-width-expand" [class.bordered]="bordered && showSearch">
<div *ngIf="control" class="uk-width-expand" [class.bordered]="bordered && (showSearch || selected)">
<form (ngSubmit)="search()">
<input #input type="text" class="uk-width-1-1"
[class.uk-animation-slide-right-medium]="showSearch"
@ -22,7 +22,7 @@ import {MatAutocompleteTrigger} from '@angular/material/autocomplete';
</mat-option>
</mat-autocomplete>
</form>
<div *ngIf="selected && !showSearch" class="uk-flex uk-flex-left selected">
<div *ngIf="selected && !showSearch" class="uk-flex uk-flex-left selected uk-padding-small uk-visible@m">
<span class="uk-flex uk-flex-middle clickable">
<span (click)="toggle()">{{selected}}</span>
<span class="uk-icon space" uk-icon="icon: close; ratio: 0.8" (click)="resetEmitter.emit()">

View File

@ -127,3 +127,8 @@ export const photo = {
data: '<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 0 24 24" width="20"><path d="M0 0h24v24H0z" fill="none"/><circle cx="12" cy="12" r="3.2"/><path d="M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"/></svg>'
}
/** Add new icon under this line to be sure that it will be added on preview */
export const info = {
name: 'info',
data: '<svg width="20" height="20" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" data-svg="info"><path d="M12.13,11.59 C11.97,12.84 10.35,14.12 9.1,14.16 C6.17,14.2 9.89,9.46 8.74,8.37 C9.3,8.16 10.62,7.83 10.62,8.81 C10.62,9.63 10.12,10.55 9.88,11.32 C8.66,15.16 12.13,11.15 12.14,11.18 C12.16,11.21 12.16,11.35 12.13,11.59 C12.08,11.95 12.16,11.35 12.13,11.59 L12.13,11.59 Z M11.56,5.67 C11.56,6.67 9.36,7.15 9.36,6.03 C9.36,5 11.56,4.54 11.56,5.67 L11.56,5.67 Z"></path><circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9"></circle></svg>'
}

View File

@ -370,7 +370,6 @@ export class StringUtils {
html = html.replace(/<[^>]*>/g, '');
}catch( e){
}
console.log(html);
return html;
}
}