MDL-21170 migrated filepicker to new YUI3 loading, tested in editor only, the filemanager and picker elements still have some problems, sorry for that

This commit is contained in:
Petr Skoda
2010-01-21 22:04:31 +00:00
parent e50b4c8972
commit 7b42e81a76
9 changed files with 12 additions and 45 deletions
+1 -1
View File
@@ -19,7 +19,6 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element {
function MoodleQuickForm_editor($elementName=null, $elementLabel=null, $attributes=null, $options=null) {
global $CFG, $PAGE;
$PAGE->requires->js('/lib/form/filepicker.js');
$options = (array)$options;
foreach ($options as $name=>$value) {
@@ -195,6 +194,7 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element {
$options->env = 'editor';
$options->itemid = $draftitemid;
$PAGE->requires->js_module('filepicker');
$PAGE->requires->js_function_call('editor_init_filepicker', array($id, $options))->on_dom_ready();
if ($editor->supports_repositories()) {