Revision 47341
Added by Konstantina Galouni about 7 years ago
modules/uoa-services-portal/trunk/portal-2/src/app/searchPages/dataProviders/entityRegistries.component.ts | ||
---|---|---|
21 | 21 |
[baseUrl] = "baseUrl" [showResultCount]=false |
22 | 22 |
(queryChange)="queryChanged($event)" |
23 | 23 |
(downloadClick)="downloadClicked($event)" |
24 |
[csvParams]="csvParams" csvPath="resources"> |
|
24 |
[csvParams]="csvParams" csvPath="resources" |
|
25 |
[disableForms]="disableForms"> |
|
25 | 26 |
</search-page> |
26 | 27 |
|
27 | 28 |
` |
... | ... | |
46 | 47 |
"export":[] |
47 | 48 |
}; |
48 | 49 |
public CSVDownloaded = false; |
50 |
public disableForms: boolean = false; |
|
49 | 51 |
|
50 | 52 |
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ; |
51 | 53 |
public resourcesQuery = "&query=((oaftype exact datasource) and(datasourcetypeuiid = other))"; |
... | ... | |
90 | 92 |
|
91 | 93 |
var errorCodes:ErrorCodes = new ErrorCodes(); |
92 | 94 |
this.searchUtils.status = errorCodes.LOADING; |
93 |
this.searchPage.openLoading(); |
|
95 |
//this.searchPage.openLoading(); |
|
96 |
this.disableForms = true; |
|
97 |
this.results = []; |
|
98 |
this.searchUtils.totalResults = 0; |
|
94 | 99 |
|
95 | 100 |
this.subResults = this._searchDataprovidersService.searchEntityRegistries(parameters,(refine)?this.searchPage.getRefineFieldsQuery():null, page, size, []).subscribe( |
96 | 101 |
data => { |
... | ... | |
104 | 109 |
if(this.searchUtils.totalResults == 0 ){ |
105 | 110 |
this.searchUtils.status = errorCodes.NONE; |
106 | 111 |
} |
107 |
this.searchPage.closeLoading(); |
|
112 |
//this.searchPage.closeLoading(); |
|
113 |
this.disableForms = false; |
|
108 | 114 |
|
109 | 115 |
}, |
110 | 116 |
err => { |
... | ... | |
115 | 121 |
// } |
116 | 122 |
var errorCodes:ErrorCodes = new ErrorCodes(); |
117 | 123 |
this.searchUtils.status = errorCodes.ERROR; |
118 |
this.searchPage.closeLoading(); |
|
124 |
//this.searchPage.closeLoading(); |
|
125 |
this.disableForms = false; |
|
119 | 126 |
|
120 | 127 |
} |
121 | 128 |
); |
modules/uoa-services-portal/trunk/portal-2/src/app/searchPages/dataProviders/compatibleDataProviders.component.ts | ||
---|---|---|
21 | 21 |
[baseUrl] = "baseUrl" [showResultCount]=false |
22 | 22 |
(queryChange)="queryChanged($event)" |
23 | 23 |
(downloadClick)="downloadClicked($event)" |
24 |
[csvParams]="csvParams" csvPath="resources"> |
|
24 |
[csvParams]="csvParams" csvPath="resources" |
|
25 |
[disableForms]="disableForms"> |
|
25 | 26 |
</search-page> |
26 | 27 |
<!--table-view [(datasources)] = results></table-view--> |
27 | 28 |
|
... | ... | |
48 | 49 |
public CSVDownloaded = false; |
49 | 50 |
public resourcesQuery = "&query=((oaftype exact datasource) not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = hostedBy) not(datasourcecompatibilityid = notCompatible) not(datasourcetypeuiid = other))"; |
50 | 51 |
public csvParams: string; |
52 |
public disableForms: boolean = false; |
|
51 | 53 |
|
52 | 54 |
@ViewChild (SearchPageComponent) searchPage : SearchPageComponent ; |
53 | 55 |
|
... | ... | |
89 | 91 |
|
90 | 92 |
var errorCodes:ErrorCodes = new ErrorCodes(); |
91 | 93 |
this.searchUtils.status = errorCodes.LOADING; |
92 |
this.searchPage.openLoading(); |
|
94 |
//this.searchPage.openLoading(); |
|
95 |
this.disableForms = true; |
|
96 |
this.results = []; |
|
97 |
this.searchUtils.totalResults = 0; |
|
93 | 98 |
|
94 | 99 |
this.subResults = this._searchDataprovidersService.searchCompatibleDataproviders(parameters,(refine)?this.searchPage.getRefineFieldsQuery():null, page, size, []).subscribe( |
95 | 100 |
data => { |
... | ... | |
103 | 108 |
if(this.searchUtils.totalResults == 0 ){ |
104 | 109 |
this.searchUtils.status = errorCodes.NONE; |
105 | 110 |
} |
106 |
this.searchPage.closeLoading(); |
|
111 |
//this.searchPage.closeLoading(); |
|
112 |
this.disableForms = false; |
|
107 | 113 |
|
108 | 114 |
}, |
109 | 115 |
err => { |
... | ... | |
114 | 120 |
// } |
115 | 121 |
var errorCodes:ErrorCodes = new ErrorCodes(); |
116 | 122 |
this.searchUtils.status = errorCodes.ERROR; |
117 |
this.searchPage.closeLoading(); |
|
123 |
//this.searchPage.closeLoading(); |
|
124 |
this.disableForms = false; |
|
118 | 125 |
|
119 | 126 |
} |
120 | 127 |
); |
Also available in: Unified diff
Removed modal for loading in Pages for Data providers - Entity Registries and added an alert message (while loading all forms, inputs, buttons are disabled)