MDL-19580 cleanup of require css and js filepicker code

This commit is contained in:
skodak 2009-06-24 22:34:29 +00:00
parent b14e77c966
commit ff5fe31160
14 changed files with 169 additions and 121 deletions

View file

@ -51,11 +51,15 @@ class tinymce_texteditor extends texteditor {
return true;
}
public function use_editor($elementid, array $options=null) {
public function head_setup() {
global $CFG, $PAGE;
require_once("$CFG->dirroot/repository/lib.php");
$PAGE->requires->js('/lib/editor/tinymce/tiny_mce_src.js');
$PAGE->requires->js('/lib/editor/tinymce/extra/tinymce_utils.js');
}
public function use_editor($elementid, array $options=null) {
global $PAGE;
$PAGE->requires->js_function_call('mce_init_editor', array($elementid, $this->get_init_params($elementid, $options)));
}