Merge branch 'Aufinal/hashtag_42' into 'master'
On supporte à nouveau les caractères d'urls dans les trigrammes See merge request klub-dev-ens/gestioCOF!407
This commit is contained in:
commit
79ad1346d3
3 changed files with 5 additions and 3 deletions
|
@ -11,6 +11,8 @@ Liste des changements notables dans GestioCOF depuis la version 0.1 (septembre
|
||||||
|
|
||||||
## Upcoming
|
## Upcoming
|
||||||
|
|
||||||
|
- Corrige un bug sur K-Psul lorsqu'un trigramme contient des caractères réservés aux urls (\#, /...)
|
||||||
|
|
||||||
## Version 0.4 - 15/01/2020
|
## Version 0.4 - 15/01/2020
|
||||||
|
|
||||||
- Corrige un bug d'affichage d'images sur l'interface des petits cours
|
- Corrige un bug d'affichage d'images sur l'interface des petits cours
|
||||||
|
|
|
@ -14,7 +14,7 @@ var Account = Backbone.Model.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
url: function () {
|
url: function () {
|
||||||
return django_urls["kfet.account.read.json"](this.get("trigramme"))
|
return django_urls["kfet.account.read.json"](encodeURIComponent(this.get("trigramme")))
|
||||||
},
|
},
|
||||||
|
|
||||||
reset: function () {
|
reset: function () {
|
||||||
|
@ -81,7 +81,7 @@ var AccountView = Backbone.View.extend({
|
||||||
get_buttons: function () {
|
get_buttons: function () {
|
||||||
var buttons = '';
|
var buttons = '';
|
||||||
if (this.model.id != 0) {
|
if (this.model.id != 0) {
|
||||||
var url = django_urls["kfet.account.read"](this.model.get("trigramme"))
|
var url = django_urls["kfet.account.read"](encodeURIComponent(this.model.get("trigramme")))
|
||||||
buttons += `<a href="${url}" class="btn btn-primary" target="_blank" title="Modifier"><span class="glyphicon glyphicon-cog"></span></a>`;
|
buttons += `<a href="${url}" class="btn btn-primary" target="_blank" title="Modifier"><span class="glyphicon glyphicon-cog"></span></a>`;
|
||||||
} else {
|
} else {
|
||||||
var trigramme = this.$(this.input).val().toUpperCase();
|
var trigramme = this.$(this.input).val().toUpperCase();
|
||||||
|
|
|
@ -56,7 +56,7 @@ $(document).ready(function () {
|
||||||
function getAccountData(trigramme, callback = function() {}) {
|
function getAccountData(trigramme, callback = function() {}) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
url : django_urls["kfet.account.read.json"]({trigramme: trigramme}),
|
url : django_urls["kfet.account.read.json"]({trigramme: encodeURIComponent(trigramme)}),
|
||||||
method : "GET",
|
method : "GET",
|
||||||
success : callback,
|
success : callback,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue