Ticket #8997: 8997.patch

File 8997.patch, 1.4 KB (added by Garry Yao, 12 years ago)
  • _source/plugins/list/plugin.js

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    298298                        CKEDITOR.dom.element.setMarker( database, itemNode, 'list_item_processed', true );
    299299                }
    300300
    301                 var root = groupObj.root,
    302                         fakeParent = root.getDocument().createElement( this.type );
    303                 // Copy all attributes, except from 'start' and 'type'.
    304                 root.copyAttributes( fakeParent, { start : 1, type : 1 } );
    305                 // The list-style-type property should be ignored.
    306                 fakeParent.removeStyle( 'list-style-type' );
    307 
     301                var listNode;
    308302                for ( i = 0 ; i < selectedListItems.length ; i++ )
    309303                {
    310                         var listIndex = selectedListItems[i].getCustomData( 'listarray_index' );
    311                         listArray[listIndex].parent = fakeParent;
     304                        var listIndex = selectedListItems[ i ].getCustomData( 'listarray_index' );
     305                        listNode = listArray[ listIndex ].parent;
     306                        if ( !listNode.is( this.type ) )
     307                        {
     308                                listNode.renameNode( this.type );
     309                                listNode.removeStyle( 'list-style-type' );
     310                        }
    312311                }
    313312                var newList = CKEDITOR.plugins.list.arrayToList( listArray, database, null, editor.config.enterMode );
    314313                var child, length = newList.listNode.getChildCount();
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy