Changeset 2204 for FCKeditor/branches

Show
Ignore:
Timestamp:
2008-07-11 11:17:49 (5 months ago)
Author:
martinkou
Message:

Simplified the DIV container detection logic a bit.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/branches/features/div_container/editor/_source/internals/fckdomtools.js

    r2203 r2204  
    10311031                var startNode = range.StartNode ; 
    10321032                var endNode = range.EndNode ; 
    1033                 var elementMarkers = {} ; 
    10341033                var currentNode = startNode ; 
    10351034                 
     
    10451044                        var path = new FCKElementPath( currentNode ) ; 
    10461045                        var blockLimit = path.BlockLimit ; 
    1047                         if ( blockLimit && blockLimit.nodeName.IEquals( 'div' ) && !blockLimit['_fckdivincluded'] ) 
    1048                         { 
     1046                        if ( blockLimit && blockLimit.nodeName.IEquals( 'div' ) && !blockLimit['_fckdivincluded'] && 
     1047                                        currentBlocks.indexOf( blockLimit ) == -1 ) 
    10491048                                currentBlocks.push( blockLimit ) ; 
    1050                                 FCKDomTools.SetElementMarker( elementMarkers, blockLimit, '_fckdivincluded', true ) ; 
    1051                         } 
    10521049 
    10531050                        currentNode = FCKDomTools.GetNextSourceElement( currentNode ) ; 
    10541051                } 
    1055  
    1056                 FCKDomTools.ClearAllMarkers( elementMarkers ) ; 
    10571052 
    10581053                return currentBlocks ;