forked from DGNum/gestioCOF
Clean GET params in ajax calls
- Use `data` arg of `$.getJSON` for `format` param - Delete `dictToArray` call on data returned by `SingleResumeStat` class view since this view now returns stats manifest as an array
This commit is contained in:
parent
1ee993e1e1
commit
df7e935390
1 changed files with 3 additions and 4 deletions
|
@ -42,8 +42,7 @@
|
|||
$(this).addClass("focus");
|
||||
|
||||
// loads data and shows it
|
||||
$.getJSON(this.stats_target_url + "?format=json",
|
||||
displayStats);
|
||||
$.getJSON(this.stats_target_url, {format: 'json'}, displayStats);
|
||||
}
|
||||
|
||||
function displayStats (data) {
|
||||
|
@ -158,7 +157,7 @@
|
|||
"aria-label": "select-period"});
|
||||
|
||||
var to_click;
|
||||
var context = dictToArray(data.stats);
|
||||
var context = data.stats;
|
||||
|
||||
for (var i = 0; i < context.length; i++) {
|
||||
// creates the button
|
||||
|
@ -191,7 +190,7 @@
|
|||
|
||||
// constructor
|
||||
(function () {
|
||||
$.getJSON(url + "?format=json", initialize);
|
||||
$.getJSON(url, {format: 'json'}, initialize);
|
||||
})();
|
||||
};
|
||||
})(jQuery);
|
||||
|
|
Loading…
Reference in a new issue