Ticket #5915: 5915_5.patch

File 5915_5.patch, 1.4 KB (added by Martin, 13 years ago)
  • _source/plugins/dialog/plugin.js

     
    179179                                definition : definition
    180180                        }
    181181                        , editor ).definition;
     182
     183                // check if dialog contents to remove was initialized
     184                if ( editor.config.removeDialogContents )
     185                {
     186                        var removeContentDefinition = editor.config.removeDialogContents.split( ";" );
     187                        for ( var i = 0, len = removeContentDefinition.length ; i < len ; i++ )
     188                        {
     189                                if ( removeContentDefinition[ i ].indexOf( ":" ) != -1 )
     190                                {
     191                                        var dialogContent = removeContentDefinition[i].split( ":" );
     192                                        if ( dialogName == dialogContent[ 0 ] )
     193                                                definition.removeContents( dialogContent[ 1 ] );
     194                                }
     195                        }
     196                }
     197
    182198                // Initialize load, show, hide, ok and cancel events.
    183199                if ( definition.onLoad )
    184200                        this.on( 'load', definition.onLoad );
     
    30133029 * @param String page The id of the page that it's gonna be selected.
    30143030 * @param String currentPage The id of the current page.
    30153031 */
     3032
     3033/**
     3034 * The dialog contents to remove.
     3035 * @name CKEDITOR.config.removeDialogContents
     3036 * @type String
     3037 * @since 3.5
     3038 * @default ''
     3039 * @example
     3040 * config.removeDialogContents = 'flash:advanced;image:advanced';
     3041 */
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy