WIP: Aureplop/kpsul js refactor #501

Draft
delobell wants to merge 215 commits from aureplop/kpsul_js_refactor into master
Showing only changes of commit abce961d91 - Show all commits

View file

@ -50,7 +50,7 @@ class AccountManager {
if (this.is_empty()) {
var trigramme = this.selection.get();
if (trigramme.isValidTri()) {
var url_base = "{% url 'kfet.account.create' %}";
var url_base = Urls['kfet.account.create']();
var url = url_base + '?trigramme=' + encodeURIComponent(trigramme);
buttons += '<a href="'+url+'" class="btn btn-primary" target="_blank" title="Créer ce compte"><span class="glyphicon glyphicon-plus"></span></a>';
} else { /* trigramme input is empty or invalid */
@ -187,7 +187,7 @@ class AccountSearch {
var that = this;
this._$input.yourlabsAutocomplete({
url: '{% url "kfet.account.search.autocomplete" %}',
url: Urls['kfet.account.search.autocomplete'],
minimumCharacters: 2,
id: 'search_autocomplete',
choiceSelector: '.choice',