bugfix
This commit is contained in:
parent
656611ee23
commit
4fc8516c73
@ -112,8 +112,8 @@ bricks.widgetBuild = async function(desc, widget, data){
|
||||
base_url = url;
|
||||
let method = desc.options.method || 'GET';
|
||||
let opts = desc.options.params || {};
|
||||
var jcall = bricks.jcall;
|
||||
var desc1 = await jcall(url, { "method":method, "params":opts});
|
||||
var jc = new bricks.HttpJson();
|
||||
var desc1 = await jc.httpcall(url, { "method":method, "params":opts});
|
||||
desc = desc1;
|
||||
klassname = desc.widgettype;
|
||||
}
|
||||
@ -472,8 +472,8 @@ bricks.App = class extends bricks.Layout {
|
||||
}
|
||||
async setup_i18n(){
|
||||
let params = {'lang':this.lang};
|
||||
var jcall = bricks.jcall;
|
||||
d = await jcall(desc.url, {
|
||||
var jc = new bricks.HttpJson();
|
||||
d = await jc.httpcall(desc.url, {
|
||||
"method":desc.method||'GET', params:params});
|
||||
this.i18n.setup_dict(d);
|
||||
}
|
||||
|
@ -42,8 +42,8 @@ bricks.I18n = class {
|
||||
if (! this.url) return;
|
||||
|
||||
let params = {'lang':lang};
|
||||
var jcall = bricks.jcall;
|
||||
d = await jcall(desc.url, {
|
||||
var jc = new bricks.HttpJson();
|
||||
d = await jc.httpcall(desc.url, {
|
||||
"method":this.method || 'GET',
|
||||
params:params
|
||||
});
|
||||
|
@ -526,8 +526,8 @@ bricks.UiCheckBox =class extends bricks.UiType {
|
||||
}
|
||||
}
|
||||
async load_data_onfly(){
|
||||
var jcall = bricks.jcall;
|
||||
var data = await jcall(this.opts.dataurl, {
|
||||
var jc = new bricks.HttpJson();
|
||||
var data = await jc.httpcall(this.opts.dataurl, {
|
||||
"method":this.opts.method||'GET',
|
||||
"params":this.opts.params});
|
||||
this.data = data;
|
||||
@ -703,8 +703,8 @@ bricks.UiCode =class extends bricks.UiType {
|
||||
await this.loadData(params);
|
||||
}
|
||||
async loadData(params){
|
||||
var jcall = bricks.jcall;
|
||||
var d = await jcall(this.opts.dataurl,
|
||||
var jc = new bricks.HttpJson();
|
||||
var d = await jc.httpcall(this.opts.dataurl,
|
||||
{
|
||||
method:this.opts.method || 'GET',
|
||||
params : params
|
||||
|
@ -55,8 +55,8 @@ bricks.BufferedDataLoader = class {
|
||||
var params = objcopy(this.cur_params);
|
||||
params.page = this.cur_page;
|
||||
params.rows = this.pagerows;
|
||||
var jcall = bricks.jcall;
|
||||
var d = await jcall(this.url, {
|
||||
var jc = new bricks.HttpJson();
|
||||
var d = await jc.httpcall(this.url, {
|
||||
method:this.method,
|
||||
params:params});
|
||||
this.total_records = d.total;
|
||||
|
@ -379,13 +379,13 @@ bricks.Tree = class extends bricks.VScrollPanel {
|
||||
}
|
||||
|
||||
async get_children_data(node){
|
||||
var jcall = bricks.jcall;
|
||||
var jc = new bricks.HttpJson();
|
||||
var p = bricks.extend({}, this.params);
|
||||
if (node != this){
|
||||
p.id = node.user_data[this.idField];
|
||||
}
|
||||
console.log('params=', p);
|
||||
var d = await jcall(this.opts.dataurl,{
|
||||
var d = await jc.httpcall(this.opts.dataurl,{
|
||||
method : this.opts.method || 'GET',
|
||||
params : p
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user