[Trunk | Library]: Bug fix: search.component.ts: In '/search/find' route' make request for results or for refine fields depending on whether there is a keyword.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@57200 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
83d1db9aca
commit
cdb337592a
|
@ -261,7 +261,8 @@ export class SearchComponent {
|
||||||
this.advancedSearchLink = this.properties.searchLinkToAdvancedPublications;//"/search/advanced/publications";
|
this.advancedSearchLink = this.properties.searchLinkToAdvancedPublications;//"/search/advanced/publications";
|
||||||
if (this.reloadPublications &&
|
if (this.reloadPublications &&
|
||||||
this.fetchPublications.searchUtils.status != this.errorCodes.NONE /*&&
|
this.fetchPublications.searchUtils.status != this.errorCodes.NONE /*&&
|
||||||
this.fetchPublications.searchUtils.status != this.errorCodes.ERROR*/) {
|
this.fetchPublications.searchUtils.status != this.errorCodes.ERROR*/
|
||||||
|
&& (this.keyword != null && this.keyword.length > 0)) {
|
||||||
this.reloadPublications = false;
|
this.reloadPublications = false;
|
||||||
this.fetchPublications.getResultsByKeyword("publication", this.keyword, 1, 10, this.properties, this.customFilter);
|
this.fetchPublications.getResultsByKeyword("publication", this.keyword, 1, 10, this.properties, this.customFilter);
|
||||||
this.linkToSearchPublications = this.properties.searchLinkToPublications;// + "?keyword=" + this.keyword;
|
this.linkToSearchPublications = this.properties.searchLinkToPublications;// + "?keyword=" + this.keyword;
|
||||||
|
@ -273,7 +274,8 @@ export class SearchComponent {
|
||||||
this.advancedSearchLink = this.properties.searchLinkToAdvancedDatasets;//"/search/advanced/datasets";
|
this.advancedSearchLink = this.properties.searchLinkToAdvancedDatasets;//"/search/advanced/datasets";
|
||||||
if (this.reloadDatasets &&
|
if (this.reloadDatasets &&
|
||||||
this.fetchDatasets.searchUtils.status != this.errorCodes.NONE /*&&
|
this.fetchDatasets.searchUtils.status != this.errorCodes.NONE /*&&
|
||||||
this.fetchDatasets.searchUtils.status != this.errorCodes.ERROR*/) {
|
this.fetchDatasets.searchUtils.status != this.errorCodes.ERROR*/
|
||||||
|
&& (this.keyword != null && this.keyword.length > 0)) {
|
||||||
this.reloadDatasets = false;
|
this.reloadDatasets = false;
|
||||||
this.fetchDatasets.getResultsByKeyword("dataset", this.keyword, 1, 10, this.properties, this.customFilter);
|
this.fetchDatasets.getResultsByKeyword("dataset", this.keyword, 1, 10, this.properties, this.customFilter);
|
||||||
this.linkToSearchDatasets = this.properties.searchLinkToDatasets;// + "?keyword=" + this.keyword;
|
this.linkToSearchDatasets = this.properties.searchLinkToDatasets;// + "?keyword=" + this.keyword;
|
||||||
|
@ -287,7 +289,8 @@ export class SearchComponent {
|
||||||
if (this.reloadSoftware
|
if (this.reloadSoftware
|
||||||
&& this.fetchSoftware.searchUtils.status != this.errorCodes.NONE/* &&
|
&& this.fetchSoftware.searchUtils.status != this.errorCodes.NONE/* &&
|
||||||
( this.fetchSoftware.searchUtils.status == this.errorCodes.LOADING ||
|
( this.fetchSoftware.searchUtils.status == this.errorCodes.LOADING ||
|
||||||
this.fetchSoftware.searchUtils.status == this.errorCodes.DONE )*/) {
|
this.fetchSoftware.searchUtils.status == this.errorCodes.DONE )*/
|
||||||
|
&& (this.keyword != null && this.keyword.length > 0)) {
|
||||||
this.reloadSoftware = false;
|
this.reloadSoftware = false;
|
||||||
this.fetchSoftware.getResultsByKeyword("software", this.keyword, 1, 10, this.properties, this.customFilter);
|
this.fetchSoftware.getResultsByKeyword("software", this.keyword, 1, 10, this.properties, this.customFilter);
|
||||||
this.linkToSearchSoftware = this.properties.searchLinkToSoftware;// + "?keyword=" + this.keyword;
|
this.linkToSearchSoftware = this.properties.searchLinkToSoftware;// + "?keyword=" + this.keyword;
|
||||||
|
@ -299,7 +302,8 @@ export class SearchComponent {
|
||||||
this.advancedSearchLink = this.properties.searchLinkToAdvancedOrps;//"/search/advanced/other";
|
this.advancedSearchLink = this.properties.searchLinkToAdvancedOrps;//"/search/advanced/other";
|
||||||
if (this.reloadOrps &&
|
if (this.reloadOrps &&
|
||||||
this.fetchOrps.searchUtils.status != this.errorCodes.NONE /*&&
|
this.fetchOrps.searchUtils.status != this.errorCodes.NONE /*&&
|
||||||
this.fetchOrps.searchUtils.status != this.errorCodes.ERROR*/) {
|
this.fetchOrps.searchUtils.status != this.errorCodes.ERROR*/
|
||||||
|
&& (this.keyword != null && this.keyword.length > 0)) {
|
||||||
this.reloadOrps = false;
|
this.reloadOrps = false;
|
||||||
this.fetchOrps.getResultsByKeyword("other", this.keyword, 1, 10, this.properties, this.customFilter);
|
this.fetchOrps.getResultsByKeyword("other", this.keyword, 1, 10, this.properties, this.customFilter);
|
||||||
this.linkToSearchOrps = this.properties.searchLinkToOrps;
|
this.linkToSearchOrps = this.properties.searchLinkToOrps;
|
||||||
|
@ -311,7 +315,8 @@ export class SearchComponent {
|
||||||
this.advancedSearchLink = this.properties.searchLinkToAdvancedProjects;//"/search/advanced/projects";
|
this.advancedSearchLink = this.properties.searchLinkToAdvancedProjects;//"/search/advanced/projects";
|
||||||
if (this.reloadProjects &&
|
if (this.reloadProjects &&
|
||||||
this.fetchProjects.searchUtils.status != this.errorCodes.NONE /*&&
|
this.fetchProjects.searchUtils.status != this.errorCodes.NONE /*&&
|
||||||
this.fetchProjects.searchUtils.status != this.errorCodes.ERROR*/) {
|
this.fetchProjects.searchUtils.status != this.errorCodes.ERROR*/
|
||||||
|
&& (this.keyword != null && this.keyword.length > 0)) {
|
||||||
this.reloadProjects = false;
|
this.reloadProjects = false;
|
||||||
this.fetchProjects.getResultsByKeyword(this.keyword, 1, 10, this.properties, this.customFilter);
|
this.fetchProjects.getResultsByKeyword(this.keyword, 1, 10, this.properties, this.customFilter);
|
||||||
this.linkToSearchProjects = this.properties.searchLinkToProjects;// + "?keyword=" + this.keyword;
|
this.linkToSearchProjects = this.properties.searchLinkToProjects;// + "?keyword=" + this.keyword;
|
||||||
|
@ -323,7 +328,8 @@ export class SearchComponent {
|
||||||
this.advancedSearchLink = this.properties.searchLinkToAdvancedDataProviders;//"/search/advanced/dataproviders";
|
this.advancedSearchLink = this.properties.searchLinkToAdvancedDataProviders;//"/search/advanced/dataproviders";
|
||||||
if (this.reloadDataproviders &&
|
if (this.reloadDataproviders &&
|
||||||
this.fetchDataproviders.searchUtils.status != this.errorCodes.NONE /*&&
|
this.fetchDataproviders.searchUtils.status != this.errorCodes.NONE /*&&
|
||||||
this.fetchDataproviders.searchUtils.status != this.errorCodes.ERROR*/) {
|
this.fetchDataproviders.searchUtils.status != this.errorCodes.ERROR*/
|
||||||
|
&& (this.keyword != null && this.keyword.length > 0)) {
|
||||||
this.reloadDataproviders = false;
|
this.reloadDataproviders = false;
|
||||||
this.fetchDataproviders.getResultsByKeyword(this.keyword, 1, 10, this.properties, this.customFilter);
|
this.fetchDataproviders.getResultsByKeyword(this.keyword, 1, 10, this.properties, this.customFilter);
|
||||||
this.linkToSearchDataproviders = this.properties.searchLinkToDataProviders;// + "?keyword=" + this.keyword;
|
this.linkToSearchDataproviders = this.properties.searchLinkToDataProviders;// + "?keyword=" + this.keyword;
|
||||||
|
@ -335,7 +341,8 @@ export class SearchComponent {
|
||||||
this.advancedSearchLink = this.properties.searchLinkToAdvancedOrganizations;//"/search/advanced/organizations";
|
this.advancedSearchLink = this.properties.searchLinkToAdvancedOrganizations;//"/search/advanced/organizations";
|
||||||
if (this.reloadOrganizations &&
|
if (this.reloadOrganizations &&
|
||||||
this.fetchOrganizations.searchUtils.status != this.errorCodes.NONE /*&&
|
this.fetchOrganizations.searchUtils.status != this.errorCodes.NONE /*&&
|
||||||
this.fetchOrganizations.searchUtils.status != this.errorCodes.ERROR*/) {
|
this.fetchOrganizations.searchUtils.status != this.errorCodes.ERROR*/
|
||||||
|
&& (this.keyword != null && this.keyword.length > 0)) {
|
||||||
this.reloadOrganizations = false;
|
this.reloadOrganizations = false;
|
||||||
this.fetchOrganizations.getResultsByKeyword(this.keyword, 1, 10, this.properties, this.customFilter);
|
this.fetchOrganizations.getResultsByKeyword(this.keyword, 1, 10, this.properties, this.customFilter);
|
||||||
this.linkToSearchOrganizations = this.properties.searchLinkToOrganizations;// + "?keyword=" + this.keyword;
|
this.linkToSearchOrganizations = this.properties.searchLinkToOrganizations;// + "?keyword=" + this.keyword;
|
||||||
|
|
Loading…
Reference in New Issue