mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-32106: fixed JS bug - when html element did not exist the script stopped
This commit is contained in:
parent
a81e8c47f1
commit
e30281eed5
1 changed files with 3 additions and 3 deletions
|
@ -657,13 +657,13 @@ M.core_filepicker.init = function(Y, options) {
|
||||||
params['author'] = author.get('value');
|
params['author'] = author.get('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.options.env == 'editor') {
|
if (this.options.externallink && this.options.env == 'editor') {
|
||||||
// in editor, images are stored in '/' only
|
// in editor, images are stored in '/' only
|
||||||
params.savepath = '/';
|
params.savepath = '/';
|
||||||
// when image or media button is clicked
|
// when image or media button is clicked
|
||||||
if ( this.options.return_types != 1 ) {
|
if ( this.options.return_types != 1 ) {
|
||||||
var linkexternal = Y.one('#linkexternal-'+client_id).get('checked');
|
var linkexternal = Y.one('#linkexternal-'+client_id);
|
||||||
if (linkexternal) {
|
if (linkexternal && linkexternal.get('checked')) {
|
||||||
params['linkexternal'] = 'yes';
|
params['linkexternal'] = 'yes';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue