"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
+4 -3
View File
@@ -4932,13 +4932,14 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v
} else {
$ctx = $COURSE->context;
}
$ret = repository_get_client($ctx, array('image', 'video', 'media'), '*');
$client_id = uniqid();
$ret = repository_get_client($ctx, $client_id, array('image', 'video', 'media'), '*');
$str .= $ret['css'].$ret['js'];
$suffix = $ret['suffix'];
$str .= '<div class="textareaicons">';
$str .= '<script type="text/javascript">
//<![CDATA[
id2suffix[\''.$id.'\']=\''.$suffix.'\';
id2clientid[\''.$id.'\']=\''.$client_id.'\';
mce_saveOnSubmit(\''.addslashes_js($id).'\');
document.write(\''.addslashes_js($str_toggle).'\');
document.write(\''.addslashes_js(editorshortcutshelpbutton()).'\');