luci-base: form.js: use createHandlerFn() for modal button actions
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
c352fbf5e9
commit
ac56dc057d
1 changed files with 6 additions and 12 deletions
|
@ -1153,24 +1153,18 @@ var CBITableSection = CBITypedSection.extend({
|
|||
}
|
||||
}
|
||||
|
||||
//ev.target.classList.add('spinning');
|
||||
Promise.resolve(this.addModalOptions(s, section_id, ev)).then(L.bind(m.render, m)).then(L.bind(function(nodes) {
|
||||
//ev.target.classList.remove('spinning');
|
||||
L.ui.showModal(title, [
|
||||
nodes,
|
||||
E('div', { 'class': 'right' }, [
|
||||
E('input', {
|
||||
'type': 'button',
|
||||
E('button', {
|
||||
'class': 'btn',
|
||||
'click': L.bind(this.handleModalCancel, this, m),
|
||||
'value': _('Dismiss')
|
||||
}), ' ',
|
||||
E('input', {
|
||||
'type': 'button',
|
||||
'click': L.ui.createHandlerFn(this, 'handleModalCancel', m)
|
||||
}, _('Dismiss')), ' ',
|
||||
E('button', {
|
||||
'class': 'cbi-button cbi-button-positive important',
|
||||
'click': L.bind(this.handleModalSave, this, m),
|
||||
'value': _('Save')
|
||||
})
|
||||
'click': L.ui.createHandlerFn(this, 'handleModalSave', m)
|
||||
}, _('Save'))
|
||||
])
|
||||
], 'cbi-modal');
|
||||
}, this)).catch(L.error);
|
||||
|
|
Loading…
Reference in a new issue