Permalink
Browse files

switch to new PydioApi.getClient().loadFile() and ensure HTTP GET is …

…used for static json files instead of HTTP POST
  • Loading branch information...
1 parent d06decc commit b98d5f634e6d1171f3a3e95fc2c95e355ce0cbb4 @dnauck dnauck committed Oct 10, 2016
Showing with 3 additions and 5 deletions.
  1. +3 −5 core/src/plugins/gui.ajax/res/js/ui/prototype/class.FormManager.js
@@ -448,19 +448,17 @@ Class.create("FormManager", {
};
conn.sendAsync();
}else if(json_file){
- var req = new Connexion(json_file);
- req.onComplete = function(transport){
+ PydioApi.getClient().loadFile(json_file, function(transport){
element = div.down("select");
if(defaultValue) element.defaultValue = defaultValue;
element.down('option[value="loading"]').remove();
- $A(transport.responseJSON).each(function(entry){
+ transport.responseJSON.each(function(entry){
var option = new Element('OPTION', {value:entry.key}).update(entry.label);
if(entry.key == defaultValue) option.setAttribute("selected", "true");
element.insert(option);
});
element.fire("chosen:updated");
- };
- req.sendAsync();
+ });
}
if(param.get('replicationGroup')){

0 comments on commit b98d5f6

Please sign in to comment.