Revision 58606
Added by Argiro Kokogiannaki almost 4 years ago
searchBar.component.ts | ||
---|---|---|
41 | 41 |
this.entityType = "all"; |
42 | 42 |
this.route.queryParams.subscribe(params => { |
43 | 43 |
this.parameters = Object.assign({}, params); |
44 |
if(params["fv0"] && params["f0"] && params["f0"] == "q"){ |
|
45 |
this.keyword =params["fv0"]; |
|
46 |
} |
|
44 | 47 |
if(this.onlyresults) { |
45 | 48 |
if (params["type"] && params["type"].length > 0) { |
46 | 49 |
let types = params["type"].split(","); |
... | ... | |
69 | 72 |
this.entityType = "dataprovider"; |
70 | 73 |
}else if(currentRoute== this.properties.searchLinkToOrganizations){ |
71 | 74 |
this.entityType = "organization"; |
72 |
}else{ |
|
75 |
}else if(currentRoute== this.properties.searchLinkToResults){
|
|
73 | 76 |
this.entityType = "result"; |
77 |
}else { |
|
78 |
// not one of the search bar search pages |
|
79 |
this.entityType = "result"; |
|
80 |
this.keyword = ""; |
|
74 | 81 |
} |
75 | 82 |
} |
76 | 83 |
if(this.getCurrentRoute() == this.properties.searchLinkToAdvancedResults){ |
... | ... | |
102 | 109 |
return this.router.url.split('?')[0]; |
103 | 110 |
} |
104 | 111 |
entityChanged($event){ |
112 |
|
|
105 | 113 |
this.entityType = $event.entity; |
106 | 114 |
this.searchRoute = $event.simpleUrl; |
107 | 115 |
if(!this.onlyresults && this.entityType == "result") { |
... | ... | |
110 | 118 |
this.showAdvancedLink(); |
111 | 119 |
} |
112 | 120 |
keywordChanged(){ |
113 |
if(!this.onlyresults) {
|
|
121 |
if(this.getCurrentRoute()!=this.searchRoute) {
|
|
114 | 122 |
this.parameters = {}; |
115 | 123 |
} |
116 | 124 |
if ( this.keyword.length > 0) { |
Also available in: Unified diff
[Library|Trunk]
Linking:
rename entity type to Result type
Deposit:
First page:
remove border
remove small text in first section paragraphs
remove padding from search form
Search:
go to first page when keyword changes
keep filters when keyword changes
Impact Factors:
update text (Exceptional,Substantial,Average)
Search bar:
pass parameters for advanced search
init keyword from params
if page not among search pages ignore keyword
when change to other entity clear parameters