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