Make WordPress Core


Ignore:
Timestamp:
01/19/2007 12:49:01 AM (19 years ago)
Author:
ryan
Message:

Category AJAX fixes from mdawaffe. fixes #3343

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/list-manipulation-js.php

    r4583 r4768  
    2424        if ( !this.theList )
    2525            return false;
    26         this.theList.cleanWhitespace();
     26        Element.cleanWhitespace(this.theList);
    2727    },
    2828
     
    5555                });
    5656                if ( tempObj.showLink && showLinkMessage )
    57                     ajaxAdd.myResponseElement.update("<div id='jumplink' class='updated fade'><p>" + showLinkMessage + "</p></div>");
     57                    Element.update(ajaxAdd.myResponseElement,"<div id='jumplink' class='updated fade'><p>" + showLinkMessage + "</p></div>");
    5858            }
    5959            if ( tempObj.addComplete && typeof tempObj.addComplete == 'function' )
     
    8383        var idName = what.replace('-as-spam','') + '-' + id;
    8484        ajaxDel.addOnComplete( function(transport) {
    85             ajaxDel.myResponseElement.update('');
     85            Element.update(ajaxDel.myResponseElement,'');
    8686            tempObj.destore(action);
    8787            if( tempObj.delComplete && typeof tempObj.delComplete == 'function' )
     
    106106        var idName = what + '-' + id;
    107107        ajaxDim.addOnComplete( function(transport) {
    108             ajaxDim.myResponseElement.update('');
     108            Element.update(ajaxDim.myResponseElement,'');
    109109            tempObj.destore(action);
    110110            if ( tempObj.dimComplete && typeof tempObj.dimComplete == 'function' )
     
    121121    addListItem: function( h ) {
    122122        new Insertion[this.topAdder ? 'Top' : 'Bottom'](this.theList,h);
    123         this.theList.cleanWhitespace();
     123        Element.cleanWhitespace(this.theList);
    124124        var id = this.topAdder ? this.theList.firstChild.id : this.theList.lastChild.id;
    125125        if ( this.alt )
    126126            if ( this.theList.childNodes.length % 2 )
    127                 $(id).addClassName(this.alt);
     127                Element.addClassName($(id),this.alt);
    128128        Fat.fade_element(id);
    129129    },
     
    146146        id = $(id);
    147147        if ( !update ) {
    148             id.remove();
     148            Element.remove(id);
    149149            this.addListItem( h );
    150150            return;
     
    157157    dimItem: function( id, dimClass, noFade ) {
    158158        id = $(id);
    159         if ( id.hasClassName(dimClass) ) {
     159        if ( Element.hasClassName(id,dimClass) ) {
    160160            if ( !noFade )
    161161                Fat.fade_element(id.id,null,700,null);
    162             id.removeClassName(dimClass);
     162            Element.removeClassName(id,dimClass);
    163163        } else {
    164164            if ( !noFade )
    165165                Fat.fade_element(id.id,null,700,'#FF3333');
    166             id.addClassName(dimClass);
     166            Element.addClassName(id,dimClass);
    167167        }
    168168    },
     
    184184        delete(this.dataStore[action]);
    185185        if ( error ) {
    186             func = function() { $(id).setStyle( { 'background-color': '#FF3333' } ); }
     186            func = function() { Element.setStyle($(id),{backgroundColor:'#FF3333'}); }
    187187            func(); setTimeout(func, 705); // Hit it twice in case it's still fading.
    188188        }
     
    247247        var alt = this.alt;
    248248        var offset = this.altOffset;
    249         var listItems = $A(this.theList.childNodes).findAll( function(i) { return i.visible() } );
     249        var listItems = $A(this.theList.childNodes).findAll( function(i) { return Element.visible(i) } );
    250250        listItems.each( function(i,n) {
    251251            if ( ( n + offset ) % 2 )
    252                 i.removeClassName(alt);
     252                Element.removeClassName(i,alt);
    253253            else
    254                 i.addClassName(alt);
     254                Element.addClassName(i,alt);
    255255        });
    256256    }
Note: See TracChangeset for help on using the changeset viewer.