summaryrefslogtreecommitdiffhomepage
path: root/libs/cbi/htdocs/luci-static
diff options
context:
space:
mode:
Diffstat (limited to 'libs/cbi/htdocs/luci-static')
-rw-r--r--libs/cbi/htdocs/luci-static/resources/cbi.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/cbi/htdocs/luci-static/resources/cbi.js b/libs/cbi/htdocs/luci-static/resources/cbi.js
index d7bc74bc5..4b1849bea 100644
--- a/libs/cbi/htdocs/luci-static/resources/cbi.js
+++ b/libs/cbi/htdocs/luci-static/resources/cbi.js
@@ -167,3 +167,13 @@ function cbi_combobox_init(id, values, def, man) {
});
cbi_combobox(id, values, def, man);
}
+
+function cbi_filebrowser(id, url, defpath) {
+ var field = document.getElementById(id);
+ var browser = window.open(
+ url + ( field.value || defpath || '' ) + '?field=' + id,
+ "luci_filebrowser", "width=300,height=400,left=100,top=200,scrollbars=yes"
+ );
+
+ browser.focus();
+}