In searchpage change the url encoding to work for IE

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@51967 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2018-05-08 10:36:42 +00:00
parent 9277043cda
commit 780bd5fa07
1 changed files with 11 additions and 11 deletions

View File

@ -147,16 +147,16 @@ export class SearchPageComponent {
countvalues++;
var paramId = this.fieldIdsMap[filterId].param;
// parameters+='&' + paramId+ '='+ value;//+"&" + this.fieldIdsMap[paramId].operator + "="+((countvalues == 1)?"and":"or");
fq+=(fq.length > 0 ? " " + "or" + " ":"" ) + filterId +" exact " +StringUtils.URIEncode(value);
fq+=(fq.length > 0 ? " " + "or" + " ":"" ) + filterId +" exact " +(value);
}
if(countvalues > 0){
fq="&fq="+fq;
fq="&fq="+StringUtils.URIEncode(fq);
}
allFqs += fq;
}
}
if(this.connectCommunityId ){
allFqs+= "&fq=communityId exact " + StringUtils.quote(StringUtils.URIEncode(this.connectCommunityId ));
allFqs+= "&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote((this.connectCommunityId )));
}
var keyword = params['keyword'];
@ -200,14 +200,14 @@ export class SearchPageComponent {
}
// parameters+= " ) ";
if(countvalues > 0){
fq="&fq="+fq;
fq="&fq="+StringUtils.URIEncode(fq);
}
allFqs += fq;
}
}
if(this.connectCommunityId ){
allFqs+= "&fq=communityId exact " + StringUtils.quote(StringUtils.URIEncode(this.connectCommunityId ));
allFqs+= "&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote(this.connectCommunityId ));
}
var keyword = params['keyword'];
var doiQuery = "";
@ -332,7 +332,7 @@ export class SearchPageComponent {
if(filter.countSelectedValues > 0 ){//|| (this.connectCommunityId && filter.filterId.indexOf("community")!=-1)){
for (let value of filter.values){
if(value.selected == true){
filterLimits+=((filterLimits.length == 0)?'':',') +'"'+ StringUtils.URIEncode(value.id)+'"';
filterLimits+=((filterLimits.length == 0)?'':',') +'"'+ (value.id)+'"';
}
}
// if(this.connectCommunityId && filter.filterId.indexOf("community")!=-1 ){
@ -369,19 +369,19 @@ export class SearchPageComponent {
for (let value of filter.values){
if(value.selected == true){
count_selected++;
fq+=(fq.length > 0 ? " " + filter.filterOperator + " ":"" ) + filter.filterId + " exact " + StringUtils.quote(StringUtils.URIEncode(value.id));
fq+=(fq.length > 0 ? " " + filter.filterOperator + " ":"" ) + filter.filterId + " exact " + StringUtils.quote((value.id));
}
}
// if(this.connectCommunityId && filter.filterId.indexOf("community")!=-1){
// count_selected++;
// fq+=(fq.length > 0 ? " " + filter.filterOperator + " ":"" ) + filter.filterId + " exact " + StringUtils.quote(StringUtils.URIEncode(this.connectCommunityId));
// }
fq="&fq="+fq;
fq="&fq="+StringUtils.URIEncode(fq);
allFqs += fq;
}
}
if(this.connectCommunityId ){
allFqs+= "&fq=communityId exact " + StringUtils.quote(StringUtils.URIEncode(this.connectCommunityId ));
allFqs+= "&fq="+StringUtils.URIEncode("communityId exact " + StringUtils.quote(this.connectCommunityId ));
}
//TODO --
var doiQuery = "";
@ -415,11 +415,11 @@ export class SearchPageComponent {
for (let value of filter.values){
if(value.selected == true){
count_selected++;
fq+=(fq.length > 0 ? " " + filter.filterOperator + " ":"" ) + filter.filterId + " exact " + StringUtils.quote(StringUtils.URIEncode(value.id));
fq+=(fq.length > 0 ? " " + filter.filterOperator + " ":"" ) + filter.filterId + " exact " + (StringUtils.URIEncode(value.id));
}
}
if(count_selected > 0){
fq="&fq="+fq;
fq="&fq="+StringUtils.URIEncode(fq);
allFqs += fq;
}
}