This commit is contained in:
yumoqing 2024-05-14 19:13:37 +08:00
parent f2cfc34aaf
commit e3e0f4cdf9

View File

@ -116,7 +116,10 @@ bricks.DynamicAccordion = class extends bricks.VScrollPanel {
} }
content.set_css('accordion-item-content'); content.set_css('accordion-item-content');
content.hide(); content.hide();
info.bind('click', this.line_clicked.bind(this, info, content, record)); if (record){
info.bind('click',
this.line_clicked.bind(this, info, content, record));
}
item.add_widget(content); item.add_widget(content);
return item; return item;
} }
@ -156,6 +159,15 @@ bricks.DynamicAccordion = class extends bricks.VScrollPanel {
content.clear_widgets(); content.clear_widgets();
var hided = content.is_hide(); var hided = content.is_hide();
var fields = this.fields; var fields = this.fields;
if (this.data_params){
for (var k in this.data_params){
fields.push({
name:k,
value:this.data_params[k],
uitype:'hide'
});
}
}
var f = new bricks.Form({ var f = new bricks.Form({
"cheight":this.editable.form_cheight||7, "cheight":this.editable.form_cheight||7,
"submit_url":this.editable.new_data_url, "submit_url":this.editable.new_data_url,