Skip to content
Snippets Groups Projects
Commit ba158059 authored by Florent Poittevin's avatar Florent Poittevin
Browse files

fix: display placeholder and cursor pointer to open multi searchable select

parent b22a0e1e
No related branches found
No related tags found
1 merge request!71Fpo/717 - 718 create single and multi searchable select component
......@@ -143,7 +143,8 @@
[valueKey]="'resId'"
[extraInfoLabelKey]="'orcid'"
[extraInfoImage]="'orcid.png'"
[placeholder]="'deposit.authors' | translate"
[title]="'deposit.authors.title' | translate"
[placeholder]="'deposit.authors.placeholder' | translate"
>
</dlcm-shared-searchable-multi-select>
......
<mat-form-field>
<mat-form-field [class.with-values]="selectedItems.length > 0">
<mat-label>{{title}}</mat-label>
<mat-chip-list #chipList
[disabled]="formControl.disabled"
>
......@@ -21,13 +22,13 @@
icon="times-circle"
></fa-icon>
</mat-chip>
<input matInput
(focus)="openOverlay()"
[required]="required"
[placeholder]="placeholder"
[disabled]="formControl.disabled"
[matChipInputFor]="chipList"
>
</mat-chip-list>
<input matInput
(focus)="openOverlay()"
[required]="required"
[placeholder]="placeholder"
[disabled]="formControl.disabled"
[matChipInputFor]="chipList"
>
<mat-error>{{formValidationHelper.getFormError(formControl)}}</mat-error>
</mat-form-field>
@import "../sass/abstracts/variables";
@import "../sass/abstracts/mixins";
.mat-form-field {
width: 100%;
}
:host {
.mat-form-field {
width: 100%;
.clear {
color: rgba(0, 0, 0, 0.54) !important;
}
.clear {
color: rgba(0, 0, 0, 0.54) !important;
}
.remove-chip {
font-size: 17px;
padding: 5px;
margin: -5px;
}
.remove-chip {
font-size: 17px;
padding: 5px;
margin: -5px;
}
.label {
max-width: 150px;
padding-right: 5px;
@include truncate-with-ellipsis;
}
input {
cursor: pointer;
}
::ng-deep .mat-form-field-flex {
cursor: pointer;
}
&.with-values {
::ng-deep .mat-form-field-flex {
cursor: initial;
}
.label {
max-width: 150px;
@include truncate-with-ellipsis;
input {
padding: 10px 0;
margin-bottom: 0;
width: 100%;
}
}
}
}
......@@ -64,6 +64,9 @@ import {
export class SharedSearchableMultiSelectPresentational extends SharedAbstractPresentational implements ControlValueAccessor, OnInit, AfterViewInit {
formDefinition: FormComponentFormDefinition = new FormComponentFormDefinition();
@Input()
title: string;
@Input()
placeholder: string;
......
@import "../sass/abstracts/variables";
@import "../sass/abstracts/mixins";
.mat-form-field {
width: 100%;
:host {
.mat-form-field {
width: 100%;
input {
@include truncate-with-ellipsis;
::ng-deep .mat-form-field-flex {
cursor: pointer;
}
input {
cursor: pointer;
@include truncate-with-ellipsis;
}
}
}
.clear {
color: rgba(0, 0, 0, 0.54) !important;
.clear {
color: rgba(0, 0, 0, 0.54) !important;
}
}
......@@ -546,7 +546,7 @@
"funding-agencies": {
"create": "Create",
"detail": "Detail",
"edit": "breadcrumb.admin.funding-agencies.edit",
"edit": "Edit",
"root": "Funding agency"
},
"institution": {
......@@ -626,7 +626,10 @@
"error": "Can not retrieve the added person"
}
},
"authors": "Authors",
"authors": {
"placeholder": "Click here to add authors",
"title": "Authors"
},
"collectionBegin": "Data Collection Start Date",
"collectionEnd": "Data Collection End Date",
"delete": "Delete",
......@@ -777,7 +780,7 @@
"title": "Title",
"tooltips": {
"accessLevel": "Sets the archive's access level: \n\n1) Public (open access) \n2) Restricted (Access limited to members of the organizational unit) \n3) Closed (Customized access)",
"addMissingPerson": "Add existing person",
"addMissingPerson": "Create new person",
"authors": "Follows recommendations on authorship for scientific publications",
"collectionBegin": "The date at which data collection began",
"collectionEnd": "The date at which data collection ended",
......@@ -832,19 +835,19 @@
"acceptedDate": "Accepted date",
"accessLevel": "Access level",
"authors": "Authors",
"datacite": "Datacite metadata",
"description": "Description",
"dlcm": "Dlcm metadata",
"download": "Download",
"embargoAccessLevel": "Embargo access level",
"embargoEndDate": "Embargo end date",
"hide": "hide",
"licenses": "Licenses",
"orgUnit": "Organizational unit",
"publicationYear": "Publication year",
"submittedDate": "Submitted date",
"title": "Title",
"datacite": "Datacite metadata",
"dlcm": "Dlcm metadata",
"show": "show",
"hide": "hide"
"submittedDate": "Submitted date",
"title": "Title"
}
},
"browsing": {
......@@ -1011,4 +1014,4 @@
}
}
}
}
\ No newline at end of file
}
......@@ -626,7 +626,10 @@
"error": "Can not retrieve the added person"
}
},
"authors": "Authors",
"authors": {
"placeholder": "Click here to add authors",
"title": "Authors"
},
"collectionBegin": "Data Collection Start Date",
"collectionEnd": "Data Collection End Date",
"delete": "Delete",
......@@ -777,7 +780,7 @@
"title": "Title",
"tooltips": {
"accessLevel": "Sets the archive's access level: \n\n1) Public (open access) \n2) Restricted (Access limited to members of the organizational unit) \n3) Closed (Customized access)",
"addMissingPerson": "Add existing person",
"addMissingPerson": "Create new person",
"authors": "Follows recommendations on authorship for scientific publications",
"collectionBegin": "The date at which data collection began",
"collectionEnd": "The date at which data collection ended",
......@@ -832,19 +835,19 @@
"acceptedDate": "Accepted date",
"accessLevel": "Access level",
"authors": "Authors",
"datacite": "Datacite metadata",
"description": "Description",
"dlcm": "Dlcm metadata",
"download": "Download",
"embargoAccessLevel": "Embargo access level",
"embargoEndDate": "Embargo end date",
"hide": "hide",
"licenses": "Licenses",
"orgUnit": "Organizational unit",
"publicationYear": "Publication year",
"submittedDate": "Submitted date",
"title": "Title",
"datacite": "Datacite metadata",
"dlcm": "Dlcm metadata",
"show": "show",
"hide": "hide"
"submittedDate": "Submitted date",
"title": "Title"
}
},
"browsing": {
......
......@@ -626,7 +626,10 @@
"error": "Impossible de récupérer la personne ajoutée"
}
},
"authors": "Auteurs",
"authors": {
"placeholder": "Cliquer ici pour ajouter des auteurs",
"title": "Auteurs"
},
"collectionBegin": "Début de la collecte des données",
"collectionEnd": "Fin de la collecte des données",
"delete": "Supprimer",
......@@ -777,7 +780,7 @@
"title": "Titre",
"tooltips": {
"accessLevel": "Niveau d'accès de l'archive: \n\n1) Public (open access)\n2) Accès restreint (accès limité aux membres de l'unité organisationnelle)\n3) Fermé (accès personnalisé)",
"addMissingPerson": "Ajouter une personne existante",
"addMissingPerson": "Créer une nouvelle personne",
"authors": "Suivre les recommandations sur la paternité d'une publication scientifique",
"collectionBegin": "Début de la période de collecte des données",
"collectionEnd": "Fin de la période de collecte des données",
......@@ -832,19 +835,19 @@
"acceptedDate": "Date d'acceptation",
"accessLevel": "Niveau d'accès",
"authors": "Auteurs",
"datacite": "Datacite métadonnées",
"description": "Description",
"dlcm": "Dlcm métadonnées",
"download": "Télécharger",
"embargoAccessLevel": "Niveau d'accès de l'embargo",
"embargoEndDate": "Date de fin de l'embargo",
"hide": "cacher",
"licenses": "Licence",
"orgUnit": "Unité organisationnelle",
"publicationYear": "Année de publication",
"submittedDate": "Date de soumission",
"title": "Titre",
"datacite": "Datacite métadonnées",
"dlcm": "Dlcm métadonnées",
"show": "montrer",
"hide": "cacher"
"submittedDate": "Date de soumission",
"title": "Titre"
}
},
"browsing": {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment