X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Ffilebrowser%2Fplugin.js;h=de764f1697fff6f41beec7abb194cc5e0b4bbdc5;hb=refs%2Ftags%2Fv3.2.1;hp=ae628cf853c8b8f8be0b945643feb8f4bc4b886f;hpb=059b4c2fef02528bf1af189f7996e80652faddfb;p=ckeditor.git diff --git a/_source/plugins/filebrowser/plugin.js b/_source/plugins/filebrowser/plugin.js index ae628cf..de764f1 100644 --- a/_source/plugins/filebrowser/plugin.js +++ b/_source/plugins/filebrowser/plugin.js @@ -378,22 +378,22 @@ 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 ) + { + element = definition.contents[ i ] ; + attachFileBrowser( evt.editor, evt.data.name, definition, element.elements ); + if ( element.hidden && element.filebrowser ) { - var definition = evt.data.definition, - element; - // Associate filebrowser to elements with 'filebrowser' attribute. - for ( var i in definition.contents ) - { - 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 ); + } } } );