"MDL-18486, remove php varible from file picker code, all javascript code goes into a static file"

This commit is contained in:
dongsheng
2009-04-20 08:53:21 +00:00
parent dd13271188
commit e189ec00f0
10 changed files with 1220 additions and 1224 deletions
+3 -3
View File
@@ -92,14 +92,14 @@ $output .= <<<EOF
};
}
function moodlefilemanager(field_name, url, type, win) {
var suffix = id2suffix[tinyMCE.selectedInstance.editorId];
var client_id = id2clientid[tinyMCE.selectedInstance.editorId];
document.body.className += ' yui-skin-sam';
var picker = document.createElement('DIV');
picker.className = "file-picker";
picker.id = 'file-picker-'+suffix;
picker.id = 'file-picker-'+client_id;
document.body.appendChild(picker);
var el = win.document.getElementById(field_name);
eval('openpicker_'+suffix+'({"env":"editor","target":el, "filetype":type})');
eval('open_filepicker(client_id, {"env":"editor","target":el,"filetype":type})');
}
EOF;