Changeset 1378

Show
Ignore:
Timestamp:
2008-01-20 22:59:52 (6 months ago)
Author:
alfonsoml
Message:

Fix for #1503, improve the ability to work with Styles

Location:
FCKeditor/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/classes/fckstyle.js

    r1116 r1378  
    232232                                                this._RemoveOverrides( pathElement, styleOverrides[ pathElementName ] ) ; 
    233233 
    234                                                 // Remove the element if no more attributes are available. 
    235                                                 this._RemoveNoAttribElement( pathElement ) ; 
     234                                                // Remove the element if no more attributes are available and it's an inline style element 
     235                                                if ( this.GetType() == FCK_STYLE_INLINE) 
     236                                                        this._RemoveNoAttribElement( pathElement ) ; 
    236237                                        } 
    237238                                } 
     
    487488                { 
    488489                        case FCK_STYLE_BLOCK : 
    489                                 return this.CheckElementRemovable( elementPath.Block || elementPath.BlockLimit ) ; 
     490                                return this.CheckElementRemovable( elementPath.Block || elementPath.BlockLimit, true ) ; 
    490491 
    491492                        case FCK_STYLE_INLINE : 
     
    689690                } 
    690691 
    691                 return ( valueA == valueB ) 
     692                // Return true if they match or if valueA is null and valueB is an empty string 
     693                return ( valueA == valueB || ( ( valueA === null || valueA === '' ) && ( valueB === null || valueB === '' ) ) ) 
    692694        }, 
    693695 
  • FCKeditor/trunk/_whatsnew.html

    r1284 r1378  
    4848                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1522">#1522</a>] The ENTER 
    4949                        key will now work properly in IE with the cursor at the start of a formatted block.</li> 
     50                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1503">#1503</a>] It's possible 
     51                        to define in the Styles that a Style (with an empty class) must be shown selected 
     52                        only when no class is present in the current element, and selecting that item will  
     53                        clear the current class (it does apply to any attribute, not only classes).</li> 
     54 
    5055        </ul> 
    5156        <p>