diff --git a/src/app/portal/components/results/publications2/publications2.component.html b/src/app/portal/components/results/publications2/publications2.component.html
index 4eeab11ed..cac517d43 100644
--- a/src/app/portal/components/results/publications2/publications2.component.html
+++ b/src/app/portal/components/results/publications2/publications2.component.html
@@ -541,29 +541,9 @@
Hakuohje
-
-
-
diff --git a/src/app/portal/components/results/publications2/publications2.component.ts b/src/app/portal/components/results/publications2/publications2.component.ts
index 69d842b9a..8128f936f 100644
--- a/src/app/portal/components/results/publications2/publications2.component.ts
+++ b/src/app/portal/components/results/publications2/publications2.component.ts
@@ -661,6 +661,10 @@ export class Publications2Component implements OnDestroy {
clamp(value: number, min: number, max: number) {
return Math.min(Math.max(value, min), max);
}
+
+ clearKeywordField() {
+ this.keywords = "";
+ }
}
export class PublicationDataSource extends DataSource
{
diff --git a/src/app/portal/search-bar2/search-bar2.component.html b/src/app/portal/search-bar2/search-bar2.component.html
index fbfc672b0..97175af2a 100644
--- a/src/app/portal/search-bar2/search-bar2.component.html
+++ b/src/app/portal/search-bar2/search-bar2.component.html
@@ -11,9 +11,8 @@
[ngModel]='value'
(ngModelChange)='valueChange.emit($event)'
(keyup.enter)='search.emit(keywords)'
- class='search-input'
- style='margin-right: 8px'
type='search'
+ class='search-input'
i18n-title='@@searchTooltip'
title='Voit hakea julkaisuja, tutkijoita, rahoituspäätöksiä, aineistoja, rahoitushakuja, infrastruktuureja ja organisaatioita kuvailevaa tietoa.'
i18n-placeholder='@@searchPlaceholder'
@@ -22,6 +21,10 @@
tabindex='0'
/>
+
+
+
+
diff --git a/src/app/portal/search-bar2/search-bar2.component.scss b/src/app/portal/search-bar2/search-bar2.component.scss
index 8d0a524de..57f3f8b40 100644
--- a/src/app/portal/search-bar2/search-bar2.component.scss
+++ b/src/app/portal/search-bar2/search-bar2.component.scss
@@ -2,8 +2,9 @@
width: 510px;
height: 55px;
- border-top-right-radius: 4px;
- border-bottom-right-radius: 4px;
+ border-top-left-radius: 4px;
+ border-bottom-left-radius: 4px;
+
border-width: 0;
font-size: 25px;
@@ -96,7 +97,7 @@ app-search-bar .search-input input {
white-space: nowrap;
overflow: hidden;
border: none;
- padding-right: 2.75rem;
+ // padding-right: 2.75rem;
}
app-search-bar input {
diff --git a/src/app/portal/search-bar2/search-bar2.component.ts b/src/app/portal/search-bar2/search-bar2.component.ts
index 10fe119c5..f77ec89aa 100644
--- a/src/app/portal/search-bar2/search-bar2.component.ts
+++ b/src/app/portal/search-bar2/search-bar2.component.ts
@@ -25,5 +25,8 @@ export class SearchBar2Component {
// instruction button is pressed output
@Output() instructions = new EventEmitter();
+ // clear event output
+ @Output() clear = new EventEmitter();
+
public keywords = this.route.snapshot.queryParams.q ?? "";
}
diff --git a/src/app/portal/services/publication2.service.ts b/src/app/portal/services/publication2.service.ts
index 92769e79b..964d35d03 100644
--- a/src/app/portal/services/publication2.service.ts
+++ b/src/app/portal/services/publication2.service.ts
@@ -1075,11 +1075,16 @@ function sortingTerms(searchParams: SearchParams) {
if (textFields.includes(sortedField)) {
sortedField += ".keyword";
}
+
+ return [
+ { [sortedField]: { "order": direction } },
+ "_score"
+ ];
}
return [
+ "_score",
{ [sortedField]: { "order": direction } },
- "_score"
];
}