diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-06-19 13:29:19 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-06-19 13:33:46 +0200 |
commit | 1154c4198a763aabd7c2fbe0f5419af7c2d04681 (patch) | |
tree | 393d2ea41144f7a04ee56674c67cd569013b6008 /applications/luci-app-opkg/htdocs/luci-static | |
parent | da8668a50d9c3fe7acb137c017395d43cf54f5ab (diff) |
luci-app-opkg: make overwriting package files optional
Ref: #2775
Signed-off-by: Dirk Brenken <dev@brenken.org>
[split into multiple commits, sync translations]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-opkg/htdocs/luci-static')
-rw-r--r-- | applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js b/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js index 4d67a034c..2c0c460d1 100644 --- a/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js +++ b/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js @@ -589,6 +589,10 @@ function handleInstall(ev) desc || '', errs || inst || '', E('div', { 'class': 'right' }, [ + E('label', { 'class': 'cbi-checkbox', 'style': 'float:left; padding-top:.5em' }, [ + E('input', { 'type': 'checkbox', 'name': 'overwrite' }), ' ', + _('Overwrite files from other package(s)') + ]), E('div', { 'class': 'btn', 'click': L.hideModal @@ -744,6 +748,7 @@ function handleOpkg(ev) var cmd = ev.target.getAttribute('data-command'), pkg = ev.target.getAttribute('data-package'), rem = document.querySelector('input[name="autoremove"]'), + owr = document.querySelector('input[name="overwrite"]'), url = 'admin/system/opkg/exec/' + encodeURIComponent(cmd); var dlg = L.showModal(_('Executing package manager'), [ @@ -751,7 +756,7 @@ function handleOpkg(ev) _('Waiting for the <em>opkg %h</em> command to complete…').format(cmd)) ]); - L.post(url, { package: pkg, autoremove: rem ? rem.checked : false }, function(xhr, res) { + L.post(url, { package: pkg, autoremove: rem ? rem.checked : false, overwrite: owr ? owr.checked : false }, function(xhr, res) { dlg.removeChild(dlg.lastChild); if (res.stdout) |