Changeset 237

Show
Ignore:
Timestamp:
2007-04-07 15:16:52 (21 months ago)
Author:
alfonsoml
Message:

Land in trunk the fix for #318, multiple linked images were merged in a single link.

Location:
FCKeditor/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/internals/fck_ie.js

    r202 r237  
    357357        if ( url.length > 0 ) 
    358358        { 
     359                // If there are several images, and you try to link each one, all the images get inside the link: 
     360                // <img><img> -> <a><img></a><img> -> <a><img><img></a> due to the call to 'CreateLink' (bug in IE) 
     361                if (FCKSelection.GetType() == 'Control') 
     362                { 
     363                        // Create a link 
     364                        var oLink = this.EditorDocument.createElement( 'A' ) ; 
     365                        oLink.href = url ; 
     366 
     367                        // Get the selected object 
     368                        var oControl = FCKSelection.GetSelectedElement() ; 
     369                        // Put the link just before the object 
     370                        oControl.parentNode.insertBefore(oLink, oControl) ; 
     371                        // Move the object inside the link 
     372                        oControl.parentNode.removeChild( oControl ) ; 
     373                        oLink.appendChild( oControl ) ; 
     374                         
     375                        return oLink ; 
     376                } 
     377 
    359378                // Generate a temporary name for the link. 
    360379                var sTempUrl = 'javascript:void(0);/*' + ( new Date().getTime() ) + '*/' ; 
  • FCKeditor/trunk/_whatsnew.html

    r236 r237  
    4747                        keep the Type attribute properly (it was converted to lowercase when the properties dialog was  
    4848                        opened again).</li> 
     49                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/318">#318</a>] Multiple linked images  
     50                        are merged in a single link in IE.</li> 
    4951        </ul> 
    5052        <h3>