Merge branch 'Aufinal/search_icon' into k-fet

- Ajoute une icône de recherche dans K-Psul pour accéder à la liste des comptes
This commit is contained in:
Aurélien Delobelle 2017-01-07 01:12:13 +01:00
commit 86286b662a

View file

@ -250,10 +250,13 @@ $(document).ready(function() {
}
if (account_data['id'] == 0) {
var trigramme = triInput.val().toUpperCase();
var url_base = '{% url 'kfet.account.create' %}'
if (isValidTrigramme(trigramme)) {
var url_base = '{% url 'kfet.account.create' %}'
trigramme = encodeURIComponent(trigramme);
buttons += '<a href="'+url_base+'?trigramme='+trigramme+'" class="btn btn-primary" target="_blank" title="Créer"><span class="glyphicon glyphicon-plus"></span></a>';
} else {
var url_base = '{% url 'kfet.account' %}'
buttons += '<a href="'+url_base+'" class="btn btn-primary" target="_blank" title="Rechercher"><span class="glyphicon glyphicon-search"></span></a>';
}
}
account_container.find('.buttons').html(buttons);