Changeset 4768 for trunk/wp-includes/js/list-manipulation-js.php
- Timestamp:
- 01/19/2007 12:49:01 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/js/list-manipulation-js.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/list-manipulation-js.php
r4583 r4768 24 24 if ( !this.theList ) 25 25 return false; 26 this.theList.cleanWhitespace();26 Element.cleanWhitespace(this.theList); 27 27 }, 28 28 … … 55 55 }); 56 56 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>"); 58 58 } 59 59 if ( tempObj.addComplete && typeof tempObj.addComplete == 'function' ) … … 83 83 var idName = what.replace('-as-spam','') + '-' + id; 84 84 ajaxDel.addOnComplete( function(transport) { 85 ajaxDel.myResponseElement.update('');85 Element.update(ajaxDel.myResponseElement,''); 86 86 tempObj.destore(action); 87 87 if( tempObj.delComplete && typeof tempObj.delComplete == 'function' ) … … 106 106 var idName = what + '-' + id; 107 107 ajaxDim.addOnComplete( function(transport) { 108 ajaxDim.myResponseElement.update('');108 Element.update(ajaxDim.myResponseElement,''); 109 109 tempObj.destore(action); 110 110 if ( tempObj.dimComplete && typeof tempObj.dimComplete == 'function' ) … … 121 121 addListItem: function( h ) { 122 122 new Insertion[this.topAdder ? 'Top' : 'Bottom'](this.theList,h); 123 this.theList.cleanWhitespace();123 Element.cleanWhitespace(this.theList); 124 124 var id = this.topAdder ? this.theList.firstChild.id : this.theList.lastChild.id; 125 125 if ( this.alt ) 126 126 if ( this.theList.childNodes.length % 2 ) 127 $(id).addClassName(this.alt);127 Element.addClassName($(id),this.alt); 128 128 Fat.fade_element(id); 129 129 }, … … 146 146 id = $(id); 147 147 if ( !update ) { 148 id.remove();148 Element.remove(id); 149 149 this.addListItem( h ); 150 150 return; … … 157 157 dimItem: function( id, dimClass, noFade ) { 158 158 id = $(id); 159 if ( id.hasClassName(dimClass) ) {159 if ( Element.hasClassName(id,dimClass) ) { 160 160 if ( !noFade ) 161 161 Fat.fade_element(id.id,null,700,null); 162 id.removeClassName(dimClass);162 Element.removeClassName(id,dimClass); 163 163 } else { 164 164 if ( !noFade ) 165 165 Fat.fade_element(id.id,null,700,'#FF3333'); 166 id.addClassName(dimClass);166 Element.addClassName(id,dimClass); 167 167 } 168 168 }, … … 184 184 delete(this.dataStore[action]); 185 185 if ( error ) { 186 func = function() { $(id).setStyle( { 'background-color': '#FF3333' }); }186 func = function() { Element.setStyle($(id),{backgroundColor:'#FF3333'}); } 187 187 func(); setTimeout(func, 705); // Hit it twice in case it's still fading. 188 188 } … … 247 247 var alt = this.alt; 248 248 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) } ); 250 250 listItems.each( function(i,n) { 251 251 if ( ( n + offset ) % 2 ) 252 i.removeClassName(alt);252 Element.removeClassName(i,alt); 253 253 else 254 i.addClassName(alt);254 Element.addClassName(i,alt); 255 255 }); 256 256 }
Note: See TracChangeset
for help on using the changeset viewer.