]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-16697, fixed parameters"
authordongsheng <dongsheng>
Sun, 16 Aug 2009 03:46:15 +0000 (03:46 +0000)
committerdongsheng <dongsheng>
Sun, 16 Aug 2009 03:46:15 +0000 (03:46 +0000)
lib/form/filepicker.js
lib/form/filepicker.php

index 25623009ba114338f9a5522dd545f3d10729628b..551b6a052bd1309b54e71ef64758b77b6a713b91 100644 (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;
 }
 
index 9a712462438373b6a084d57566f4113073aec08d..90e2d6aec065e7b0951ad17c968e6ec92358cd77 100644 (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>