Ticket #4184: ie-image-fix.patch

File ie-image-fix.patch, 940 bytes (added by Cic, 10 years ago)
  • plugins/mediawiki/dialogs/image.html

     
    122122        if ( imgCaption.length > 0 )
    123123                ajaxArg += '|' + imgCaption ;
    124124
     125        if ( oImage == null )
     126                oImage = FCK.InsertElement( 'IMG' ) ;
     127        else
     128                oEditor.FCKUndo.SaveUndoStep() ;
     129       
    125130        oEditor.window.parent.sajax_request_type = 'GET' ;
    126131        oEditor.window.parent.sajax_do_call( 'wfSajaxGetImageUrl', [ajaxArg], UpdateImageFromAjax ) ;
    127132
     
    130135
    131136function UpdateImageFromAjax( response )
    132137{
    133         var bHasImage = ( oImage != null ) ;
    134 
    135         if ( !bHasImage )
    136                 oImage = FCK.CreateElement( 'IMG' ) ;
    137         else
    138                 oEditor.FCKUndo.SaveUndoStep() ;
    139 
    140138        UpdateImage( oImage, response.responseText ) ;
    141139
    142140        // Call it using setTimeout to avoid a strange behavior in Firefox.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy