Ticket #3276: 3276.patch

File 3276.patch, 4.4 KB (added by Frederico Caldeira Knabben, 15 years ago)
  • _source/core/dom/document.js

     
    128128                        return $ ? new CKEDITOR.dom.node( $ ) : null;
    129129                },
    130130
     131                getElementsByTag : function( tagName, namespace )
     132                {
     133                        if ( !CKEDITOR.env.ie && namespace )
     134                                tagName = namespace + ':' + tagName;
     135                        return new CKEDITOR.dom.nodeList( this.$.getElementsByTagName( tagName ) );
     136                },
     137
    131138                /**
    132139                 * Gets the <head> element for this document.
    133140                 * @returns {CKEDITOR.dom.element} The <head> element.
  • _source/core/dom/element.js

     
    477477                        return dtd;
    478478                },
    479479
    480                 getElementsByTag : function( tagName, namespace )
    481                 {
    482                         if ( !CKEDITOR.env.ie && namespace )
    483                                 tagName = namespace + ':' + tagName;
    484                         return new CKEDITOR.dom.nodeList( this.$.getElementsByTagName( tagName ) );
    485                 },
     480                getElementsByTag : CKEDITOR.dom.document.prototype.getElementsByTag,
    486481
    487482                /**
    488483                 * Gets the computed tabindex for this element.
  • _source/core/loader.js

     
    3131                        'core/command'                  : [],
    3232                        'core/config'                   : [ 'core/ckeditor_base' ],
    3333                        'core/dom'                              : [],
    34                         'core/dom/document'             : [ 'core/dom','core/dom/element', 'core/dom/domobject', 'core/dom/window' ],
     34                        'core/dom/document'             : [ 'core/dom', 'core/dom/domobject', 'core/dom/window' ],
    3535                        'core/dom/documentfragment'     : [ 'core/dom/element' ],
    3636                        'core/dom/element'              : [ 'core/dom', 'core/dom/document', 'core/dom/domobject', 'core/dom/node', 'core/dom/nodelist', 'core/tools' ],
    3737                        'core/dom/elementpath'  : [ 'core/dom/element' ],
  • _source/plugins/link/dialogs/link.js

     
    179179
    180180                // Find out whether we have any anchors in the editor.
    181181                // Get all IMG elements in CK document.
    182                 var elements = editor.document.$.getElementsByTagName( 'img' ),
    183                         realAnchors = editor.document.$.anchors,
     182                var elements = editor.document.getElementsByTag( 'img' ),
     183                        realAnchors = new CKEDITOR.dom.nodeList( editor.document.$.anchors ),
    184184                        anchors = retval.anchors = [];
    185                 for( var i = 0; i < elements.length ; i++ )
     185
     186                for( var i = 0; i < elements.count() ; i++ )
    186187                {
    187                         var item = elements.item( i );
     188                        var item = elements.getItem( i );
    188189                        if ( item.getAttribute( '_cke_realelement' ) && item.getAttribute( '_cke_real_element_type' ) == 'anchor' )
    189190                        {
    190                                 var domElement = new CKEDITOR.dom.element( item );
    191                                 domElement = editor.restoreRealElement( domElement );
    192                                 anchors.push( domElement );
     191                                anchors.push( editor.restoreRealElement( item ) );
    193192                        }
    194193                }
    195                 for ( i = 0 ; i < realAnchors.length ; i++ )
    196                         anchors.push( realAnchors[i] );
    197                 for ( i = 0, length = anchors.length ; i < length && ( item = anchors.shift() ) ; i++ )
    198                         anchors.push( { name : item.getAttribute( 'name' ), id : item.getAttribute( 'id' ) } );
    199194
     195                for ( i = 0 ; i < realAnchors.count() ; i++ )
     196                        anchors.push( realAnchors.getItem( i ) );
     197
     198                for ( i = 0 ; i < anchors.length ; i++ )
     199                {
     200                        item = anchors[ i ];
     201                        anchors[ i ] = { name : item.getAttribute( 'name' ), id : item.getAttribute( 'id' ) };
     202                }
     203
    200204                // Record down the selected element in the dialog.
    201205                this._.selectedElement = element;
    202206
  • ckeditor.pack

     
    9090                                        '_source/core/dtd.js',
    9191                                        '_source/core/dom/event.js',
    9292                                        '_source/core/dom/domobject.js',
     93                                        '_source/core/dom/window.js',
     94                                        '_source/core/dom/document.js',
    9395                                        '_source/core/dom/node.js',
    9496                                        '_source/core/dom/nodelist.js',
    9597                                        '_source/core/dom/element.js',
    96                                         '_source/core/dom/window.js',
    97                                         '_source/core/dom/document.js',
    9898                                        '_source/core/command.js',
    9999                                        '_source/core/config.js',
    100100                                        '_source/core/focusmanager.js',
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy