Changeset 927
- Timestamp:
- 2007-10-01 11:27:58 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/editor/_source/classes/fckstyle.js
r896 r927 183 183 if ( this.CheckElementRemovable( pathElement ) ) 184 184 { 185 if ( isBoundary 186 && !FCKDomTools.CheckIsEmptyElement( pathElement, 187 function( el ) 188 { 189 return ( el != bookmarkStart ) ; 190 } ) 185 if ( isBoundary 186 && !FCKDomTools.CheckIsEmptyElement( pathElement, 187 function( el ) 188 { 189 return ( el != bookmarkStart ) ; 190 } ) 191 191 ) 192 192 { 193 193 lastBoundaryElement = pathElement ; 194 194 195 195 // We'll be continuously including elements in the 196 196 // boundaryElements array, but only those added before … … 211 211 if ( FCKDomTools.HasAttribute( pathElement, att ) ) 212 212 { 213 if ( att == 'style' ) 214 this._RemoveStylesFromElement( pathElement ) ; 215 else 216 FCKDomTools.RemoveAttribute( pathElement, att ) ; 213 switch ( att ) 214 { 215 case 'style' : 216 this._RemoveStylesFromElement( pathElement ) ; 217 break ; 218 219 case 'class' : 220 // The 'class' element value must match (#1318). 221 if ( FCKDomTools.GetAttributeValue( pathElement, att ) != this.GetFinalAttributeValue( att ) ) 222 continue ; 223 224 default : 225 FCKDomTools.RemoveAttribute( pathElement, att ) ; 226 } 217 227 } 218 228 } … … 349 359 if ( FCKDomTools.HasAttribute( currentNode, att ) ) 350 360 { 351 if ( att == 'style' ) 352 this._RemoveStylesFromElement( currentNode ) ; 353 else 354 FCKDomTools.RemoveAttribute( currentNode, att ) ; 361 switch ( att ) 362 { 363 case 'style' : 364 this._RemoveStylesFromElement( currentNode ) ; 365 break ; 366 367 case 'class' : 368 // The 'class' element value must match (#1318). 369 if ( FCKDomTools.GetAttributeValue( currentNode, att ) != this.GetFinalAttributeValue( att ) ) 370 continue ; 371 372 default : 373 FCKDomTools.RemoveAttribute( currentNode, att ) ; 374 } 355 375 } 356 376 } … … 509 529 if ( FCKDomTools.HasAttribute( innerElement, att ) ) 510 530 { 511 if ( att == 'style' ) 512 this._RemoveStylesFromElement( innerElement ) ; 513 else 514 FCKDomTools.RemoveAttribute( innerElement, att ) ; 531 switch ( att ) 532 { 533 case 'style' : 534 this._RemoveStylesFromElement( innerElement ) ; 535 break ; 536 537 case 'class' : 538 // The 'class' element value must match (#1318). 539 if ( FCKDomTools.GetAttributeValue( innerElement, att ) != this.GetFinalAttributeValue( att ) ) 540 continue ; 541 542 default : 543 FCKDomTools.RemoveAttribute( innerElement, att ) ; 544 } 515 545 } 516 546 }