Skip to content

Commit cf5c44d

Browse files
committed
reprise de #406
1 parent 36991c9 commit cf5c44d

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

atlas/static/css/atlas.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,13 @@ a {
170170
padding-right: 20px;
171171
}
172172

173+
#searchTaxons,
174+
#searchCommunes {
175+
min-width: 175px;
176+
width: 20vw;
177+
max-width: 400px;
178+
}
179+
173180
@media (max-width: 760px) {
174181
.navbar-collapse {
175182
background-color: #333;

atlas/static/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ autocompleteSearch = function(inputID, urlDestination, nbProposal) {
6262
var url = ui.item.value;
6363
if (urlDestination == "espece") {
6464
location.href = configuration.URL_APPLICATION + language + "/espece/" + url;
65+
let splited_label = ui.item.label.split(' = ');
66+
let label_for_input = splited_label[0] != '' ? splited_label[0] : splited_label[1];
67+
$(inputID).val(label_for_input.replace(/<[^>]*>?/gm, ''));
6568
} else if (urlDestination == "commune") {
6669
location.href = configuration.URL_APPLICATION + language + "/commune/" + url;
6770
} else {

0 commit comments

Comments
 (0)