fix for loading animation in landing pages

This commit is contained in:
Alex Martzios 2022-06-10 14:56:32 +03:00
parent 9caf036b12
commit a89710765e
2 changed files with 33 additions and 31 deletions

View File

@ -265,7 +265,7 @@ export class OrganizationComponent {
this.fetchDatasets.clearSubscriptions(); this.fetchDatasets.clearSubscriptions();
this.fetchPublications.clearSubscriptions(); this.fetchPublications.clearSubscriptions();
this.fetchSoftware.clearSubscriptions(); this.fetchSoftware.clearSubscriptions();
this.fetchPublications.clearSubscriptions(); this.fetchOrps.clearSubscriptions();
this.fetchDataproviders.clearSubscriptions(); this.fetchDataproviders.clearSubscriptions();
this.fetchProjects.clearSubscriptions(); this.fetchProjects.clearSubscriptions();
} }

View File

@ -7,38 +7,40 @@ import {StringUtils} from "../../string-utils.class";
@Component({ @Component({
selector: 'search-tab', selector: 'search-tab',
template: ` template: `
<a *ngIf="fetch.searchUtils.status == errorCodes.LOADING" class="uk-invisible" <a *ngIf="fetch.searchUtils.status == errorCodes.LOADING" class="uk-invisible"
[queryParams]="params" [routerLink]="searchLinkToAdvancedPage"></a> [queryParams]="params" [routerLink]="searchLinkToAdvancedPage"></a>
<ng-container *ngIf="fetch.searchUtils.status != errorCodes.LOADING"> <ng-container> <!-- *ngIf="fetch.searchUtils.status != errorCodes.LOADING" -->
<div class="uk-flex uk-flex-between uk-flex-middle uk-margin-bottom"> <div class="uk-flex uk-flex-between uk-flex-middle uk-margin-bottom">
<div class="uk-text-meta uk-text-large uk-text-uppercase"> <div class="uk-text-meta uk-text-large uk-text-uppercase">
<span *ngIf="!customTitle && resultType"><span *ngIf="resultType != 'organization' && resultType != 'dataprovider' && resultType != 'project'">Recent</span> <span *ngIf="!customTitle && resultType"><span *ngIf="resultType != 'organization' && resultType != 'dataprovider' && resultType != 'project'">Recent</span>
{{getEntityName(resultType)}} {{getEntityName(resultType)}}
</span> </span>
<span *ngIf="customTitle">{{customTitle}}</span> <span *ngIf="customTitle">{{customTitle}}</span>
</div> </div>
<div *ngIf="searchLinkToAdvancedPage"> <div *ngIf="searchLinkToAdvancedPage">
<a class="el-content uk-button uk-button-text" [queryParams]="params" [routerLink]="searchLinkToAdvancedPage"> <a class="el-content uk-button uk-button-text" [queryParams]="params" [routerLink]="searchLinkToAdvancedPage">
View all View all
<span *ngIf="fetch.searchUtils.totalResults <= searchNumber">in search page</span> <span *ngIf="fetch.searchUtils.totalResults <= searchNumber">in search page</span>
</a> </a>
</div> </div>
</div> </div>
<ng-content></ng-content> <ng-content></ng-content>
<errorMessages *ngIf="resultType" [status]="[fetch.searchUtils.status]" [type]="getEntityName(resultType)" <div *ngIf="resultType && fetch.searchUtils.status != errorCodes.DONE" class="uk-margin-xlarge-top">
tab_error_class=true></errorMessages> <errorMessages [status]="[fetch.searchUtils.status]" [type]="getEntityName(resultType)"
tab_error_class=true></errorMessages>
</div>
</ng-container> </ng-container>
<ng-container *ngIf="fetch.searchUtils.status == errorCodes.DONE"> <ng-container *ngIf="fetch.searchUtils.status == errorCodes.DONE">
<search-result [properties]="properties" <search-result [properties]="properties"
[results]="fetch.results" [results]="fetch.results"
[status]="fetch.searchUtils.status" [status]="fetch.searchUtils.status"
[type]="resultType" [showImpactFactors]="showImpactFactors" [showEnermaps]="showEnermaps"> [type]="resultType" [showImpactFactors]="showImpactFactors" [showEnermaps]="showEnermaps">
</search-result> </search-result>
<!-- <div *ngIf="searchLinkToAdvancedPage && fetch.results?.length > 0" class="uk-text-right">--> <!-- <div *ngIf="searchLinkToAdvancedPage && fetch.results?.length > 0" class="uk-text-right">-->
<!-- <a class="el-content uk-button uk-button-text" [queryParams]="params" [routerLink]="searchLinkToAdvancedPage">--> <!-- <a class="el-content uk-button uk-button-text" [queryParams]="params" [routerLink]="searchLinkToAdvancedPage">-->
@ -46,7 +48,7 @@ import {StringUtils} from "../../string-utils.class";
<!-- <span *ngIf="fetch.searchUtils.totalResults <= searchNumber">in search page</span>--> <!-- <span *ngIf="fetch.searchUtils.totalResults <= searchNumber">in search page</span>-->
<!-- </a>--> <!-- </a>-->
<!-- </div>--> <!-- </div>-->
</ng-container> </ng-container>
` `
}) })