ORP landing: change link button text to link this product to
Search Advanced: smaller remove filter buttons Search: when there are no numbers in filter hide sorting options Cookie law: change session cookie(default) to expire in 3 months Metrics: change string to numbers to be able to use > or == git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@52824 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
19a26a399b
commit
0c0147f408
|
@ -152,7 +152,7 @@
|
||||||
<button style=" box-shadow: 0 1px 10px #444444" class=" uk-button uk-button-danger ">
|
<button style=" box-shadow: 0 1px 10px #444444" class=" uk-button uk-button-danger ">
|
||||||
<span class="uk-icon">
|
<span class="uk-icon">
|
||||||
<svg icon="link" ratio="1" xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 20 20" height="25"><path d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M7.925,11.875 L11.925,7.975" fill="none" stroke="#000" stroke-width="1.1"></path></svg>
|
<svg icon="link" ratio="1" xmlns="http://www.w3.org/2000/svg" width="25" viewBox="0 0 20 20" height="25"><path d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375" fill="none" stroke="#000" stroke-width="1.1"></path><path d="M7.925,11.875 L11.925,7.975" fill="none" stroke="#000" stroke-width="1.1"></path></svg>
|
||||||
</span> Link this other research product to
|
</span> Link this product to
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div uk-dropdown="pos: top-right; mode:click" style="background: transparent !important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;">
|
<div uk-dropdown="pos: top-right; mode:click" style="background: transparent !important;box-shadow: none; max-width: 70px !important; min-width: 70px !important;">
|
||||||
|
|
|
@ -37,14 +37,15 @@
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class=" " >
|
<td class=" " >
|
||||||
<span *ngIf="selectedFields.length > 1" type="button" class="uk-icon-button" (click)="removeField(i)">
|
<span *ngIf="selectedFields.length > 1" type="button" class="uk-icon-button icon-button-small" (click)="removeField(i)">
|
||||||
<span class=""><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="minus" ratio="1"><rect height="3" width="18" y="9" x="2"></rect></svg></span>
|
<span class=""><svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="minus" ratio="0.8"><rect height="1" width="18" y="9" x="1"></rect></svg></span>
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="selectedFields.length == 1" type="button" class="uk-icon-button" disabled>
|
<span *ngIf="selectedFields.length == 1" type="button" class="uk-icon-button icon-button-small" disabled>
|
||||||
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="minus" ratio="1"><rect height="3" width="18" y="9" x="1"></rect></svg></span>
|
<span class="uk-icon">
|
||||||
|
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="minus" ratio="0.8"><rect height="1" width="18" y="9" x="1"></rect></svg>
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
<span *ngIf="i == selectedFields.length-1 " type="button" class="uk-icon-button icon-button-small" (click)="addField()">
|
||||||
<td *ngIf="i == selectedFields.length-1 " class=" "><span type="button" class="uk-icon-button icon-button-small" (click)="addField()">
|
|
||||||
<span class="uk-icon">
|
<span class="uk-icon">
|
||||||
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
|
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
<div *ngIf="filter.values.length >= 99" class="uk-alert uk-alert-primary uk-text-center uk-margin-right uk-margin-left">Showing top {{filter.values.length}} values. </div>
|
<div *ngIf="filter.values.length >= 99" class="uk-alert uk-alert-primary uk-text-center uk-margin-right uk-margin-left">Showing top {{filter.values.length}} values. </div>
|
||||||
<div class="uk-grid uk-margin-left uk-margin-right">
|
<div class="uk-grid uk-margin-left uk-margin-right">
|
||||||
<input class="uk-input uk-margin-small-bottom uk-width-1-2 " name="filter-keyword" placeholder="Search for {{filter.title}}" type="text" [(ngModel)]="keyword">
|
<input class="uk-input uk-margin-small-bottom uk-width-1-2 " name="filter-keyword" placeholder="Search for {{filter.title}}" type="text" [(ngModel)]="keyword">
|
||||||
<select [(ngModel)]="sortBy" class="uk-select uk-margin-small-bottom uk-width-1-2 uk-padding-remove" name="select_order" (ngModelChange)="sortByChanged = true;" >
|
<select *ngIf = "showResultCount === true" [(ngModel)]="sortBy" class="uk-select uk-margin-small-bottom uk-width-1-2 uk-padding-remove" name="select_order" (ngModelChange)="sortByChanged = true;" >
|
||||||
<option value="num" >Sort by results number</option>
|
<option value="num" >Sort by results number</option>
|
||||||
<option value="name" >Sort by name</option>
|
<option value="name" >Sort by name</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -23,8 +23,8 @@ export class MetricsService {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
parseMetrics(downloads: any, views: any, totalDownloads: string, totalViews: string,
|
parseMetrics(downloads: any, views: any, totalDownloads: number, totalViews: number,
|
||||||
totalOpenaireViews: string, totalOpenaireDownloads: string, pageViews: string, properties:EnvProperties): any {
|
totalOpenaireViews: number, totalOpenaireDownloads: number, pageViews: number, properties:EnvProperties): any {
|
||||||
this.metrics = new Metrics();
|
this.metrics = new Metrics();
|
||||||
|
|
||||||
this.metrics.totalDownloads = totalDownloads;
|
this.metrics.totalDownloads = totalDownloads;
|
||||||
|
|
|
@ -51,7 +51,11 @@ export class CookieLawService {
|
||||||
*/
|
*/
|
||||||
private setCookie(name: string): void {
|
private setCookie(name: string): void {
|
||||||
if (typeof document !== 'undefined') {
|
if (typeof document !== 'undefined') {
|
||||||
document.cookie = encodeURIComponent(name) + '=true; path=/';
|
let d:Date = new Date();
|
||||||
|
d.setTime(d.getTime() + 3*30 * 24 * 60 * 60 * 1000); // in 3 months
|
||||||
|
let expires:string = `expires=${d.toUTCString()}`;
|
||||||
|
|
||||||
|
document.cookie = encodeURIComponent(name) + '=true; path=/; expires='+expires+';';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
export class Metrics {
|
export class Metrics {
|
||||||
totalDownloads: string;
|
totalDownloads: number;
|
||||||
totalViews: string;
|
totalViews: number;
|
||||||
totalOpenaireViews: string;
|
totalOpenaireViews: number;
|
||||||
totalOpenaireDownloads: string;
|
totalOpenaireDownloads: number;
|
||||||
pageViews: string;
|
pageViews: number;
|
||||||
infos: Map<string, {"name": string, "url": string, "numOfDownloads": string, "numOfViews": string, "openaireDownloads": string, "openaireViews": string}>;
|
infos: Map<string, {"name": string, "url": string, "numOfDownloads": string, "numOfViews": string, "openaireDownloads": string, "openaireViews": string}>;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue