Skip to content

Commit

Permalink
Répare l'autocomplétion des membres (fix #2320)
Browse files Browse the repository at this point in the history
  • Loading branch information
Situphen committed Feb 22, 2015
1 parent 95a9367 commit 80db2b9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
5 changes: 0 additions & 5 deletions assets/js/autocompletion.js
Expand Up @@ -12,11 +12,6 @@
this.$input = this.$wrapper.find(".autocomplete-input");
this.$dropdown = this.$wrapper.find(".autocomplete-dropdown");

this.$dropdown.css({
"marginTop": "-" + this.$input.css("margin-bottom"),
"left": this.$input.css("margin-left")
});


this.$input.on("keyup", this.handleInput.bind(this));
this.$input.on("keydown", this.handleKeydown.bind(this));
Expand Down
5 changes: 5 additions & 0 deletions assets/scss/components/_autocomplete.scss
Expand Up @@ -27,4 +27,9 @@
}
}
}
}

.modal .autocomplete-dropdown {
margin-top: -10px;
margin-left: 15px;
}
6 changes: 5 additions & 1 deletion templates/mp/topic/index.html
Expand Up @@ -104,7 +104,11 @@ <h3>{% trans "Actions" %}</h3>
{% trans "Vous allez rajouter un nouveau membre dans la conversation privée" %}.
</p>
<input type="hidden" name="topic_pk" value="{{ topic.pk }}">
<input type="text" class="input" name="user_pk" placeholder="Pseudo du membre" autocomplete="{'type':'single'}">
<input
type="text" class="input" name="user_pk"
placeholder="Pseudo du membre"
data-autocomplete="{'type':'single'}"
>

{% csrf_token %}
<button type="submit">{% trans "Ajouter" %}</button>
Expand Down

0 comments on commit 80db2b9

Please sign in to comment.