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 @@ -447,14 +447,21 @@ function use(item) {
447447
448448 var url = item . url ;
449449 var field_name = getUrlParam ( 'field_name' ) ;
450+ var callback = getUrlParam ( 'callback' ) ;
450451 var is_ckeditor = getUrlParam ( 'CKEditor' ) ;
451452 var is_fcke = typeof data != 'undefined' && data [ 'Properties' ] [ 'Width' ] != '' ;
452453
453- if ( window . opener || window . tinyMCEPopup || field_name || getUrlParam ( 'CKEditorCleanUpFuncNum' ) || is_ckeditor ) {
454+ if ( window . opener || window . tinyMCEPopup || field_name || callback || getUrlParam ( 'CKEditorCleanUpFuncNum' ) || is_ckeditor ) {
454455 if ( window . tinyMCEPopup ) { // use TinyMCE > 3.0 integration method
455456 useTinymce3 ( url ) ;
456457 } else if ( field_name ) { // tinymce 4 and colorbox
457458 useTinymce4AndColorbox ( url , field_name ) ;
459+ } else if ( callback && ( window [ callback ] || parent [ callback ] ) ) {
460+ if ( window [ callback ] ) {
461+ window [ callback ] ( getSelectedItems ( ) ) ;
462+ } else if ( parent [ callback ] ) {
463+ parent [ callback ] ( getSelecteditems ( ) ) ;
464+ }
458465 } else if ( is_ckeditor ) { // use CKEditor 3.0 + integration method
459466 useCkeditor3 ( url ) ;
460467 } else if ( is_fcke ) { // use FCKEditor 2.0 integration method
You can’t perform that action at this time.
0 commit comments