Changeset 6145


Ignore:
Timestamp:
12/01/2010 12:13:04 PM (5 years ago)
Author:
tobiasz.cudnik
Message:

#5915 ImageDlgHideLink not ported from V2

Location:
CKEditor/branches/versions/3.5.x
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CKEditor/branches/versions/3.5.x/CHANGES.html

    r6143 r6145  
    4848                <li><a href="http://dev.ckeditor.com/ticket/5404">#5404</a> : "fillEmptyBlocks" configuration option of v2 is now available.</li>
    4949                <li><a href="http://dev.ckeditor.com/ticket/5367">#5367</a> : New "CKEDITOR.editor::insertText" method (check api.html sample page for usages) is now provided to insert plain text into editor.</li>
     50                <li><a href="http://dev.ckeditor.com/ticket/5367">#5915</a> : Hiding dialog tabs.</li>
    5051        </ul>
    5152        <p>
  • CKEditor/branches/versions/3.5.x/_source/plugins/dialog/plugin.js

    r6137 r6145  
    189189                        }
    190190                        , editor ).definition;
     191
     192                var tabsToRemove = {};
     193                // Cache tabs that should be removed.
     194                if ( !( 'removeDialogContents' in editor._ ) && editor.config.removeDialogContents )
     195                {
     196                        var removeContents = editor.config.removeDialogContents.split( ';' );
     197
     198                        for ( i = 0; i < removeContents.length; i++ )
     199                        {
     200                                var parts = removeContents[ i ].split( ':' );
     201                                if ( parts.length == 2 )
     202                                {
     203                                        var removeDialogName = parts[ 0 ];
     204                                        if ( !tabsToRemove[ removeDialogName ] )
     205                                                tabsToRemove[ removeDialogName ] = [];
     206                                        tabsToRemove[ removeDialogName ].push( parts[ 1 ] );
     207                                }
     208                        }
     209                        editor._.removeDialogContents = tabsToRemove;
     210                }
     211
     212                // Remove tabs of this dialog.
     213                if ( editor._.removeDialogContents && ( tabsToRemove = editor._.removeDialogContents[ dialogName ] ) )
     214                {
     215                        for ( i = 0; i < tabsToRemove.length; i++ )
     216                                definition.removeContents( tabsToRemove[ i ] );
     217                }
     218
    191219                // Initialize load, show, hide, ok and cancel events.
    192220                if ( definition.onLoad )
     
    30113039 * @example
    30123040 * config.dialog_buttonsOrder = 'rtl';
    3013 */
     3041 */
     3042
     3043/** 
     3044 * The dialog contents to removed. It's a string composed by dialog name and tab name with a colon between them.
     3045 * Separate each pair with semicolon (see example).
     3046 * <b>Note: All names are case-sensitive.</b>
     3047 * <b>Note: Be cautious when specifying dialog tabs that are mandatory, like "info", dialog functionality might be broken because of this!<b>
     3048 * @name CKEDITOR.config.removeDialogContents
     3049 * @type String
     3050 * @since 3.5
     3051 * @default ''
     3052 * @example
     3053 * config.removeDialogContents = 'flash:advanced;Image:Link';
     3054 */
    30143055
    30153056/**
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy