search results css
This commit is contained in:
parent
e7956f3b62
commit
016989c4de
3 changed files with 25 additions and 4 deletions
|
@ -83,3 +83,24 @@
|
|||
padding-right: 50px;
|
||||
padding-left: 50px;
|
||||
}
|
||||
|
||||
/* Account autocomplete window */
|
||||
|
||||
#account_results ul {
|
||||
list-style-type:none;
|
||||
background:rgba(255,255,255,0.9);
|
||||
padding:0;
|
||||
}
|
||||
|
||||
#account_results li {
|
||||
display:block;
|
||||
padding:5px 20px;
|
||||
height:100%;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
#account_results .hilight {
|
||||
background:rgba(200,16,46,0.9);
|
||||
color:#fff;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<ul>
|
||||
{% if accounts %}
|
||||
{% for trigramme, user in accounts %}
|
||||
<li><span class="choice">{{ user|highlight_text:q }} (<span class="trigramme">{{ trigramme }}</span>)</li>
|
||||
<li class='choice'>{{ user|highlight_text:q }} (<span class="trigramme">{{ trigramme }}</span>)</li>
|
||||
{% endfor %}
|
||||
{% elif not q %}
|
||||
<li class="user_category"><span class="text">Pas de recherche, pas de résultats !</span></li>
|
||||
|
|
|
@ -265,7 +265,7 @@ $(document).ready(function() {
|
|||
|
||||
// Search for an account
|
||||
function searchAccount() {
|
||||
var content = '<input type="text" name="q" id="search_autocomplete" spellcheck="false" autofocus><div class="yourlabs-autocomplete"></div>' ;
|
||||
var content = '<input type="text" name="q" id="search_autocomplete" spellcheck="false" autofocus><div id="account_results"></div>' ;
|
||||
$.dialog({
|
||||
title: 'Recherche de compte',
|
||||
content: content,
|
||||
|
@ -276,12 +276,12 @@ $(document).ready(function() {
|
|||
onOpen: function() {
|
||||
var that=this ;
|
||||
$('input#search_autocomplete').yourlabsAutocomplete({
|
||||
url: '{% url 'kfet.account.search.autocomplete' %}',
|
||||
url: '{% url "kfet.account.search.autocomplete" %}',
|
||||
minimumCharacters: 2,
|
||||
id: 'search_autocomplete',
|
||||
choiceSelector: '.choice',
|
||||
placeholder: "Chercher un utilisateur K-Fêt",
|
||||
box: $(".yourlabs-autocomplete"),
|
||||
box: $("#account_results"),
|
||||
});
|
||||
$('input#search_autocomplete').bind(
|
||||
'selectChoice',
|
||||
|
|
Loading…
Reference in a new issue