File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -503,14 +503,21 @@ function use(items) {
503503
504504 var url = items [ 0 ] . url ;
505505 var field_name = getUrlParam ( 'field_name' ) ;
506+ var callback = getUrlParam ( 'callback' ) ;
506507 var is_ckeditor = getUrlParam ( 'CKEditor' ) ;
507508 var is_fcke = typeof data != 'undefined' && data [ 'Properties' ] [ 'Width' ] != '' ;
508509
509- if ( window . opener || window . tinyMCEPopup || field_name || getUrlParam ( 'CKEditorCleanUpFuncNum' ) || is_ckeditor ) {
510+ if ( window . opener || window . tinyMCEPopup || field_name || callback || getUrlParam ( 'CKEditorCleanUpFuncNum' ) || is_ckeditor ) {
510511 if ( window . tinyMCEPopup ) { // use TinyMCE > 3.0 integration method
511512 useTinymce3 ( url ) ;
512513 } else if ( field_name ) { // tinymce 4 and colorbox
513514 useTinymce4AndColorbox ( url , field_name ) ;
515+ } else if ( callback && ( window [ callback ] || parent [ callback ] ) ) {
516+ if ( window [ callback ] ) {
517+ window [ callback ] ( getSelectedItems ( ) ) ;
518+ } else if ( parent [ callback ] ) {
519+ parent [ callback ] ( getSelecteditems ( ) ) ;
520+ }
514521 } else if ( is_ckeditor ) { // use CKEditor 3.0 + integration method
515522 useCkeditor3 ( url ) ;
516523 } else if ( is_fcke ) { // use FCKEditor 2.0 integration method
You can’t perform that action at this time.
0 commit comments