Revision 51872
Added by Argiro Kokogiannaki about 6 years ago
searchPublications.component.ts | ||
---|---|---|
21 | 21 |
connectCommunityId:string; |
22 | 22 |
piwikSiteId = null; |
23 | 23 |
constructor ( private route: ActivatedRoute) { |
24 |
} |
|
25 |
ngOnInit() { |
|
24 | 26 |
var communityId = ConnectHelper.getCommunityFromDomain(document.location.hostname); |
25 | 27 |
this.piwikSiteId = PiwikHelper.siteIDs[communityId]; |
26 |
} |
|
27 |
ngOnInit() { |
|
28 |
this.route.queryParams.subscribe(data => { |
|
28 |
if(communityId){ |
|
29 |
this.advancedSearchParameters = {community:communityId, co: "and"}; |
|
30 |
this.connectCommunityId = communityId |
|
31 |
}else{ |
|
32 |
this.route.queryParams.subscribe(data => { |
|
29 | 33 |
|
30 |
if(data['community'] && data['community']!=""){
|
|
31 |
this.advancedSearchParameters = {community: data['community'], co: "and"}; |
|
32 |
var id= decodeURIComponent(data['community']);
|
|
33 |
this.connectCommunityId = id.slice(1,id.length - 1);
|
|
34 |
} |
|
35 |
});
|
|
34 |
if(data['communityId'] && data['communityId']!=""){
|
|
35 |
this.advancedSearchParameters = {community: data['community'], co: "and"};
|
|
36 |
this.connectCommunityId = data['communityId'];
|
|
37 |
}
|
|
38 |
});
|
|
39 |
} |
|
36 | 40 |
} |
37 | 41 |
} |
Also available in: Unified diff
change the query for community in search pages of pub/data/soft and the parameters in the url