luci-base: move button one level up for Save & Apply
authorFlorian Eckert <fe@dev.tdt.de>
Fri, 7 Jun 2024 07:39:34 +0000 (09:39 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Fri, 7 Jun 2024 11:33:00 +0000 (13:33 +0200)
This is a preparation commit so the buttons could get the new css class
'button-row'

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
modules/luci-base/htdocs/luci-static/resources/ui.js

index 4170ac366f2ac33ff55c625afc903078caab4a7b..9242ad5bbaa62da1ca64de574e01c8b09293b433 100644 (file)
@@ -4480,26 +4480,29 @@ var UI = baseclass.extend(/** @lends LuCI.ui.prototype */ {
                                                        E('var', {}, E('ins', '&#160;')), ' ', _('Option changed') ]),
                                                E('div', { 'class': 'uci-change-legend-label' }, [
                                                        E('var', {}, E('del', '&#160;')), ' ', _('Option removed') ])]),
-                                       E('br'), list,
-                                       E('div', { 'class': 'right' }, [
-                                               E('div', {
-                                                       'class': 'btn cbi-button',
-                                                       'click': UI.prototype.hideModal
-                                               }, [ _('Close') ]), ' ',
-                                               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('div', {
-                                                       'class': 'btn cbi-button cbi-button-reset',
-                                                       'click': L.bind(this.revert, this)
-                                               }, [ _('Revert') ])])])
+                                       E('br'),
+                                       list,
+                               ]),
+                               E('div', { 'class': 'right' }, [
+                                       E('div', {
+                                               'class': 'btn cbi-button',
+                                               'click': UI.prototype.hideModal
+                                       }, [ _('Close') ]), ' ',
+                                       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('div', {
+                                               'class': 'btn cbi-button cbi-button-reset',
+                                               'click': L.bind(this.revert, this)
+                                       }, [ _('Revert') ])
+                               ])
                        ]);
 
                        for (var config in this.changes) {