Ticket #6419: 6419_2.patch

File 6419_2.patch, 1.7 KB (added by Tobiasz Cudnik, 13 years ago)
  • _source/core/dom/node.js

     
    103103                        return element;
    104104                },
    105105
     106                /**
     107                 * Clone the node, including it's attributes and optionally, children.
     108                 *
     109                 * @param includeChildren
     110                 * @param cloneId Possible values are:
     111                 * 0|undefined|false Doesn't clone any ID or the internal cke_expando.
     112                 * 1|true Clones both IDs and the internal cke_expando.
     113                 * 2 Clones only IDs, not the internal cke_expando.
     114                 */
    106115                clone : function( includeChildren, cloneId )
    107116                {
    108117                        var $clone = this.$.cloneNode( includeChildren );
    109118
    110                         if ( !cloneId )
     119                        if ( !cloneId || cloneId == 2 )
    111120                        {
    112121                                var removeIds = function( node )
    113122                                {
    114123                                        if ( node.nodeType != CKEDITOR.NODE_ELEMENT )
    115124                                                return;
    116125
    117                                         node.removeAttribute( 'id', false ) ;
     126                                        if ( cloneId != 2 )
     127                                                node.removeAttribute( 'id', false ) ;
    118128                                        node.removeAttribute( '_cke_expando', false ) ;
    119129
    120130                                        var childs = node.childNodes;
  • _source/plugins/list/plugin.js

     
    8787                                {
    8888                                        if ( !rootNode || listArray[ currentIndex ].parent.getName() != rootNode.getName() )
    8989                                        {
    90                                                 rootNode = listArray[ currentIndex ].parent.clone( false, 1 );
     90                                                rootNode = listArray[ currentIndex ].parent.clone( false, 2 );
    9191                                                retval.append( rootNode );
    9292                                        }
    9393                                        currentListItem = rootNode.append( item.element.clone( 0, 1 ) );
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy