Show
Ignore:
Timestamp:
2008-08-27 16:58:27 (4 months ago)
Author:
wwalc
Message:

Changed the way how FCKeditor is loaded + a couple of other bugfixes

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • MediaWiki/trunk/plugins/mediawiki/dialogs/math.html

    r1830 r2388  
    9292function UpdateImageFromAjax( response ) 
    9393{ 
     94        oEditor.FCKUndo.SaveUndoStep() ; 
     95 
    9496        if ( !oMathImage ) 
     97        { 
    9598                oMathImage = FCK.CreateElement( 'IMG' ) ; 
     99                oMathImage.className = 'FCK__MWMath' ; 
     100                oMathImage.src = FCKConfig.PluginsPath + 'mediawiki/images/icon_math.gif' ; 
     101        } 
    96102        else 
    97                 oEditor.FCKUndo.SaveUndoStep() ; 
     103        { 
     104                if ( response.responseText ) 
     105                { 
     106                        oMathImage.src = response.responseText ; 
     107                        SetAttribute( oMathImage, "_fcksavedurl", response.responseText ) ; 
     108                } 
     109                else 
     110                { 
     111                        oMathImage.src = FCKConfig.PluginsPath + 'mediawiki/images/icon_math.gif' ; 
     112                } 
     113        } 
    98114         
    99115        SetAttribute( oMathImage, "_fck_mw_math", GetE('xTemplateRaw').value.Trim() ) ; 
    100116        SetAttribute( oMathImage, "_fckfakelement", 'true' ) ; 
    101  
    102         oMathImage.src = response.responseText ; 
    103         SetAttribute( oMathImage, "_fcksavedurl", response.responseText ) ; 
    104117 
    105118        // Call it using setTimeout to avoid a strange behavior in Firefox.