[Library|Trunk]
Search: createKeywordQuery() add properly the operator when it is needed. LAnding result: set properly the type when the route changes and it is result. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59042 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
34fbdcf44b
commit
eb1f91160a
|
@ -159,7 +159,8 @@ export class ResultLandingComponent {
|
||||||
this.linkToSearchPage = this.properties.searchLinkToOrps;
|
this.linkToSearchPage = this.properties.searchLinkToOrps;
|
||||||
this.id = data['orpId'];
|
this.id = data['orpId'];
|
||||||
this.title = "Other Research Product";
|
this.title = "Other Research Product";
|
||||||
} else if (data["id"]) {
|
} else if (data["id"]){
|
||||||
|
this.type = "result";
|
||||||
this.id = data["id"];
|
this.id = data["id"];
|
||||||
this.updateTitle("Research Result");
|
this.updateTitle("Research Result");
|
||||||
this.linkToLandingPage = this.properties.searchLinkToOrp;
|
this.linkToLandingPage = this.properties.searchLinkToOrp;
|
||||||
|
|
|
@ -701,7 +701,7 @@ export class NewSearchPageComponent {
|
||||||
} else {
|
} else {
|
||||||
params += this.createQuotedKeywordQuery(this.selectedFields[i].value, this.selectedFields[i].id, this.selectedFields[i].operatorId,countParams,true);
|
params += this.createQuotedKeywordQuery(this.selectedFields[i].value, this.selectedFields[i].id, this.selectedFields[i].operatorId,countParams,true);
|
||||||
}*/
|
}*/
|
||||||
params +=(countParams == 0 ? "" : " " + this.selectedFields[i].operatorId + " ") + NewSearchPageComponent.createKeywordQuery(this.entityType,this.selectedFields[i].value, this.selectedFields[i].id, this.selectedFields[i].operatorId, countParams);
|
params += NewSearchPageComponent.createKeywordQuery(this.entityType,this.selectedFields[i].value, this.selectedFields[i].id, this.selectedFields[i].operatorId, countParams);
|
||||||
//TODO deposit case
|
//TODO deposit case
|
||||||
// console.log(this.usedBy)
|
// console.log(this.usedBy)
|
||||||
// console.log(this.keywordFields)
|
// console.log(this.keywordFields)
|
||||||
|
@ -774,10 +774,9 @@ export class NewSearchPageComponent {
|
||||||
let countDoubleQuote = (fieldValue.match(/"/g) || []).length;
|
let countDoubleQuote = (fieldValue.match(/"/g) || []).length;
|
||||||
let quotedParts = [];
|
let quotedParts = [];
|
||||||
if(countQuote % 2 == 0 && countDoubleQuote % 2 ==0){
|
if(countQuote % 2 == 0 && countDoubleQuote % 2 ==0){
|
||||||
console.log("Allow quoting");
|
|
||||||
quotedParts = (fieldValue)?fieldValue.match(/(["'])(.*?)*?\1/g):[];
|
quotedParts = (fieldValue)?fieldValue.match(/(["'])(.*?)*?\1/g):[];
|
||||||
}
|
}
|
||||||
// params+= (countParams == 0 ? "" : fieldOperator) +
|
params+= (countParams == 0 ? "" : fieldOperator);
|
||||||
params+= " (";
|
params+= " (";
|
||||||
if(forceQuotted){
|
if(forceQuotted){
|
||||||
return this.getQuotedQueryPart(fieldId, '"'+ fieldValue+'"',isSearchAll);
|
return this.getQuotedQueryPart(fieldId, '"'+ fieldValue+'"',isSearchAll);
|
||||||
|
|
Loading…
Reference in New Issue