diff options
Diffstat (limited to 'libs/cbi/htdocs')
-rw-r--r-- | libs/cbi/htdocs/luci-static/resources/cbi.js | 10 |
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 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(); +} |