Removed modal for loading in Pages for Data providers - Entity Registries and added an alert message (while loading all forms, inputs, buttons are disabled)
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@47341 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
d3245a1a3c
commit
3e74bc8d16
|
@ -21,7 +21,8 @@ import {ExportCSVComponent} from '../../utils/exportCSV.class';
|
|||
[baseUrl] = "baseUrl" [showResultCount]=false
|
||||
(queryChange)="queryChanged($event)"
|
||||
(downloadClick)="downloadClicked($event)"
|
||||
[csvParams]="csvParams" csvPath="resources">
|
||||
[csvParams]="csvParams" csvPath="resources"
|
||||
[disableForms]="disableForms">
|
||||
</search-page>
|
||||
<!--table-view [(datasources)] = results></table-view-->
|
||||
|
||||
|
@ -48,6 +49,7 @@ export class SearchCompatibleDataprovidersComponent {
|
|||
public CSVDownloaded = false;
|
||||
public resourcesQuery = "&query=((oaftype exact datasource) not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = hostedBy) not(datasourcecompatibilityid = notCompatible) not(datasourcetypeuiid = other))";
|
||||
public csvParams: string;
|
||||
public disableForms: boolean = false;
|
||||
|
||||
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
||||
|
||||
|
@ -89,7 +91,10 @@ export class SearchCompatibleDataprovidersComponent {
|
|||
|
||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
this.searchUtils.status = errorCodes.LOADING;
|
||||
this.searchPage.openLoading();
|
||||
//this.searchPage.openLoading();
|
||||
this.disableForms = true;
|
||||
this.results = [];
|
||||
this.searchUtils.totalResults = 0;
|
||||
|
||||
this.subResults = this._searchDataprovidersService.searchCompatibleDataproviders(parameters,(refine)?this.searchPage.getRefineFieldsQuery():null, page, size, []).subscribe(
|
||||
data => {
|
||||
|
@ -103,7 +108,8 @@ export class SearchCompatibleDataprovidersComponent {
|
|||
if(this.searchUtils.totalResults == 0 ){
|
||||
this.searchUtils.status = errorCodes.NONE;
|
||||
}
|
||||
this.searchPage.closeLoading();
|
||||
//this.searchPage.closeLoading();
|
||||
this.disableForms = false;
|
||||
|
||||
},
|
||||
err => {
|
||||
|
@ -114,7 +120,8 @@ export class SearchCompatibleDataprovidersComponent {
|
|||
// }
|
||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
this.searchUtils.status = errorCodes.ERROR;
|
||||
this.searchPage.closeLoading();
|
||||
//this.searchPage.closeLoading();
|
||||
this.disableForms = false;
|
||||
|
||||
}
|
||||
);
|
||||
|
|
|
@ -21,7 +21,8 @@ import {ExportCSVComponent} from '../../utils/exportCSV.class';
|
|||
[baseUrl] = "baseUrl" [showResultCount]=false
|
||||
(queryChange)="queryChanged($event)"
|
||||
(downloadClick)="downloadClicked($event)"
|
||||
[csvParams]="csvParams" csvPath="resources">
|
||||
[csvParams]="csvParams" csvPath="resources"
|
||||
[disableForms]="disableForms">
|
||||
</search-page>
|
||||
|
||||
`
|
||||
|
@ -46,6 +47,7 @@ export class SearchEntityRegistriesComponent {
|
|||
"export":[]
|
||||
};
|
||||
public CSVDownloaded = false;
|
||||
public disableForms: boolean = false;
|
||||
|
||||
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ;
|
||||
public resourcesQuery = "&query=((oaftype exact datasource) and(datasourcetypeuiid = other))";
|
||||
|
@ -90,7 +92,10 @@ export class SearchEntityRegistriesComponent {
|
|||
|
||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
this.searchUtils.status = errorCodes.LOADING;
|
||||
this.searchPage.openLoading();
|
||||
//this.searchPage.openLoading();
|
||||
this.disableForms = true;
|
||||
this.results = [];
|
||||
this.searchUtils.totalResults = 0;
|
||||
|
||||
this.subResults = this._searchDataprovidersService.searchEntityRegistries(parameters,(refine)?this.searchPage.getRefineFieldsQuery():null, page, size, []).subscribe(
|
||||
data => {
|
||||
|
@ -104,7 +109,8 @@ export class SearchEntityRegistriesComponent {
|
|||
if(this.searchUtils.totalResults == 0 ){
|
||||
this.searchUtils.status = errorCodes.NONE;
|
||||
}
|
||||
this.searchPage.closeLoading();
|
||||
//this.searchPage.closeLoading();
|
||||
this.disableForms = false;
|
||||
|
||||
},
|
||||
err => {
|
||||
|
@ -115,7 +121,8 @@ export class SearchEntityRegistriesComponent {
|
|||
// }
|
||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
this.searchUtils.status = errorCodes.ERROR;
|
||||
this.searchPage.closeLoading();
|
||||
//this.searchPage.closeLoading();
|
||||
this.disableForms = false;
|
||||
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue