Skip to content

Commit

Permalink
TinyMCE, MDL-23407 allow all repostory types when using link button
Browse files Browse the repository at this point in the history
  • Loading branch information
Dongsheng Cai committed Jul 28, 2010
1 parent 662688b commit a4d9143
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion lib/editor/tinymce/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ M.editor_tinymce.filepicker = function(target_id, url, type, win) {
YUI(M.yui.loader).use('core_filepicker', function (Y) {
var editor_id = tinyMCE.selectedInstance.editorId;
var options = null;
alert(type);
if (type == 'media') {
// when mediaw button clicked
options = M.editor_tinymce.filepicker_options[editor_id]['media'];
Expand Down
4 changes: 3 additions & 1 deletion lib/form/editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,15 @@ function toHtml() {
$args->return_types = (FILE_INTERNAL | FILE_EXTERNAL);
$args->context = $ctx;
$args->env = 'filepicker';
// advimage plugin
$image_options = initialise_filepicker($args);
$image_options->context = $ctx;
$image_options->client_id = uniqid();
$image_options->maxbytes = $this->_options['maxbytes'];
$image_options->env = 'editor';
$image_options->itemid = $draftitemid;

// moodlemedia plugin
$args->accepted_types = array('video', 'audio');
$media_options = initialise_filepicker($args);
$media_options->context = $ctx;
Expand All @@ -182,7 +184,7 @@ function toHtml() {
$media_options->env = 'editor';
$media_options->itemid = $draftitemid;

$args->return_types = FILE_EXTERNAL;
// advlink plugin
$args->accepted_types = '*';
$link_options = initialise_filepicker($args);
$link_options->context = $ctx;
Expand Down

0 comments on commit a4d9143

Please sign in to comment.