Ticket #676: 676_3.patch

File 676_3.patch, 0.8 kB (added by alfonsoml, 4 months ago)

Reuse the existing FCKDomTools.MoveChildren

  • editor/dialog/common/fck_dialog_common.js

     
    263263                        if ( oldNode ) 
    264264                        { 
    265265                                CopyAttributes( oldNode, oNewNode, oAttributes ) ; 
    266                                 MoveContents( oldNode, oNewNode ) ; 
     266                                oEditor.FCKDomTools.MoveChildren( oldNode, oNewNode ) ; 
    267267                                oldNode.parentNode.removeChild( oldNode ) ; 
    268268                                oldNode = null ; 
    269269 
     
    326326        oDest.style.cssText = oSource.style.cssText ; 
    327327} 
    328328 
    329 // Move the contents from one node to the other 
    330 function MoveContents( oSource, oDest ) 
    331 { 
    332         while ( oSource.firstChild ) 
    333         { 
    334                 var oNode = oSource.removeChild( oSource.firstChild ) ; 
    335                 oDest.appendChild( oNode ) ; 
    336         } 
    337 }