mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 21:45:37 +02:00
"MDL-13766, add savepath parameter to html editor when launch filepicker"
This commit is contained in:
parent
527761e05f
commit
f3153c9123
@ -54,5 +54,5 @@ function mce_moodlefilemanager(field_name, url, type, win) {
|
||||
picker.id = 'file-picker-'+client_id;
|
||||
document.body.appendChild(picker);
|
||||
var el = win.document.getElementById(field_name);
|
||||
eval('open_filepicker(client_id, {"env":"editor","target":el,"filetype":type})');
|
||||
eval('open_filepicker(client_id, {"env":"editor","target":el,"filetype":type, "savepath":"/"})');
|
||||
}
|
||||
|
@ -1236,7 +1236,11 @@ function open_filepicker(id, params) {
|
||||
r.target = params.target;
|
||||
r.show();
|
||||
}
|
||||
r.savepath = params.savepath;
|
||||
if (params.savepath) {
|
||||
r.savepath = params.savepath;
|
||||
} else {
|
||||
r.savepath = params.savepath = '/';
|
||||
}
|
||||
if(params.filetype) {
|
||||
if(params.filetype == 'image') {
|
||||
r.accepted_types = file_extensions.image;
|
||||
|
Loading…
x
Reference in New Issue
Block a user