bugfix
This commit is contained in:
parent
71cdf450b9
commit
6adcd1d730
@ -55,11 +55,11 @@ bricks.DataRow = class extends bricks.HBox {
|
||||
}
|
||||
if (header){
|
||||
if (this.toolbar){
|
||||
this.toolbar.tools.foreach(t => if (not reserved.includes(t.name)) tools.push({name:'blankicon'}));
|
||||
this.toolbar.tools.forEach(t => if (not reserved.includes(t.name)) tools.push({name:'blankicon'}));
|
||||
}
|
||||
} else {
|
||||
if (this.toolbar){
|
||||
this.toolbar.tools.foreach(t => if (not reserved.includes(t.name)) tools.push(t));
|
||||
this.toolbar.tools.forEach(t => if (not reserved.includes(t.name)) tools.push(t));
|
||||
}
|
||||
}
|
||||
var toolbar = bricks.extend({cwidth:2.5}, this.toolbar || {});
|
||||
|
@ -10,19 +10,21 @@ bricks.Tabular = class extends DynamicAccordion {
|
||||
var view = bricks.apply_data(this.record_View, record);
|
||||
var dr = bricks.DataRow(view);
|
||||
dr.render(this.editable, this.checkable, false);
|
||||
dr.bind('update', this.update_record.bind(this, record, item));
|
||||
dr.bind('delete', this.delete_record.bind(this, record, item));
|
||||
for (e in dr.event_names){
|
||||
dr.bind(e, this.record_event_handle.bind(this, record, item));
|
||||
}
|
||||
dr.bind('update', this.update_record.bind(this, dr, record));
|
||||
dr.bind('delete', this.delete_record.bind(this, dr, record));
|
||||
dr.event_names.forEach(e => {
|
||||
dr.bind(e, this.record_event_handle.bind(this, record, dr, item));
|
||||
});
|
||||
return dr;
|
||||
} else {
|
||||
var view = bricks.apply_data(this.record_View, record);
|
||||
var dr = bricks.DataRow(view);
|
||||
dr.render(this.editable, this.checkable, true);
|
||||
dr.bind('add', this.add_record.bind(this, record, item));
|
||||
dr.bind('add', this.add_record.bind(this, dr, record));
|
||||
return dr;
|
||||
}
|
||||
}
|
||||
record_event_handle(record, row, item){
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user