summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs/luci-static/resources/cbi.js
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-09-03 19:34:33 +0200
committerJo-Philipp Wich <jo@mein.io>2019-09-10 15:28:16 +0200
commit3f93650901caf9e4094aeaee6a47d68efafeac97 (patch)
treed47615a249b781bc8b1508a9f1b3fc8120371c25 /modules/luci-base/htdocs/luci-static/resources/cbi.js
parent1fcf34510a6c7994df3ca95e2e754db19870ce4b (diff)
luci-base: use cgi-io and rpcd-mod-file to handle file upload and browsing
Remove the old server side support for file browsing and file uploading and switch to a client side widget instead which uses XMLHTTPRequests to upload files via cgi-io and RPC calls for file listing and status queries. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static/resources/cbi.js')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/cbi.js25
1 files changed, 0 insertions, 25 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js
index 5aa687b670..9144fbaf62 100644
--- a/modules/luci-base/htdocs/luci-static/resources/cbi.js
+++ b/modules/luci-base/htdocs/luci-static/resources/cbi.js
@@ -298,8 +298,6 @@ function cbi_init() {
node.getAttribute('data-type'));
}
- document.querySelectorAll('[data-browser]').forEach(cbi_browser_init);
-
document.querySelectorAll('.cbi-tooltip:not(:empty)').forEach(function(s) {
s.parentNode.classList.add('cbi-tooltip-container');
});
@@ -330,29 +328,6 @@ function cbi_init() {
cbi_d_update();
}
-function cbi_filebrowser(id, defpath) {
- var field = L.dom.elem(id) ? id : document.getElementById(id);
- var browser = window.open(
- cbi_strings.path.browser + (field.value || defpath || '') + '?field=' + field.id,
- "luci_filebrowser", "width=300,height=400,left=100,top=200,scrollbars=yes"
- );
-
- browser.focus();
-}
-
-function cbi_browser_init(field)
-{
- field.parentNode.insertBefore(
- E('img', {
- 'src': L.resource('cbi/folder.gif'),
- 'class': 'cbi-image-button',
- 'click': function(ev) {
- cbi_filebrowser(field, field.getAttribute('data-browser'));
- ev.preventDefault();
- }
- }), field.nextSibling);
-}
-
function cbi_validate_form(form, errmsg)
{
/* if triggered by a section removal or addition, don't validate */