Ticket #7746: 7746_2.patch

File 7746_2.patch, 2.3 KB (added by Frederico Caldeira Knabben, 13 years ago)
  • _source/plugins/toolbar/plugin.js

     
    174174
    175175                                                var output = [ '<div class="cke_toolbox" role="group" aria-labelledby="', labelId, '" onmousedown="return false;"' ],
    176176                                                        expanded =  editor.config.toolbarStartupExpanded !== false,
     177                                                        avoidGroupMix = editor.skin.avoidGroupMix,
    177178                                                        groupStarted;
    178179
    179180                                                output.push( expanded ? '>' : ' style="display:none">' );
     
    230231
    231232                                                                if ( item )
    232233                                                                {
     234                                                                        // Some skins do not accept mixing toolbar items that accept
     235                                                                        // groups with those that do not accept it. In this case we
     236                                                                        // need to split the toolbar row. (#7746)
     237                                                                        if ( avoidGroupMix &&
     238                                                                                        ( ( item.canGroup && !groupStarted && toolbarObj ) ||
     239                                                                                          ( !item.canGroup && groupStarted ) ) )
     240                                                                        {
     241                                                                                // Create a new row including all elements after the current item, inclusive.
     242                                                                                var newRow = row.items ? CKEDITOR.tools.clone( row ) : items.slice( i );
     243                                                                                newRow.items && ( newRow.items = items.slice( i ) );
     244
     245                                                                                // Add the new toolbar after the current one.
     246                                                                                toolbar.splice( r + 1, 0, newRow );
     247
     248                                                                                // Reduce the current toolbar to contain the processed items only.
     249                                                                                items.splice( i );
     250
     251                                                                                // Stop this toolbar processing, so it'll restart for
     252                                                                                // the newly created toolbar.
     253                                                                                break;
     254                                                                        }
     255
    233256                                                                        // Initialize the toolbar first, if needed.
    234257                                                                        if ( !toolbarObj )
    235258                                                                        {
     
    411434 */
    412435CKEDITOR.ui.separator =
    413436{
     437        canGroup : 1,
    414438        render : function( editor, output )
    415439        {
    416440                output.push( '<span class="cke_separator" role="separator"></span>' );
  • _source/skins/kama/skin.js

     
    1212                dialog          : { css : [ 'dialog.css' ] },
    1313                templates       : { css : [ 'templates.css' ] },
    1414                margins         : [ 0, 0, 0, 0 ],
     15                avoidGroupMix : 1,
    1516                init : function( editor )
    1617                {
    1718                        if ( editor.config.width && !isNaN( editor.config.width ) )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy