diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-05-05 23:50:25 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-05-06 13:42:55 +0200 |
commit | 8583efb5a92785fd56ff4abb0ce56a142eb6602f (patch) | |
tree | 439772e5ce02ed2b7b78067ba4c51e1f61e651e4 /modules | |
parent | b6797821b86678d8dd604ce4805691784e6dc3ce (diff) |
luci-base: ui.js: make "Apply unchecked" available from the changes dialog
Previously, "Apply unchecked" was only possible from the save action of CBI
maps, allow to invoke it from the configuration change dialog as well.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/ui.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js index 52f155b90e..a46330f294 100644 --- a/modules/luci-base/htdocs/luci-static/resources/ui.js +++ b/modules/luci-base/htdocs/luci-static/resources/ui.js @@ -4399,10 +4399,16 @@ var UI = baseclass.extend(/** @lends LuCI.ui.prototype */ { 'class': 'btn', 'click': UI.prototype.hideModal }, [ _('Close') ]), ' ', - E('button', { - 'class': 'cbi-button cbi-button-positive important', - 'click': L.bind(this.apply, this, true) - }, [ _('Save & Apply') ]), ' ', + new UIComboButton('0', { + 0: [ _('Save & Apply') ], + 1: [ _('Apply unchecked') ] + }, { + classes: { + 0: 'btn cbi-button cbi-button-positive important', + 1: 'btn cbi-button cbi-button-negative important' + }, + click: L.bind(function(ev, mode) { this.apply(mode == '0') }, this) + }).render(), ' ', E('button', { 'class': 'cbi-button cbi-button-reset', 'click': L.bind(this.revert, this) |