bugfix
This commit is contained in:
parent
1e0fbce1d5
commit
6a87994bdf
@ -453,7 +453,6 @@ bricks.DynamicAccordion = class extends bricks.VScrollPanel {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var jc = new bricks.HttpJson();
|
|
||||||
var w;
|
var w;
|
||||||
w = await bricks.widgetBuild(this.content_view, content, record);
|
w = await bricks.widgetBuild(this.content_view, content, record);
|
||||||
if (w){
|
if (w){
|
||||||
|
@ -76,11 +76,12 @@ bricks.HttpText = class {
|
|||||||
}
|
}
|
||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
params = Object.assign(this.params, params);
|
var p = bricks.extend({}, this.params);
|
||||||
|
p = bricks.extend(p, params);
|
||||||
if (session){
|
if (session){
|
||||||
bricks.extend(params,{session:session});
|
bricks.extend(p,{session:session});
|
||||||
}
|
}
|
||||||
return params;
|
return p;
|
||||||
}
|
}
|
||||||
add_own_headers(headers){
|
add_own_headers(headers){
|
||||||
if (! headers){
|
if (! headers){
|
||||||
|
@ -11,7 +11,7 @@ bricks.TreeNode = class extends bricks.VBox {
|
|||||||
this.children_loaded = false;
|
this.children_loaded = false;
|
||||||
this.user_data = data;
|
this.user_data = data;
|
||||||
this.is_leaf = this.user_data.is_leaf;
|
this.is_leaf = this.user_data.is_leaf;
|
||||||
this.params = {id:this.user_data[this.tree.opts.idField]};
|
this.params = bricks.extend(this.tree.params, {id:this.user_data[this.tree.opts.idField]});
|
||||||
if (this.tree.multitype_tree){
|
if (this.tree.multitype_tree){
|
||||||
this.params['type'] = this.user_data[this.tree.opts.typeField];
|
this.params['type'] = this.user_data[this.tree.opts.typeField];
|
||||||
}
|
}
|
||||||
@ -181,6 +181,7 @@ bricks.Tree = class extends bricks.VScrollPanel {
|
|||||||
this.add_widget(this.container);
|
this.add_widget(this.container);
|
||||||
this.data_id = null;
|
this.data_id = null;
|
||||||
if (this.opts.dataurl){
|
if (this.opts.dataurl){
|
||||||
|
this.params = opts.params || {};
|
||||||
schedule_once(this.get_children_data.bind(this, this), 0.1);
|
schedule_once(this.get_children_data.bind(this, this), 0.1);
|
||||||
} else {
|
} else {
|
||||||
this.user_data = {
|
this.user_data = {
|
||||||
@ -411,26 +412,18 @@ bricks.Tree = class extends bricks.VScrollPanel {
|
|||||||
node_selected(node, flag){
|
node_selected(node, flag){
|
||||||
console.log('node_selected():node=', node, flag);
|
console.log('node_selected():node=', node, flag);
|
||||||
node.selected(flag);
|
node.selected(flag);
|
||||||
var d = {
|
var d = bricks.extend(node.user_data, {
|
||||||
node:node,
|
|
||||||
data:node.getValue(),
|
|
||||||
id:node.get_id(),
|
|
||||||
selected:flag
|
selected:flag
|
||||||
}
|
});
|
||||||
|
|
||||||
this.dispatch('node_selected', d);
|
this.dispatch('node_selected', d);
|
||||||
}
|
}
|
||||||
async node_checked(node, event){
|
async node_checked(node, event){
|
||||||
var cb = event.target.bricks_widget;
|
var cb = event.target.bricks_widget;
|
||||||
var stat = cb.getValue().check;
|
var stat = cb.getValue().check;
|
||||||
node.user_data[this.checkField] = stat;
|
node.user_data[this.checkField] = stat;
|
||||||
var d = {
|
|
||||||
node:node,
|
|
||||||
data:node.getValue(),
|
|
||||||
id: node.get_id(),
|
|
||||||
check_stat:stat
|
|
||||||
}
|
|
||||||
console.log('value=', cb.getValue(), 'node=', node);
|
console.log('value=', cb.getValue(), 'node=', node);
|
||||||
this.dispatch('check_changed', d);
|
this.dispatch('check_changed', node.user_data);
|
||||||
}
|
}
|
||||||
node_info_log(event){
|
node_info_log(event){
|
||||||
if (event.params.selected == false){
|
if (event.params.selected == false){
|
||||||
|
Loading…
Reference in New Issue
Block a user