projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
311bcd4
)
luci-base: form.js: pass section_id to Button onclick handler
author
Jo-Philipp Wich
<jo@mein.io>
Wed, 12 Feb 2020 21:21:29 +0000
(22:21 +0100)
committer
Jo-Philipp Wich
<jo@mein.io>
Thu, 13 Feb 2020 18:26:33 +0000
(19:26 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/form.js
patch
|
blob
|
history
diff --git
a/modules/luci-base/htdocs/luci-static/resources/form.js
b/modules/luci-base/htdocs/luci-static/resources/form.js
index b31dac7145918f34e6124c16e5c39aaf2775b997..9c59c650a38eb63cf18fc7d74d022406b8b2519d 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/form.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/form.js
@@
-1894,7
+1894,10
@@
var CBIButtonValue = CBIValue.extend({
L.dom.content(outputEl, [
E('button', {
'class': 'cbi-button cbi-button-%s'.format(this.inputstyle || 'button'),
- 'click': L.ui.createHandlerFn(this, this.onclick || function(ev) {
+ 'click': L.ui.createHandlerFn(this, function(section_id, ev) {
+ if (this.onclick)
+ return this.onclick(ev, section_id);
+
ev.currentTarget.parentNode.nextElementSibling.value = value;
return this.map.save();
}, section_id)