X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Ffilebrowser%2Fplugin.js;h=324234282a334f4d5b08772728b2f267fb03a4b5;hb=e371ddf8abcb89013e20e6d0dd746adec344d0e5;hp=ae628cf853c8b8f8be0b945643feb8f4bc4b886f;hpb=c6e377a02b54abc07129d72b632763c727476a15;p=ckeditor.git diff --git a/_source/plugins/filebrowser/plugin.js b/_source/plugins/filebrowser/plugin.js index ae628cf..3242342 100644 --- a/_source/plugins/filebrowser/plugin.js +++ b/_source/plugins/filebrowser/plugin.js @@ -378,22 +378,24 @@ For licensing, see LICENSE.html or http://ckeditor.com/license init : function( editor, pluginPath ) { editor._.filebrowserFn = CKEDITOR.tools.addFunction( setUrl, editor ); + } + } ); - CKEDITOR.on( 'dialogDefinition', function( evt ) + CKEDITOR.on( 'dialogDefinition', function( evt ) + { + var definition = evt.data.definition, + element; + // Associate filebrowser to elements with 'filebrowser' attribute. + for ( var i in definition.contents ) + { + if ( ( element = definition.contents[ i ] ) ) { - var definition = evt.data.definition, - element; - // Associate filebrowser to elements with 'filebrowser' attribute. - for ( var i in definition.contents ) + attachFileBrowser( evt.editor, evt.data.name, definition, element.elements ); + if ( element.hidden && element.filebrowser ) { - element = definition.contents[ i ] ; - attachFileBrowser( evt.editor, evt.data.name, definition, element.elements ); - if ( element.hidden && element.filebrowser ) - { - element.hidden = !isConfigured( definition, element[ 'id' ], element.filebrowser ); - } + element.hidden = !isConfigured( definition, element[ 'id' ], element.filebrowser ); } - } ); + } } } );