summaryrefslogtreecommitdiffhomepage
path: root/libs/cbi/htdocs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-10-10 21:52:22 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-10-10 21:52:22 +0000
commitb618361bf1c7ea160f3e0ef18aa8f409f7a21eff (patch)
tree2765d22f35d710e806be8a23f7f5efdad9100949 /libs/cbi/htdocs
parent720295d973b44cdad4cd4a0e0b0b0f7f79ff6c3a (diff)
* luci/libs/cbi: implement file browse fields
* luci/modules/admin-full: add file browse controller
Diffstat (limited to 'libs/cbi/htdocs')
-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();
+}