diff options
author | Florian Eckert <fe@dev.tdt.de> | 2024-06-07 10:01:31 +0200 |
---|---|---|
committer | Florian Eckert <fe@dev.tdt.de> | 2024-06-07 13:33:00 +0200 |
commit | fca31270aaaa7bdb6f4f9c4f476a46f933d20075 (patch) | |
tree | 5d992d000fec47883e3d4c94fb3861d8a5b884ef /modules/luci-base/htdocs/luci-static/resources/ui.js | |
parent | 9bb8f7aaa3b1d22265f6f4c75127ef95ef358244 (diff) |
luci-base: move cancel button to the top
This change is required, so that the cancel button is the first and thus
closes the modal when the 'ESC' button is pressed.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static/resources/ui.js')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/ui.js | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js index d1945a84d8..9050b10521 100644 --- a/modules/luci-base/htdocs/luci-static/resources/ui.js +++ b/modules/luci-base/htdocs/luci-static/resources/ui.js @@ -4210,6 +4210,13 @@ var UI = baseclass.extend(/** @lends LuCI.ui.prototype */ { UI.prototype.showModal(_('Uploading file…'), [ E('p', _('Please select the file to upload.')), E('div', { 'class': 'right' }, [ + E('div', { + 'class': 'btn cbi-button', + 'click': function() { + UI.prototype.hideModal(); + rejectFn(new Error(_('Upload has been cancelled'))); + } + }, [ _('Cancel') ]), E('input', { type: 'file', style: 'display:none', @@ -4240,14 +4247,6 @@ var UI = baseclass.extend(/** @lends LuCI.ui.prototype */ { } }, [ _('Browse…') ]), E('div', { - 'class': 'btn cbi-button', - 'click': function() { - UI.prototype.hideModal(); - rejectFn(new Error(_('Upload has been cancelled'))); - } - }, [ _('Cancel') ]), - ' ', - E('div', { 'class': 'btn cbi-button-action important', 'disabled': true, 'click': function(ev) { |