Changeset 613

Show
Ignore:
Timestamp:
2007-08-01 23:22:06 (16 months ago)
Author:
fredck
Message:

Added the JavaScript support for #1010.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • MediaWiki/trunk/extensions/FCKeditor/plugins/mediawiki/fckplugin.js

    r586 r613  
    299299 
    300300                                                        var formula = htmlNode.getAttribute( '_fck_mw_math' ) ; 
    301                                                          
     301 
    302302                                                        if ( formula && formula.length > 0 ) 
    303303                                                        { 
     
    370370                                                                        stringBuilder.push( htmlNode.innerHTML ) ; 
    371371                                                                        return ; 
     372 
     373                                                                case 'fck_mw_nowiki' : 
     374                                                                        sNodeName = 'nowiki' ; 
     375                                                                        break ; 
     376 
     377                                                                case 'fck_mw_includeonly' : 
     378                                                                        sNodeName = 'includeonly' ; 
     379                                                                        break ; 
     380 
     381                                                                case 'fck_mw_noinclude' : 
     382                                                                        sNodeName = 'noinclude' ; 
     383                                                                        break ; 
     384 
     385                                                                case 'fck_mw_onlyinclude' : 
     386                                                                        sNodeName = 'onlyinclude' ; 
     387                                                                        break ; 
    372388                                                        } 
     389 
     390                                                        // Change the node name and fell in the "default" case. 
     391                                                        if ( htmlNode.getAttribute( '_fck_mw_customtag' ) ) 
     392                                                                sNodeName = htmlNode.getAttribute( '_fck_mw_tagname' ) ; 
    373393 
    374394                                                default : 
     
    466486                                else if ( sAttName.indexOf( '_moz' ) == 0 ) 
    467487                                        continue ; 
    468                                 // There are one cases (on Gecko) when the oAttribute.nodeValue must be used: 
    469                                 //              - for the "class" attribute 
     488                                // For "class", nodeValue must be used. 
    470489                                else if ( sAttName == 'class' ) 
    471                                         sAttValue = oAttribute.nodeValue ; 
     490                                { 
     491                                        // Get the class, removing any fckXXX we can have there. 
     492                                        sAttValue = oAttribute.nodeValue.replace( /(^|\s*)fck\S+/, '' ).Trim() ; 
     493 
     494                                        if ( sAttValue.length == 0 ) 
     495                                                continue ; 
     496                                } 
    472497                                // XHTML doens't support attribute minimization like "CHECKED". It must be trasformed to cheched="checked". 
    473498                                else if ( oAttribute.nodeValue === true )