"MDL-16697, fixed parameters"

This commit is contained in:
dongsheng 2009-08-16 03:46:15 +00:00
parent 139a371739
commit 7a0c240306
2 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,9 @@
function filepicker_callback(params) {
var html = '<div class="mdl-left"><a href="'+params['url']+'">'+params['file']+'</a>';
html += '<a href="###" onclick=\'rm_file('+params['id']+', "'+params['file']+'", this)\'>Delete</a>';
// TODO: support delete the draft file
//html += '<a href="###" onclick=\'rm_file("'+params['id']+'", "'+params['file']+'", this)\'>Delete</a>';
html += '</div>';
alert(html);
document.getElementById('file_info_'+params['client_id']).innerHTML = html;
}

View File

@ -101,7 +101,7 @@ class MoodleQuickForm_filepicker extends HTML_QuickForm_input {
$str .= $repojs;
$str .= <<<EOD
<a href="#nonjsfp" onclick="return launch_filepicker('$id', '$client_id', '$draftvalue')">$straddfile</a>
<a href="#nonjsfp" onclick="return launch_filepicker('$id', '$client_id', '$draftitemid')">$straddfile</a>
<span id="file_info_{$client_id}" class="notifysuccess">$currentfile</span>
<noscript>