From b618361bf1c7ea160f3e0ef18aa8f409f7a21eff Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 10 Oct 2008 21:52:22 +0000 Subject: * luci/libs/cbi: implement file browse fields * luci/modules/admin-full: add file browse controller --- libs/cbi/htdocs/luci-static/resources/cbi.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libs/cbi/htdocs/luci-static/resources') diff --git a/libs/cbi/htdocs/luci-static/resources/cbi.js b/libs/cbi/htdocs/luci-static/resources/cbi.js index d7bc74bc5f..4b1849beab 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(); +} -- cgit v1.2.3