Changeset 5305


Ignore:
Timestamp:
03/28/10 12:57:14 (4 years ago)
Author:
garry.yao
Message:

#5372: Creating new element for new sub list created by indentation.

Location:
CKEditor/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CKEditor/trunk/CHANGES.html

    r5304 r5305  
    108108                <li><a href="http://dev.fckeditor.net/ticket/5374">#5374</a> : Unable to toggle inline style when selection start from the linefeed of the previous paragraph.</li> 
    109109                <li><a href="http://dev.fckeditor.net/ticket/4513">#4513</a> : Selected link element is not always correctly detected when using keyboard arrows to perform such selection.</li> 
     110                <li><a href="http://dev.fckeditor.net/ticket/5372">#5372</a> : Newly created sub list should not inheirt nothing from the original (parent) list except list type.</li> 
    110111                <li>Updated the following language files:<ul> 
    111112                        <li>Faroese;</li> 
  • CKEditor/trunk/_source/plugins/indent/plugin.js

    r5244 r5305  
    136136                // Apply indenting or outdenting on the array. 
    137137                var baseIndent = listArray[ lastItem.getCustomData( 'listarray_index' ) ].indent; 
    138                 for ( i = startItem.getCustomData( 'listarray_index' ) ; i <= lastItem.getCustomData( 'listarray_index' ) ; i++ ) 
    139                         listArray[i].indent += indentOffset; 
     138                for ( i = startItem.getCustomData( 'listarray_index' ); i <= lastItem.getCustomData( 'listarray_index' ); i++ ) 
     139                { 
     140                        listArray[ i ].indent += indentOffset; 
     141                        // Make sure the newly created sublist get a brand-new element of the same type. (#5372) 
     142                        var listRoot = listArray[ i ].parent; 
     143                        listArray[ i ].parent = new CKEDITOR.dom.element( listRoot.getName(), listRoot.getDocument() ); 
     144                } 
     145 
    140146                for ( i = lastItem.getCustomData( 'listarray_index' ) + 1 ; 
    141147                                i < listArray.length && listArray[i].indent > baseIndent ; i++ ) 
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy