Changeset 7522
- Timestamp:
- 06/27/12 18:52:01 (12 months ago)
- Location:
- CKEditor/trunk
- Files:
-
- 3 edited
-
CHANGES.html (modified) (1 diff)
-
_source/plugins/indent/plugin.js (modified) (1 diff)
-
_source/plugins/list/plugin.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/trunk/CHANGES.html
r7521 r7522 66 66 <li><a href="http://dev.ckeditor.com/ticket/9034">#9034</a> : [IE7] Fixed JavaScript error caused by drag-to-select at the bottom of the document.</li> 67 67 <li><a href="http://dev.ckeditor.com/ticket/9057">#9057</a> : Unexpected block established when decreasing indent of a styled list item.</li> 68 <li><a href="http://dev.ckeditor.com/ticket/9063">#9063</a> : Styles on sub-list are lost when decreasing indent of the parent list.</li> 68 69 </ul> 69 70 <h3> -
CKEditor/trunk/_source/plugins/indent/plugin.js
r7477 r7522 143 143 listArray[ i ].indent += indentOffset; 144 144 // Make sure the newly created sublist get a brand-new element of the same type. (#5372) 145 var listRoot = listArray[ i ].parent; 146 listArray[ i ].parent = new CKEDITOR.dom.element( listRoot.getName(), listRoot.getDocument() ); 145 if ( indentOffset > 0 ) 146 { 147 var listRoot = listArray[ i ].parent; 148 listArray[ i ].parent = new CKEDITOR.dom.element( listRoot.getName(), listRoot.getDocument() ); 149 } 147 150 } 148 151 -
CKEditor/trunk/_source/plugins/list/plugin.js
r7520 r7522 30 30 element.removeAttribute( 'dir' ); 31 31 } 32 } 33 34 // Inheirt inline styles from another element. 35 function inheirtInlineStyles( parent, el ) 36 { 37 var style = parent.getAttribute( 'style' ); 38 39 // Put parent styles before child styles. 40 style && el.setAttribute( 'style', 41 style.replace( /([^;])$/, '$1;' ) + 42 ( el.getAttribute( 'style' ) || '' ) ); 32 43 } 33 44 … … 110 121 { 111 122 var item = listArray[ currentIndex ], 123 itemParent = item.parent, 112 124 itemGrandParent = item.grandparent; 113 125 … … 148 160 else if ( item.indent == -1 && !baseIndex && itemGrandParent ) 149 161 { 162 // We're leaving this parent list, inherit it's inline styles. 163 var listNode = itemParent.clone(); 164 if ( listNode.hasAttribute( 'style' ) ) 165 { 166 listNode.removeStyle( 'list-style-type' ); 167 inheirtInlineStyles( listNode, item.element ); 168 } 169 150 170 if ( listNodeNames[ itemGrandParent.getName() ] ) 151 171 currentListItem = item.element.clone( false, true ); … … 176 196 child.setAttribute( 'dir', orgDir ); 177 197 178 // Merge into child styles. 179 style && child.setAttribute( 'style', 180 style.replace( /([^;])$/, '$1;') + 181 ( child.getAttribute( 'style' ) || '' ) ); 198 inheirtInlineStyles( li, child ); 182 199 183 200 className && child.addClass( className );
Note: See TracChangeset
for help on using the changeset viewer.
