luci-base: form.js: allow overriding remove action in Table/GridSections
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
4d3d23b5e9
commit
0068c3bd49
1 changed files with 1 additions and 4 deletions
|
@ -1211,10 +1211,7 @@ var CBITableSection = CBITypedSection.extend({
|
||||||
E('button', {
|
E('button', {
|
||||||
'title': btn_title || _('Delete'),
|
'title': btn_title || _('Delete'),
|
||||||
'class': 'cbi-button cbi-button-remove',
|
'class': 'cbi-button cbi-button-remove',
|
||||||
'click': L.ui.createHandlerFn(this, function(sid, ev) {
|
'click': L.ui.createHandlerFn(this, 'handleRemove', section_id)
|
||||||
this.map.data.remove(config_name, sid);
|
|
||||||
return this.map.save(null, true);
|
|
||||||
}, section_id)
|
|
||||||
}, [ btn_title || _('Delete') ])
|
}, [ btn_title || _('Delete') ])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue