Pass the ID of the path element

This commit is contained in:
Nathan Gray 2012-03-29 23:28:48 +00:00
parent 9d179df719
commit d7bd469ed9
2 changed files with 4 additions and 4 deletions

View File

@ -472,7 +472,7 @@ class filemanager_ui
$GLOBALS['egw_info']['flags']['java_script'] .= '<script type="text/javascript">
var clipboard_files = [];
function check_files(upload)
function check_files(upload, path_id)
{
var files = [];
if (upload.files)
@ -486,7 +486,7 @@ function check_files(upload)
{
files = upload.value;
}
var path = document.getElementById(upload.id.replace(/upload\]\[/,"nm][path"));
var path = document.getElementById(path_id ? path_id : upload.id.replace(/upload\]\[/,"nm][path"));
xajax_doXMLHTTP("filemanager_ui::ajax_check_upload_target",upload.id, files, path.value);
}

View File

@ -93,7 +93,7 @@
</row>
<row>
<hbox>
<file statustext="Select file to upload in current directory" id="upload[]" onchange="check_files(this);"/>
<file statustext="Select file to upload in current directory" id="upload[]" onchange="check_files(this, form::name('nm[path]'));"/>
<button label="Upload" id="button[upload]"/>
</hbox>
<description/>